/* 全体フォントとベース */
body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: #f2f7fc;
    color: #222;
    margin: 0;
    line-height: 1.6;
}

.anime-details-container {
    max-width: 900px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    padding: 2rem 2.5rem;
}

.anime-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #004a99;
    margin-bottom: 1rem;
    text-align: center;
}

.anime-header img {
    display: block;
    width: 80%;
    justify-self: center;
    max-height: 400px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,72,153,0.15);
}

/* --- メタ表示部分 (PC横並び / モバイル縦並び) --- */
.anime-meta {
    display: flex; /* Flexboxを有効にする */
    flex-wrap: wrap; /* 要素が収まらない場合に折り返す */
    gap: 20px; /* 要素間の余白 */
    justify-content: space-between; /* 要素を均等に配置 */
}

.anime-meta p {
    margin: 0; /* pタグのデフォルトマージンをリセット */
    flex: 1 1 calc(33% - 20px); /* PCで3列に並ぶように幅を調整（gapを考慮） */
    min-width: 180px; /* 各カラムの最小幅を設定（必要に応じて調整） */
    box-sizing: border-box; /* paddingやborderをwidthに含める */
}

.anime-meta strong {
    color: #0070cc;
    font-weight: 700;
}

.anime-meta a {
    color: #0070cc;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.anime-meta a:hover {
    color: #004a99;
    text-decoration: underline;
}

.button.trailer-button {
    display: inline-block;
    background-color: #0070cc;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0,112,204,0.4);
    transition: background-color 0.3s ease;
}

.button.trailer-button:hover {
    background-color: #005999;
    box-shadow: 0 4px 12px rgba(0,89,153,0.6);
}

/* セクション共通 */
.detail-section {
    margin-top: 2.5rem;
}

.detail-section h2 {
    font-size: 1.7rem;
    color: #004a99;
    margin-bottom: 1rem;
    border-bottom: 3px solid #0070cc;
    padding-bottom: 0.3rem;
}

.detail-section p {
    white-space: pre-wrap;
    font-size: 1rem;
    color: #333;
}

/* 各話リスト */
.episode-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.episode-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e0e7f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-list li a {
    color: #0070cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.episode-list li a:hover {
    color: #004a99;
    text-decoration: underline;
}

.episode-list li span {
    font-size: 0.9rem;
    color: #777;
}

/* ボタンコンテナ */
.button-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0 1rem 0;
}

.button-container a {
    background-color: #0070cc;
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0,112,204,0.4);
    transition: background-color 0.3s ease;
}

.button-container a:hover {
    background-color: #005999;
}

.official-link a {
    color: blueviolet;
}

/* 更新日 */
.anime-details-container > p {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-top: 2rem;
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
    .anime-details-container {
        margin: 1rem;
        padding: 1.5rem 1.8rem;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    }

    .anime-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .anime-header img {
        max-height: 250px;
        margin-bottom: 1.5rem;
    }

    .detail-section h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    .detail-section p {
        font-size: 0.95rem;
    }

    .episode-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0.7rem 0;
    }

    .episode-list li span {
        font-size: 0.85rem;
        color: #666;
    }

    .button-container {
        flex-direction: column;
        gap: 1rem;
        margin: 2rem 0 1rem 0;
    }

    .button-container a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }

    .anime-meta {
        flex-direction: column; /* モバイルでは縦並びにする */
        gap: 0.5rem; /* モバイルでの要素間余白 */
        font-size: 0.9rem;
        justify-content: flex-start;
    }

    .anime-meta p {
        flex: 1 1 auto; /* モバイルでは幅の指定をリセットし、縦並びに適応 */
        margin: 0.3rem 0;
    }
}