/*==================================
 * グローバルスタイル
==================================*/

.top-contents {
    display: flex;
}

.contents {
    display: flex;
    flex-direction: column;
}

.main-group-sec {
    display: flex;
    flex-direction: row;
}

.anime-details-container {
    width: 100%;
}

.text-color {
    color: var(--anime-card-text-default-color);
}

.p-card {
    color: var(--anime-card-arasuzi-default-color);
}

.meta-color {
    color: var(--anime-card-metainfo-default-color);
}

.metaitem-title-color {
    color: var(--anime-theme-dark-text);
}

a {
    color: var(--anime-a-link-color);
}

.anime-en_title {
    text-align: center;
    font-weight: 400;
    font-size: 23px;
    color: var(--anime-card-metainfo-default-color);
    padding-top: var(--anime-main-padding-x2);
}

.anime-title {
    /* PC/タブレットのデフォルト設定 */
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: #4a69bd;
    border-bottom: 3px solid #4a69bd;
    padding-bottom: var(--anime-main-padding-x2);
    margin-bottom: 20px;
}

/*==================================
 * ナビゲーションショートカット (固定/折り畳み式)
==================================*/
.nav-shortcut {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e1f5fe;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: baseline;
}

.nav-shortcut.hidden {
    transform: translateY(120px);
    opacity: 0;
    pointer-events: none;
}

.nav-shortcut a {
    color: #007bbd;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-shortcut a:hover {
    text-decoration: underline;
}

/*==================================
 * メインコンテンツレイアウト (PC/タブレット用レイアウトが規定)
==================================*/
.anime-main-content {
    display: flex;
    flex-direction: row;
    padding: var(--anime-main-padding-x6);
}

.meta-info-onesec {
    flex: 1;
}

.visual-plus-ad {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
/*================================
　キービジュアル設定
================================*/
.key-visual {
    width: 50%;
}

.key-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    aspect-ratio: 16/9;
}

/*===============================
　セクション設定
===============================*/
.animeinfo-section {
    display: contents;
}

.episode-anime-sec {
    flex: 2;
    max-width: 620px;
}

.anime-meta-column {
    display: flex;
    flex-direction: row;
    padding: var(--anime-main-padding-x5);
    border-radius: 8px;
    justify-content: space-between;
    background-color: var(--anime-card-backdefault-color);
}

.streaming-style {
    max-width: 500px;
}

.anime-meta-card {
    min-width: 290px;
    border-radius: 8px;
}

.meta-item {
    margin-bottom: 10px;
    font-size: 1em;
    /* PC/タブレットのデフォルト設定 */
}

/*==================================
 * セクションとカードデザイン
==================================*/

.detail-section {
    margin-top: 25px;
}

.detail-section h2 {
    font-size: 1.8em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.card {
    background-color: var(--anime-card-backdefault-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

/*==================================
 * 広告セクションスタイル
==================================*/

.ad-section {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-section img {
    max-width: 100%;
    height: auto;
}
.ad-section a {
    max-width: 80%;
}

/*==================================
 * 新機能　お気に入り登録ボタン
==================================*/
.meta-item.anime-register {
    display: flex;
    margin-top: 15px;
    align-items: baseline;
    flex-wrap: wrap;
}

.my-anime {
    display: inline-block;
    width: 100%;
    max-width: 200px;
    padding: 8px 15px;
    border: 2px solid #00aaff;
    color: #00aaff;
    background-color: #f0f8ff;
    border-radius: 36px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.my-anime:hover {
    background-color: #00aaff;
    color: white;
}

/*==================================
 * ボタンのスタイル
==================================*/
.button-container {
    text-align: center;
    margin-top: 40px;
    /* PC/タブレットのデフォルト設定 */
}

.back-button {
    /* PC/タブレットのデフォルト設定: インラインブロック表示 */
    display: inline-block;
    width: auto;
    margin: 5px;

    max-width: 400px;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.back-button {
    background-color: #6a89cc;
    color: #fff;
    box-shadow: 0 4px 10px rgba(74, 105, 189, 0.4);
}

.back-button:hover {
    background-color: #4a69bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 105, 189, 0.5);
}

.trailer-button {
    /* PC/タブレットのデフォルト設定: インラインブロック表示 */
    display: inline-block;
    width: auto;

    max-width: 200px;
    padding: 8px 15px;
    border: 2px solid #00aaff;
    color: #00aaff;
    background-color: #f0f8ff;
    border-radius: 36px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.trailer-button:hover {
    background-color: #00aaff;
    color: white;
}

/*==================================
 * 各話リストのスタイル
==================================*/

.episode-list {
    margin-top: 0;
}

.themesongs-title-movie {
    text-decoration-style: solid;
    -moz-text-decoration-style: solid;
    text-decoration-color: #4a69bd;
    -moz-text-decoration-color: #4a69bd;
}

.streaming-service-links {
    text-decoration: none;
}

.episode-list h3 {
    font-size: 1.2em;
    margin-top: 15px;
}

.episode-list-ul {
    list-style: none;
    padding: 0;
}

.episode-list-ul li {
    background-color: #fafafa;
    border-left: 5px solid #a4b0be;
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.episode-list-ul li:hover {
    background-color: #e9ecef;
}

.episode-link,
.episode-title {
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.episode-date {
    /* PC/タブレットのデフォルト設定: インライン表示 */
    display: inline;
    margin-left: 10px;
    margin-top: 0;

    color: #7f8c8d;
    font-size: 0.9em;
}

.updated-at {
    text-align: right;
    font-size: 0.8em;
    color: #999;
    margin-top: 20px;
}

@media (max-width: 1025px) {
    .anime-meta-column {
        flex-direction: column;
    }
}

@media (max-width: 991px) {
    .anime-meta-column {
        flex-direction: column;
    }
}

/*==================================
 * メディアクエリ (モバイル向け: 768px以下)
==================================*/
@media (max-width: 768px) {

    .anime-en_title {
        font-size: 18px;
        /* モバイル向けに調整 */
    }

    /* アニメタイトル */
    .anime-title {
        font-size: 168%;
        /* モバイル向けに調整 */
    }

    /* メインコンテンツレイアウトを縦並びに変更 */
    .anime-main-content {
        flex-direction: column;
        gap: 20px;
    }

    .visual-plus-ad {
        flex-direction: column-reverse;
    }

    .key-visual {
        width: 100%;
    }

    .anime-meta-column {
        flex-direction: column;
    }

    .anime-meta-card {
        flex: none;
        /* flexの指定を解除 */
    }

    /* メタ情報 */
    .meta-item {
        font-size: 0.95em;
        /* モバイル向けに調整 */
    }

    /* セクションタイトル */
    .detail-section h2 {
        font-size: 1.5em;
        /* モバイル向けに調整 */
    }

    .episode-anime-sec {
        max-width: none;
    }

    /* ボタンコンテナ */
    .button-container {
        margin-top: 30px;
        /* モバイル向けに調整 */
    }

    /* 戻るボタンをブロック要素にし、幅を調整 */
    .back-button {
        display: block;
        /* ブロック要素に変更 */
        width: 95%;
        margin: 10px auto;
    }

    /* トレーラーボタンをブロック要素に近く変更 */
    .trailer-button {
        width: 100%;
    }

    /* エピソード公開日を独立した行に表示 */
    .episode-date {
        display: block;
        /* ブロック要素に変更 */
        margin-left: 0;
        margin-top: 5px;
    }

    .ad-section a {
        max-width: 100%;
    }
}