/* ==========================================================================
   format タクソノミー アーカイブ専用スタイル
   /format/{slug}/ で読み込まれる。形態別カラーはスラッグ別モディファイアで切替。
   共通の .anime-grid / .anime-card / .anime-pagination も本ファイル内で定義する
   （taxonomy-vod.css と重複するが、独立したページなので影響なし）。
   ========================================================================== */

/* ----------------------------------------
   main 領域のベース
   ---------------------------------------- */
.taxonomy-format-main {
    background: #141414;
    color: #d1d5db;
    padding: 0 0 64px;
}

/* ----------------------------------------
   ヒーローセクション
   ---------------------------------------- */
.taxonomy-format-hero {
    padding: 56px 24px;
    margin-bottom: 40px;
    border-radius: 12px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.taxonomy-format-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.taxonomy-format-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #ffffff;
}

.taxonomy-format-hero-count {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.taxonomy-format-hero-description {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    font-weight: 700;
    line-height: 1.6;
}

/* ----------------------------------------
   形態別カラー（スラッグ別モディファイア）
   ---------------------------------------- */
.format-hero-movie {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

.format-hero-tv-series {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
}

.format-hero-ova {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
}

.format-hero-short {
    background: linear-gradient(135deg, #0d9488 0%, #134e4a 100%);
}

.format-hero-web {
    background: linear-gradient(135deg, #0891b2 0%, #164e63 100%);
}

.format-hero-special {
    background: linear-gradient(135deg, #ea580c 0%, #7c2d12 100%);
}

/* フォールバック（上記以外の形態） */
.format-hero-default {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* ----------------------------------------
   作品グリッド（共通スタイル）
   ---------------------------------------- */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 0 0 48px;
}

.anime-card {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.anime-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.anime-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.anime-card-link:hover,
.anime-card-link:focus {
    color: inherit;
    text-decoration: none;
}

.anime-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #0f0f0f;
    overflow: hidden;
}

.anime-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.anime-card-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.anime-card-body {
    padding: 12px 14px 16px;
}

.anime-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anime-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #9ca3af;
}

.anime-card-year {
    font-weight: 600;
}

.anime-card-rating {
    color: #f59e0b;
    font-weight: 700;
}

/* ----------------------------------------
   ページネーション（共通スタイル）
   ---------------------------------------- */
.anime-pagination {
    margin: 0 0 48px;
    text-align: center;
}

.anime-pagination .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.anime-pagination .page-numbers li {
    display: inline-flex;
}

.anime-pagination .page-numbers a,
.anime-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #1e1e1e;
    color: #d1d5db;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.anime-pagination .page-numbers a:hover {
    background: #2a2a2a;
    color: #ffffff;
}

.anime-pagination .page-numbers .current {
    background: #f59e0b;
    color: #141414;
}

.anime-pagination .page-numbers .dots {
    background: transparent;
}

/* ----------------------------------------
   空状態
   ---------------------------------------- */
.taxonomy-format-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
    font-size: 16px;
    background: #1e1e1e;
    border-radius: 10px;
    margin: 0 0 48px;
}

/* ----------------------------------------
   関連形態（SEO回遊セクション）
   ---------------------------------------- */
.taxonomy-format-related {
    margin-top: 24px;
    padding-top: 32px;
    border-top: 1px solid #2a2a2a;
}

.taxonomy-format-related-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 4px solid #f59e0b;
    line-height: 1.4;
}

.related-formats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.related-format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 12px;
    background: #1e1e1e;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-align: center;
}

.related-format-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: #f59e0b;
    color: #ffffff;
}

.related-format-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.related-format-count {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
}

.related-format-card:hover .related-format-count {
    color: #f59e0b;
}

/* ----------------------------------------
   モバイル対応
   ---------------------------------------- */
@media (max-width: 768px) {
    .taxonomy-format-hero {
        padding: 40px 20px;
        margin-bottom: 28px;
    }

    .taxonomy-format-hero-title {
        font-size: 24px;
    }

    .taxonomy-format-hero-description {
        font-size: 15px;
    }

    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .anime-card-title {
        font-size: 13px;
    }

    .anime-card-meta {
        font-size: 12px;
        gap: 10px;
    }

    .anime-card-body {
        padding: 10px 10px 14px;
    }

    .taxonomy-format-related-title {
        font-size: 18px;
    }

    .related-formats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .related-format-card {
        padding: 14px 10px;
    }

    .related-format-name {
        font-size: 14px;
    }
}
