/* ナビゲーションスタイル */
.navigation-container {
    width: 600px;
    max-width: 95%;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 20px;
    box-sizing: border-box;
}

.nav-link {
    text-decoration: none;
    color: #2e51a2;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.nav-link:hover {
    background-color: #e9ecef;
    color: #1f3c7a;
}

.nav-link.active {
    background-color: #2e51a2;
    color: white;
    border-color: #2e51a2;
}

.nav-link.active:hover {
    background-color: #1f3c7a;
    border-color: #1f3c7a;
}

/* テーブルスタイル */
.anilist_search .detail_table tbody tr:first-child td {
    border-top: 1px solid #babcbf;
}

.detail_table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.detail_table td {
    padding: 5px 8px;
    border: 1px solid #ddd;
    font-size: 12px;
}

/* ページネーション */
.pagination {
    display: initial !important;
}

/* ボタンエリア */
.btn-area, .response-area {
    margin: 8px 0 8px 120px;
}

.btn-area .btn_gray {
    float: left;
}

/* AJAXボタン */
.ajax-add-btn {
    border: 1px solid #39c;
    border-radius: 4px;
    margin-bottom: 4px;
    padding: 4px 8px;
    display: inline-block;
    text-decoration: none;
}

/* ボタンスタイル */
.btn-anilist {
    display: inline-block;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 5px;
}

.btn-anilist-search {
    background-color: #007bff;
    color: white;
}

.btn-anilist-search:hover {
    background-color: #0056b3;
}

.btn-anilist-register {
    background-color: #28a745;
    color: white;
}

.btn-anilist-register:hover {
    background-color: #1e7e34;
}

.btn-anilist-pending {
    background-color: #ffc107;
    color: #212529;
}

.btn-anilist-pending:hover {
    background-color: #e0a800;
}

/* ステータスラベル */
.label-pending {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ffc107;
    color: #212529;
    border-radius: 3px;
    font-size: 12px;
}

.label-registered {
    display: inline-block;
    padding: 2px 8px;
    background-color: #28a745;
    color: white;
    border-radius: 3px;
    font-size: 12px;
}

.label-unregistered {
    display: inline-block;
    padding: 2px 8px;
    background-color: #6c757d;
    color: white;
    border-radius: 3px;
    font-size: 12px;
}

/* 詳細リスト */
.detail_list article {
    margin-bottom: 20px;
}

.thumb-outer img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}

.name {
    font-weight: bold;
    margin: 10px 0;
}

.name a {
    color: #333;
    text-decoration: none;
}

.name a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* フィルタースタイル */
.filter-container {
    margin-bottom: 20px;
}

/* フォーマットバッジ（アニメ特有） */
.format-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 5px;
}

.format-badge.music {
    background-color: #6c757d;
    color: white;
}

/* 検索フォーム（キャラクターと声優特有） */
.search-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.search-container {
    flex: 2;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form label {
    font-weight: bold;
    margin-bottom: 0;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-form button, .search-form a {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .search-filter-container {
        flex-direction: column;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="text"] {
        min-width: auto;
        margin-bottom: 10px;
    }

    .search-form button, .search-form a {
        margin-bottom: 5px;
    }

    .thumb-outer img {
        width: 80px;
        height: 112px;
    }

    .detail_table th {
        width: 60px;
        font-size: 11px;
    }

    .detail_table td {
        font-size: 11px;
    }
}

/* キャラクターセクションのスタイル */
.characters_section .detail_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.characters_section .detail_list article {
    margin-bottom: 0;
}

.characters_section .thumb-outer img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}

.characters_section .name {
    font-weight: bold;
    margin: 10px 0;
}

.characters_section .name a {
    color: #333;
    text-decoration: none;
}

.characters_section .name a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.characters_section .detail_table {
    width: 100%;
    border-collapse: collapse;
}

.characters_section .detail_table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.characters_section .detail_table td {
    padding: 5px 8px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.characters_section .detail_table tbody tr:first-child td {
    border-top: 1px solid #babcbf;
}

.characters_section .btn-area, .characters_section .response-area {
    margin: 8px 0 8px 120px;
}

.characters_section .btn-anilist {
    display: inline-block;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 5px;
}

.characters_section .btn-anilist-search {
    background-color: #007bff;
    color: white;
}

.characters_section .btn-anilist-search:hover {
    background-color: #0056b3;
}

.characters_section .btn-anilist-register {
    background-color: #28a745;
    color: white;
}

.characters_section .btn-anilist-register:hover {
    background-color: #1e7e34;
}

.characters_section .btn-anilist-pending {
    background-color: #ffc107;
    color: #212529;
}

.characters_section .btn-anilist-pending:hover {
    background-color: #e0a800;
}

.characters_section .ajax-add-btn {
    border: 1px solid #39c;
    border-radius: 4px;
    margin-bottom: 4px;
    padding: 4px 8px;
}

/* アニメおよび声優のview.ctp特有のスタイル */
div#main.anilist_anime .characters_section table,
div#main.anilist_voiceartist .characters_section table {
    width: calc(100% - 124px);
    border: none;
}

/* プロフィールラッパー用レスポンシブスタイル */
@media (max-width: 768px) {
    .profile_wrapper {
        flex-direction: column;
    }

    .profile_wrapper .left,
    .profile_wrapper .right {
        width: 100%;
    }
}