/* フィクション表記 */
.fiction-notice {
    background-color: #222;
    color: #888;
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    line-height: 1.4;
    z-index: 99999;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
}

/* --- 全体設定 --- */
body {
    margin: 0; padding: 0; background-color: #050505; color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex; flex-direction: column; align-items: center;
    height: 100vh; overflow: hidden;
}

header {
    width: 100%; background-color: #002244; padding: 10px 20px;
    box-sizing: border-box; font-size: 14px; display: flex;
    justify-content: space-between; border-bottom: 1px solid #333;
}

/* --- プレイヤーコンテナ --- */
.player-container {
    width: 90%; max-width: 800px; aspect-ratio: 16 / 9;
    background-color: #000; margin-top: 4vh; border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8); position: relative; overflow: hidden;
}

/* ブラウン管（CRT）の走査線オーバーレイ */
.crt-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    z-index: 50; pointer-events: none;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

/* 再生ボタンオーバーレイ */
#playOverlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 60; display: flex;
    justify-content: center; align-items: center; cursor: pointer;
    transition: opacity 1s;
}
.play-btn {
    background: transparent; color: #fff; border: 1px solid #fff;
    padding: 15px 40px; font-size: 16px; letter-spacing: 2px;
    transition: 0.3s;
}
.play-btn:hover { background: rgba(255,255,255,0.1); }

/* --- SMPTEカラーバー --- */
.color-bars {
    width: 100%; height: 100%;
    background: linear-gradient(to right, 
        #c0c0c0 0%, #c0c0c0 14.28%, #c0c000 14.28%, #c0c000 28.56%, 
        #00c0c0 28.56%, #00c0c0 42.84%, #00c000 42.84%, #00c000 57.12%, 
        #c000c0 57.12%, #c000c0 71.4%, #c00000 71.4%, #c00000 85.68%, 
        #0000c0 85.68%, #0000c0 100%);
    position: absolute; top: 0; left: 0; display: flex;
    justify-content: center; align-items: center; z-index: 10;
    transition: opacity 4s ease;
}
.test-text {
    background: #000; color: #fff; padding: 5px 20px;
    font-size: 2vw; letter-spacing: 5px; opacity: 0.8;
}

/* --- NNN臨時放送 --- */
.nnn-broadcast {
    display: none; width: 100%; height: 100%; background-color: #000;
    position: absolute; top: 0; left: 0; z-index: 20;
    font-family: 'Hiragino Mincho ProN', 'MS PMincho', serif;
    text-align: center; flex-direction: column; justify-content: center;
    opacity: 0; transition: opacity 3s ease;
}

.nnn-title { 
    color: #fff; font-size: 2.2vw; letter-spacing: 12px; 
    margin-bottom: 20px; opacity: 0.9; position: relative; z-index: 25;
    transition: opacity 1s;
}

/* 名前スクロールエリア */
.scroll-mask {
    height: 60%; overflow: hidden; position: relative; width: 100%;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.name-list { 
    position: absolute; width: 100%; text-align: center; top: 100%; 
    display: flex; flex-direction: column; align-items: center;
}

/* アニメーション時間を少し延長(22s) */
.scroll-active { animation: scrollUp 22s linear forwards; } 

.name-item { font-size: 1.6vw; color: #777; margin: 18px 0; letter-spacing: 8px; }

/* --- コントローラー --- */
.controls {
    width: 100%; height: 40px; background-color: #111; border-top: 1px solid #333;
    position: absolute; bottom: 0; left: 0; display: flex; align-items: center;
    padding: 0 15px; box-sizing: border-box; font-family: monospace; z-index: 30;
}
.live-badge { background-color: #800; color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 12px; margin-right: 15px; }
.progress-bar { flex-grow: 1; height: 2px; background: #333; margin: 0 15px; position: relative; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; background: #555; width: 0%; transition: width 1s; }

/* 暗転オーバーレイ */
#fadeToBlack {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000; z-index: 45; opacity: 0; pointer-events: none;
    transition: opacity 3s ease;
}

/* リスト自身の高さを基準に確実に画面外までスクロールさせるように修正 */
@keyframes scrollUp { 
    0% { top: 100%; transform: translateY(0); }
    100% { top: 0; transform: translateY(-100%); } 
}

/* === レスポンシブ対応（スマホ修正版） === */
@media screen and (max-width: 768px) {
    body {
        height: 100vh;
        overflow: hidden; 
    }
    header {
        font-size: 12px;
        padding: 8px 12px;
    }
    .player-container {
        width: 100%;
        margin-top: 25vh;
        border-left: none;
        border-right: none;
    }
    .play-btn {
        padding: 12px 25px;
        font-size: 14px;
        -webkit-tap-highlight-color: transparent;
    }
    .test-text { font-size: 5vw; }
    .nnn-title { font-size: 4.5vw; letter-spacing: 2px; margin-bottom: 10px; }
    .name-item { font-size: 4vw; letter-spacing: 3px; margin: 8px 0; }
    .controls { height: 35px; padding: 0 10px; }
    .live-badge { font-size: 10px; padding: 2px 6px; margin-right: 8px; }
    #timecode { font-size: 11px; }
    .fiction-notice { font-size: 10px; padding: 6px 8px; }
}