.entry-title {
    display: none;
}

#subtitleContainer {
    scroll-behavior: smooth;
}


/* .wrap の幅制限を解除 */
div.content-in.wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 動画と字幕サイドバーのラッパー */
#videoSidebarContainer {
    display: flex;
    flex-direction: row;
    gap: 10px;  /* gap を縮める */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================= */
/* PC 用（min-width: 769px）固定サイズ */
/* ============================= */
@media (min-width: 769px) {

    /* 動画エリア：固定サイズ（16:9、1024px × 576px） */
    #videoContainer {
        position: relative;
        width: 1024px;
        height: 576px;
        margin: 0 auto; /* 中央配置 */
        overflow: hidden;
    }

    /* 内部の埋め込み要素に固定サイズ指定 */
    #videoContainer iframe,
    #videoContainer .ytp-cued-thumbnail-overlay,
    #videoContainer .ytp-cued-thumbnail-overlay-image,
    #videoContainer .ytp-large-play-button {
        position: absolute;
        top: 0;
        left: 0;
        width: 1024px !important;
        height: 576px !important;
    }

    /* Flex 設定：動画エリアは固定サイズ扱い */
    #videoSidebarContainer #videoContainer {
        flex: 0 0 auto;
    }

    /* サイドバーエリア：動画エリアに合わせて残りのスペースを使用 */
    #sidebar {
        flex: 1 1 auto;
        max-height: 1000px;
        overflow-y: auto;
    }
}

/* ============================= */
/* モバイル用（max-width: 768px）レスポンシブ対応 */
/* ============================= */
@media (max-width: 768px) {

    /* 動画エリア：横幅 100%、16:9 の比率を維持 */
    #videoContainer {
        position: relative;
        width: 100%;
        height: 0;
        padding-top: 56.25%; /* 16:9 の比率 (9/16 * 100) */
        margin: 0 auto;
        overflow: hidden;
    }

    /* 内部の埋め込み要素はコンテナにフィット */
    #videoContainer iframe,
    #videoContainer .ytp-cued-thumbnail-overlay,
    #videoContainer .ytp-cued-thumbnail-overlay-image,
    #videoContainer .ytp-large-play-button {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
    }

    /* 動画と字幕サイドバーを縦並びに */
    #videoSidebarContainer {
        flex-direction: column;
    }

    /* サイドバー：必要に応じて高さ調整 */
    #subtitleContainer {
        height: 300px;
    }
}

/* 字幕テーブル周り */
#subtitleContainer {
    border: 1px solid #ccc;
    padding: 10px;
}

#subtitleTable {
    width: 100%;
    border-collapse: collapse;
}

#subtitleTable thead th {
    background-color: #f8f8f8;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

#subtitleTable tbody td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

/* ハイライト */
#subtitleTable tbody tr.highlight {
    background-color: #ffccf9 !important;
    color: #5e3a87;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 動画コントロール領域 */
#videoControls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    z-index: 999;
}

#videoControls button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* 自動スクロールボタン */
#autoScrollButton.on {
    background-color: #28a745;
}
#autoScrollButton.off {
    background-color: #dc3545;
}
#autoScrollButton:hover {
    opacity: 0.9;
}

/* 統合再生／停止ボタン */
#playPauseButton.paused {
    background-color: #0073aa;
}
#playPauseButton.playing {
    background-color: #555;
}
#playPauseButton:hover {
    opacity: 0.9;
}

/* モバイル用：字幕テーブルフォントサイズ調整等は上記の max-width:768px 内で設定済み */
@media (max-width: 768px) {
    #subtitleTable thead th {
        font-size: 14px;
        padding: 6px;
    }
    #subtitleTable tbody td {
        font-size: 14px;
        padding: 6px;
    }
    #videoControls {
        padding: 15px 20px;
    }
    #videoControls button {
        padding: 12px 25px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    /* ...既存の設定... */

    /* サイドバー：必要に応じて高さ調整 */
    #subtitleContainer {
        height: 300px;
        overflow-y: auto; /* これを追加 */
    }
}
