/*
Theme Name: Repdiz TV
Theme URI: https://repdiz.tv/
Author: Cihan 
Description: Nostaljik Türk dizileri sosyal medya platformu — retro TV teması.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: repdiz
*/

:root {
    --signal-blue: #0000aa;
    --phosphor-white: #e0e0ff;
    --phosphor-glow: 0 0 10px rgba(224, 224, 255, 0.7), 0 0 2px rgba(224, 224, 255, 0.5);
    --trt-wood: #3e2723;
    --trt-wood-light: #5d4037;
    --trt-amber: #ffb300;
    --trt-cream: #d7ccc8;
    --plastic-dark: #1a1a1a;
    --plastic-grey: #2c2c2c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #050510;
    font-family: 'VT323', monospace;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--phosphor-white);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ─── Room ──────────────────────────────── */
.room-ambience {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #151525 0%, #000 90%);
    z-index: -1;
}

/* ─── TV Set ────────────────────────────── */
.tv-set {
    position: relative;
    width: 1200px;
    height: 95vh;
    max-height: 950px;
    background: var(--trt-wood);
    border-radius: 30px;
    padding: 15px 20px;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.8),
        0 0 0 4px #2a1a15,
        0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    border: 4px solid #2a1a15;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
}

/* ─── TV Header ─────────────────────────── */
.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
    gap: 15px;
}

.brand-badge {
    font-size: 22px;
    color: #dcbfa5;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: bold;
    background: #2a1a15;
    padding: 4px 12px;
    border: 2px solid #1a1a1a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    text-decoration: none;
    white-space: nowrap;
}

.tv-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ─── Retro OSD Animation (XP Gains) ─── */
#retro-osd-container {
    position: absolute;
    top: 60px;
    left: 40px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.retro-osd-msg {
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 36px;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    animation: osdFlicker 0.1s infinite alternate, osdFadeOut 4s forwards;
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: 1;
}

@keyframes osdFlicker {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

@keyframes osdFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    80% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* ──────────────────────────────────── */

.nav-link {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--phosphor-white);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.nav-link:hover,
.nav-link.active {
    border-color: var(--trt-amber);
    color: var(--trt-amber);
    text-shadow: 0 0 8px var(--trt-amber);
}

/* ─── Custom Page Backgrounds ───────────── */
body.single-dizi .room-ambience,
body.author .room-ambience {
    background: radial-gradient(circle at 50% 50%, #001f3f 0%, #000 90%);
    /* Deep blue */
}

/* ─── Cinema Mode ───────────────────────── */
body.cinema-active {
    background: #000 !important;
}

body.cinema-active .room-ambience {
    background: #000 !important;
    z-index: 10;
}

body.cinema-active .tv-set {
    background: #020202 !important;
    background-image: none !important;
    box-shadow: 0 0 0 4px #000 !important;
    border-color: #000 !important;
    z-index: 20;
}

body.cinema-active .controls-panel,
body.cinema-active .tv-header {
    opacity: 0.05;
    transition: opacity 0.5s ease;
}

body.cinema-active .controls-panel:hover,
body.cinema-active .tv-header:hover {
    opacity: 1;
}

/* ─── Live TV Background (Homepage) ─────── */
.live-tv-bg {
    position: absolute;
    top: -30px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 60px);
    z-index: 1;
    /* Behind screen content */
    pointer-events: none;
    opacity: 1;
    /* Default to fully visible */
    overflow: hidden;
    border-radius: inherit;
}

body.home .live-tv-bg,
body.archive .live-tv-bg,
body.search .live-tv-bg,
body.author .live-tv-bg {
    display: none;
}

body.archive .crt-screen,
body.search .crt-screen,
body.author .crt-screen {
    background: radial-gradient(circle at 50% 50%, #001f3f 0%, #000 90%);
}

.live-tv-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 135%;
    height: 135%;
    /* 16:9 Aspect Ratio logic is handled by container percentages here */
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.live-tv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(transparent 0%,
            rgba(0, 0, 0, 0.6) 100%);
}

body.home .live-tv-overlay {
    background: var(--signal-blue);
}

/* For homepage, make main content clear */
body.home .screen-content {
    background: transparent;
    z-index: 5;
    /* Above bg */
}

body.home .dizi-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

body.home .replik-card {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}

.speaker-grill {
    width: 150px;
    height: 24px;
    background-image: radial-gradient(#1a1a1a 40%, transparent 40%);
    background-size: 8px 8px;
    flex-shrink: 0;
}

/* ─── CRT Bezel / Screen ───────────────── */
.crt-bezel {
    flex-grow: 1;
    background: #111;
    border-radius: 60px / 50px;
    padding: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 1);
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #333;
    min-height: 0;
}

.crt-screen {
    width: 100%;
    height: 100%;
    background-color: var(--signal-blue);
    border-radius: 40px / 30px;
    position: relative;
    z-index: 0;
    overflow: hidden;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7);
    transform: perspective(2000px) rotateX(1deg);
}

/* ─── CRT Glass Glare / Reflection ──────── (Kaldırıldı) */


/* ─── Glitch / Channel Switch ───────────── */
.glitch-active .crt-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 4px);
    animation: glitchFlash 0.15s linear 3;
    z-index: 50;
    pointer-events: none;
}

@keyframes glitchFlash {
    0% {
        opacity: 1;
        transform: translateX(-2px) skewX(-1deg);
    }

    25% {
        opacity: 0.7;
        transform: translateX(3px) skewX(1deg);
    }

    50% {
        opacity: 1;
        transform: translateX(-1px) skewX(0deg);
    }

    75% {
        opacity: 0.5;
        transform: translateX(2px) skewX(-0.5deg);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─── Dial Grab Cursor ──────────────────── */
.dial {
    cursor: grab;
}

.dial:active {
    cursor: grabbing;
}

/* ─── Spoiler Checkbox ──────────────────── */
.spoiler-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ff4444;
    font-family: 'VT323', monospace;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.spoiler-check input {
    cursor: pointer;
    accent-color: #ff4444;
}

/* ─── CRT Effects ───────────────────────── */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
}

.flicker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0;
    z-index: 11;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

.static-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    z-index: 9;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.scan-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    position: absolute;
    z-index: 12;
    animation: scan 6s linear infinite;
    opacity: 0.3;
}

/* ─── OSD ───────────────────────────────── */
.osd-layer {
    position: absolute;
    bottom: 40px;
    left: 30px;
    z-index: 5;
    text-shadow: var(--phosphor-glow);
    font-size: 28px;
    text-transform: uppercase;
}

.channel-indicator {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 28px;
    color: var(--trt-amber);
    text-shadow: 0 0 8px var(--trt-amber);
    z-index: 20;
}

/* ─── Screen Content (Scrollable) ───────── */
.screen-content {
    position: relative;
    z-index: 4;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 60px 30px 50px 30px;
    scrollbar-width: thin;
    scrollbar-color: var(--trt-amber) transparent;
}

.screen-content::-webkit-scrollbar {
    width: 6px;
}

.screen-content::-webkit-scrollbar-track {
    background: transparent;
}

.screen-content::-webkit-scrollbar-thumb {
    background: var(--trt-amber);
    border-radius: 3px;
}

.section-title {
    font-size: 20px;
    color: var(--trt-amber);
    text-shadow: 0 0 8px var(--trt-amber);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ─── Dizi Grid ─────────────────────────── */
.dizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.dizi-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(224, 224, 255, 0.2);
    padding: 16px;
    text-decoration: none;
    color: var(--phosphor-white);
    transition: all 0.15s;
    cursor: pointer;
    display: block;
}

.dizi-card:hover {
    background: rgba(20, 20, 20, 0.8);
    border-color: var(--trt-amber);
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.3);
    transform: translateY(-2px);
}

.dizi-card-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(224, 224, 255, 0.1);
}

.dizi-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.8) contrast(1.1);
    transition: all 0.3s;
}

.dizi-card:hover .dizi-card-thumb img {
    filter: saturate(1) contrast(1.2);
    transform: scale(1.05);
}

.dizi-card-title {
    font-size: 24px;
    margin-bottom: 6px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.dizi-card-meta {
    font-size: 16px;
    color: var(--trt-cream);
    margin-bottom: 8px;
}

.dizi-card-stats {
    font-size: 14px;
    color: var(--trt-amber);
}

/* ─── Dizi Hero ─────────────────────────── */
.dizi-hero {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.series-logo {
    font-size: 52px;
    margin: 0 0 10px 0;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5), var(--phosphor-glow);
    line-height: 1;
}

.series-meta {
    font-size: 22px;
    margin: 0 0 15px 0;
    color: var(--trt-cream);
}

.dizi-description {
    font-size: 18px;
    color: rgba(224, 224, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* ─── Replik Feed ───────────────────────── */
.replik-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.replik-card {
    background: rgba(0, 0, 60, 0.5);
    border: 1px solid rgba(224, 224, 255, 0.15);
    padding: 14px 16px;
    transition: all 0.15s;
}

.replik-card:hover {
    border-color: rgba(224, 224, 255, 0.35);
    background: rgba(0, 0, 80, 0.6);
}

.replik-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.replik-avatar {
    width: 28px;
    height: 28px;
    background: var(--trt-amber);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.replik-author {
    font-size: 14px;
    color: var(--trt-amber);
    letter-spacing: 1px;
}

.replik-dizi-tag {
    font-size: 13px;
    color: var(--trt-cream);
    text-decoration: none;
    opacity: 0.7;
}

.replik-dizi-tag:hover {
    opacity: 1;
    color: var(--trt-amber);
}

.replik-date {
    margin-left: auto;
    font-size: 14px;
    color: rgba(224, 224, 255, 0.4);
    flex-shrink: 0;
}

.replik-karakter {
    font-size: 13px;
    color: var(--trt-cream);
    margin-bottom: 4px;
    opacity: 0.8;
}

.replik-text {
    font-size: 18px;
    line-height: 1.3;
    color: var(--phosphor-white);
    text-shadow: var(--phosphor-glow);
    margin-bottom: 8px;
    font-style: italic;
}

.replik-gif {
    margin-bottom: 8px;
    border: 1px solid rgba(224, 224, 255, 0.1);
    overflow: hidden;
    max-width: 300px;
}

.replik-gif img {
    width: 100%;
    display: block;
}

.replik-actions {
    display: flex;
    gap: 12px;
}

/* ─── Like Button ───────────────────────── */
.like-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 255, 0.2);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 4px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.like-btn:hover {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.like-btn.liked {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.15);
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.4);
}

@keyframes like-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.like-btn.pop .like-icon {
    animation: like-pop 0.3s ease;
}

/* ─── Replik Form ───────────────────────── */
.replik-form-container {
    background: rgba(0, 0, 40, 0.5);
    border: 1px dashed rgba(224, 224, 255, 0.3);
    padding: 12px;
    margin-bottom: 15px;
}

.replik-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    width: 100%;
}

.retro-input {
    background: rgba(0, 0, 60, 0.6);
    border: 1px solid rgba(224, 224, 255, 0.3);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 6px 10px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}

.retro-input:focus {
    border-color: var(--trt-amber);
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.3);
}

.retro-input::placeholder {
    color: rgba(224, 224, 255, 0.3);
}

.retro-textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.gif-btn {
    border-color: #9c27b0;
    color: #ce93d8;
}

.gif-btn:hover {
    background: #9c27b0;
    color: #fff;
}

.submit-btn {
    border-color: var(--trt-amber);
    color: var(--trt-amber);
}

.submit-btn:hover {
    background: var(--trt-amber);
    color: #000;
}

.gif-preview {
    position: relative;
    max-width: 200px;
    border: 1px solid rgba(224, 224, 255, 0.2);
}

.gif-preview img {
    width: 100%;
    display: block;
}

.gif-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-prompt {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px dashed rgba(224, 224, 255, 0.2);
}

/* ─── GIF Modal ─────────────────────────── */
.gif-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gif-modal-content {
    background: #111;
    border: 2px solid var(--trt-amber);
    padding: 20px;
    width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    font-family: 'VT323', monospace;
    color: var(--phosphor-white);
}

.gif-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 22px;
    color: var(--trt-amber);
}

.gif-modal-close {
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    font-family: 'VT323', monospace;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gif-grid-item {
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    transition: border-color 0.15s;
}

.gif-grid-item:hover {
    border-color: var(--trt-amber);
}

.gif-grid-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

/* ─── Empty State ───────────────────────── */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: rgba(224, 224, 255, 0.5);
    font-size: 20px;
    grid-column: 1 / -1;
}

/* ─── Controls Panel ────────────────────── */
.controls-panel {
    background: #222;
    min-height: 100px;
    height: auto;
    margin-top: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 15px 30px;
    gap: 30px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    flex-shrink: 0;
}

.share-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-right: 1px dashed #444;
    padding-right: 20px;
}

.share-icons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 38px;
    height: 38px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-family: 'Verdana', sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 2px 0 #111;
    transition: all 0.1s;
}

.share-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 0 #111;
}

.share-btn.share-x:hover {
    background: #000;
    color: #fff;
    border-color: #555;
}

.share-btn.share-wa:hover {
    background: #25D366;
    color: #fff;
    border-color: #128C7E;
}

.dial-container {
    position: relative;
    width: 65px;
    height: 65px;
}

.dial {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 50%;
    border: 4px solid #333;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dial::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 16px;
    background: var(--trt-amber);
    border-radius: 3px;
    box-shadow: 0 0 5px var(--trt-amber);
}

.dial-label {
    position: absolute;
    bottom: -22px;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #888;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 60px);
    justify-content: center;
    gap: 8px;
}

.hard-button {
    width: 60px;
    height: 28px;
    box-sizing: border-box;
    background: #444;
    border: none;
    border-radius: 2px;
    color: #aaa;
    font-family: 'VT323';
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0 #222;
    transition: all 0.1s;
    text-decoration: none;
}

.hard-button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #222;
}

.user-panel {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #111;
    padding: 6px 12px;
    border: 1px solid #333;
    line-height: 1.3;
    min-width: 175px;
}

.user-panel div {
    white-space: nowrap;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--trt-amber);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-size: 14px;
}

/* ─── Retro Buttons ─────────────────────── */
.retro-btn {
    background: transparent;
    border: 2px solid var(--phosphor-white);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 4px 14px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--phosphor-glow);
    transition: all 0.1s;
    text-decoration: none;
}

.retro-btn:hover {
    background: var(--phosphor-white);
    color: var(--signal-blue);
}

.retro-btn.active {
    background: var(--trt-amber);
    border-color: var(--trt-amber);
    color: #000;
    box-shadow: 0 0 15px var(--trt-amber);
}

/* ─── Marquee ───────────────────────────── */
.marquee-container {
    position: absolute;
    bottom: -40px;
    /* Hide below screen initially */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 100, 0.5);
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    z-index: 6;
    transition: bottom 0.5s ease;
}

.marquee-container.active {
    bottom: 16px;
    /* Slide up when active */
}

.marquee-content {
    display: inline-block;
    font-size: 18px;
    transform: translateX(100%);
}

.marquee-content.run-marquee {
    animation: marquee 20s linear forwards;
}

/* ─── Animations ────────────────────────── */
@keyframes flicker {
    0% {
        opacity: 0.02;
    }

    5% {
        opacity: 0.05;
    }

    10% {
        opacity: 0.01;
    }

    15% {
        opacity: 0.06;
    }

    100% {
        opacity: 0.02;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@keyframes turn-off {
    0% {
        transform: scale(1, 1.3) translate3d(0, 0, 0);
        filter: brightness(1);
    }

    60% {
        transform: scale(1, 0.001) translate3d(0, 0, 0);
        filter: brightness(10);
    }

    100% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: scale(0, 0.0001) translate3d(0, 0, 0);
        filter: brightness(0);
    }
}

@keyframes turn-on {
    0% {
        transform: scale(1, 0.8) translate3d(0, 0, 0) translateY(100%);
        filter: brightness(30);
        opacity: 1;
    }

    3.5% {
        transform: scale(1, 0.8) translate3d(0, 100%, 0);
    }

    3.6% {
        transform: scale(1, 0.8) translate3d(0, -100%, 0);
        opacity: 1;
    }

    9% {
        transform: scale(1.3, 0.6) translate3d(0, 100%, 0);
        filter: brightness(30);
        opacity: 0;
    }

    11% {
        transform: scale(1, 1) translate3d(0, 0, 0);
        filter: brightness(0);
        opacity: 0;
    }

    100% {
        transform: scale(1, 1) translate3d(0, 0, 0);
        filter: brightness(1);
        opacity: 1;
    }
}

/* ─── Glitch ────────────────────────────── */
.glitch-active .crt-screen {
    background: #111;
}

.glitch-active .main-content,
.glitch-active .screen-content {
    display: none;
}

.glitch-active .static-noise {
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ─── Toast Notification ────────────────── */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111;
    border: 2px solid var(--trt-amber);
    color: var(--trt-amber);
    font-family: 'VT323', monospace;
    font-size: 20px;
    padding: 10px 24px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ─── Teletext ──────────────────────────── */
.teleteks-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 8;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 30px;
    scrollbar-width: thin;
    scrollbar-color: #00ff00 transparent;
}

.teleteks-overlay::-webkit-scrollbar {
    width: 4px;
}

.teleteks-overlay::-webkit-scrollbar-thumb {
    background: #00ff00;
}

.teleteks-content {
    font-family: 'VT323', monospace;
    font-size: 20px;
    line-height: 1.5;
    color: #fff;
}

.teleteks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    background: #00f;
    padding: 6px 12px;
    margin-bottom: 8px;
}

.teleteks-page-num {
    color: #ff0;
    font-size: 24px;
}

.teleteks-title {
    color: #fff;
    font-size: 24px;
    letter-spacing: 2px;
}

.teleteks-date {
    color: #0ff;
    font-size: 18px;
}

.teleteks-divider {
    color: #00f;
    font-size: 16px;
    line-height: 1;
    margin: 8px 0;
    overflow: hidden;
    white-space: nowrap;
}

.teleteks-section {
    margin-bottom: 10px;
}

.teleteks-section-title {
    color: #0f0;
    font-size: 22px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.teleteks-table {
    width: 100%;
    border-collapse: collapse;
}

.teleteks-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.teleteks-label {
    color: #ff0;
    font-size: 18px;
    padding: 3px 12px 3px 0;
    width: 120px;
    vertical-align: top;
    white-space: nowrap;
}

.teleteks-value {
    color: #fff;
    font-size: 20px;
    padding: 3px 0;
}

.teleteks-cyan {
    color: #0ff;
}

.teleteks-yellow {
    color: #ff0;
}

.teleteks-green {
    color: #0f0;
}

.teleteks-cast {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.teleteks-cast-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 2px 0;
}

.teleteks-cast-num {
    color: #ff0;
    font-size: 18px;
    width: 30px;
    flex-shrink: 0;
}

.teleteks-cast-actor {
    color: #0ff;
    font-size: 20px;
}

.teleteks-cast-sep {
    color: #0f0;
    font-size: 14px;
}

.teleteks-cast-role {
    color: #fff;
    font-size: 18px;
    opacity: 0.8;
}

.teleteks-konu {
    color: #fff;
    font-size: 20px;
    line-height: 1.5;
    opacity: 0.9;
}

.teleteks-footer {
    display: flex;
    justify-content: space-between;
    background: #00f;
    padding: 6px 12px;
    margin-top: 8px;
    font-size: 16px;
}

.teleteks-footer span:first-child {
    color: #ff0;
}

.teleteks-footer span:last-child {
    color: #0ff;
}

.txt-button {
    background: #0a0 !important;
    color: #fff !important;
    font-weight: bold;
}

.txt-button.active {
    background: #0f0 !important;
    color: #000 !important;
    box-shadow: 0 0 10px #0f0;
}

/* ─── Spoiler Filter ────────────────────── */
.spoiler-hidden {
    position: relative;
    cursor: pointer;
    filter: blur(8px);
    user-select: none;
    transition: filter 0.3s;
}

.spoiler-hidden::after {
    content: '🔒 SPOILER — TIKLA';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 4px 16px;
    z-index: 2;
    filter: none;
}

.spoiler-revealed {
    filter: none;
    cursor: default;
}

.spoiler-revealed::after {
    display: none;
}

/* ─── Share / Verify Buttons ────────────── */
.share-btn,
.verify-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 255, 0.2);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.share-btn {
    color: var(--trt-amber);
    border-color: rgba(255, 179, 0, 0.4);
    background: rgba(255, 179, 0, 0.1);
}

.share-btn:hover {
    background: rgba(255, 179, 0, 0.3);
    border-color: var(--trt-amber);
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.3);
}

.verify-btn:hover {
    border-color: #0f0;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.verify-bar {
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(224, 224, 255, 0.15);
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.verify-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0f0, #0a0);
    transition: width 0.3s;
}

.verify-pct {
    font-size: 13px;
    color: #0f0;
    margin-left: 4px;
}

/* ─── Random Replik Modal ───────────────── */
.random-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.random-modal-content {
    background: var(--signal-blue);
    border: 3px solid var(--trt-amber);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 179, 0, 0.3);
    position: relative;
}

.random-modal-badge {
    background: var(--trt-amber);
    color: #000;
    display: inline-block;
    padding: 4px 16px;
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.random-modal-dizi {
    font-size: 18px;
    color: var(--trt-amber);
    margin-bottom: 10px;
}

.random-modal-text {
    font-size: 28px;
    color: var(--phosphor-white);
    text-shadow: var(--phosphor-glow);
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* ─── Leaderboard Modal ─────────────────── */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-bottom: 1px dotted var(--trt-amber);
    transition: background 0.2s;
}

.leaderboard-item:hover {
    background: rgba(255, 179, 0, 0.1);
}

.lb-rank {
    width: 40px;
    font-size: 20px;
    color: var(--trt-amber);
    font-weight: bold;
}

.lb-user {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lb-name {
    font-size: 22px;
    color: var(--phosphor-white);
}

.lb-level {
    font-size: 16px;
    color: #888;
}

.lb-xp {
    font-size: 20px;
    color: #0f0;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.random-modal-char {
    font-size: 18px;
    color: var(--trt-cream);
}

/* ─── User Level Badge ──────────────────── */
.user-level {
    font-size: 12px;
    color: #0f0;
    margin-top: 2px;
}

/* ─── Button Grid 3-col ─────────────────── */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    justify-content: center;
    gap: 6px;
}

/* ─── Mobile Responsive ─────────────────── */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        align-items: flex-start;
    }

    .room-ambience {
        display: none;
    }

    .tv-set {
        width: 100%;
        min-height: 100vh;
        height: auto;
        max-height: none;
        border-radius: 0;
        border: none;
        padding: 0;
        box-shadow: none;
        background-image: none;
        background: var(--signal-blue);
        display: flex;
        flex-direction: column;
    }

    .tv-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: rgba(0, 0, 0, 0.9);
        padding: 8px 12px;
        margin: 0;
        border-bottom: 2px solid var(--trt-amber);
    }

    .brand-badge {
        font-size: 16px;
        letter-spacing: 2px;
        padding: 2px 8px;
    }

    .speaker-grill {
        display: none;
    }

    .nav-link {
        font-size: 14px;
        padding: 2px 6px;
    }

    .crt-bezel {
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        margin-top: 50px;
        width: 100%;
    }

    .crt-screen {
        border-radius: 0;
        transform: none;
        box-shadow: none;
        width: 100%;
        aspect-ratio: 16 / 10;
        min-height: 250px;
        height: auto;
    }

    .screen-content {
        padding: 10px 12px 140px 12px;
    }

    /* Effects stay enabled on mobile now */

    .controls-panel {
        position: fixed;
        bottom: 40px;
        /* Above the chat ticker */
        left: 0;
        right: 0;
        z-index: 100;
        height: auto;
        padding: 8px 12px;
        gap: 15px;
        border-radius: 0;
        margin: 0;
        border-top: 2px solid var(--trt-amber);
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        background: rgba(34, 34, 34, 0.95);
        backdrop-filter: blur(5px);
    }

    .controls-panel>* {
        flex-shrink: 0;
    }

    .dial-container {
        width: 45px;
        height: 45px;
    }

    .dial-label {
        font-size: 11px;
        bottom: -18px;
    }

    .hard-button {
        width: 45px;
        height: 26px;
        font-size: 12px;
    }

    .button-grid {
        gap: 4px;
        grid-template-columns: repeat(3, 45px);
    }

    .user-panel {
        padding: 6px 10px;
        gap: 8px;
    }

    /* Make Google Login and User Info smaller to save space */
    .nsl-container {
        transform: scale(0.85);
        transform-origin: left center;
        margin: 0 !important;
    }

    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .dizi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .series-logo {
        font-size: 36px;
    }

    .series-meta {
        font-size: 18px;
    }

    .section-title {
        font-size: 20px;
    }

    .osd-layer {
        font-size: 20px;
        bottom: 20px;
        left: 15px;
    }

    .channel-indicator {
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .marquee-container {
        bottom: 0;
    }

    /* Chat Ticker layout - En altta sürekli akan sohbet */
    .global-chat-container {
        width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        height: 40px;
        z-index: 105;
        border: none;
        border-top: 1px solid var(--trt-amber);
        border-radius: 0;
        background: rgba(0, 0, 0, 1);
        display: flex;
        align-items: center;
        padding: 0;
        box-shadow: none;
        position: fixed;
    }

    .chat-header,
    .chat-resize-handle,
    .chat-command-hints {
        display: none !important;
    }

    .chat-messages {
        height: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 10px;
        scrollbar-width: none;
        flex-grow: 1;
        margin: 0;
    }

    .chat-messages::-webkit-scrollbar {
        display: none;
    }

    .chat-message {
        display: inline-block;
        margin-right: 20px;
        margin-bottom: 0 !important;
        font-size: 14px;
    }

    .chat-input-form {
        height: 100%;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0 5px;
        background: #111;
        flex-shrink: 0;
        border-left: 1px solid #333;
        position: static;
    }

    #chat-input {
        width: 100px !important;
        height: 28px;
        font-size: 14px;
        padding: 2px 5px;
    }

    #chat-submit-btn,
    .chat-gif-btn {
        height: 28px;
        padding: 0 6px !important;
        font-size: 12px !important;
        line-height: 28px;
    }

    .replik-form-container {
        padding: 10px;
    }

    .retro-input {
        font-size: 16px;
        padding: 6px 10px;
    }

    .retro-btn {
        font-size: 16px;
        padding: 4px 12px;
    }

    .replik-gif img {
        max-height: 120px;
        width: auto;
    }

    .teleteks-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        padding: 15px 12px 100px 12px;
        background: #000;
    }

    .teleteks-content {
        font-size: 16px;
    }

    .teleteks-header {
        flex-wrap: wrap;
        gap: 4px;
    }

    .gif-modal-content {
        width: 95%;
        max-height: 80vh;
    }

    .random-modal-content {
        padding: 20px;
    }

    .random-modal-text {
        font-size: 22px;
    }
}

/* ─── Kapışma Arena ─────────────────────── */
.kapisma-section {
    margin: 20px 0;
    border: 2px solid var(--trt-amber);
    padding: 16px;
    background: rgba(0, 0, 60, 0.5);
}

.kapisma-title {
    font-size: 22px;
    color: var(--trt-cream);
    margin-bottom: 12px;
    text-align: center;
}

.kapisma-arena {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.kapisma-side {
    flex: 1;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(224, 224, 255, 0.15);
    text-align: center;
}

.kapisma-side:hover {
    background: rgba(255, 179, 0, 0.1);
    border-color: var(--trt-amber);
}

.kapisma-side.voted {
    cursor: default;
    opacity: 0.85;
}

.kapisma-a {
    border-right: none;
}

.kapisma-b {
    border-left: none;
}

.kapisma-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ff4444;
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.5);
    background: rgba(255, 0, 0, 0.1);
    padding: 0 14px;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.kapisma-label {
    font-size: 18px;
    color: var(--phosphor-white);
    margin-bottom: 6px;
}

.kapisma-desc {
    font-size: 14px;
    color: var(--trt-cream);
    opacity: 0.7;
    margin-bottom: 8px;
}

.kapisma-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(224, 224, 255, 0.15);
    overflow: hidden;
    margin-bottom: 4px;
}

.kapisma-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--trt-amber), #ff6600);
    transition: width 0.5s;
}

.kapisma-pct {
    font-size: 14px;
    color: var(--trt-amber);
}

/* ─── Quiz Banner ───────────────────────── */
.quiz-banner {
    margin: 15px 0;
    text-align: center;
}

.quiz-banner-link {
    display: block;
    padding: 12px;
    border: 2px dashed var(--trt-amber);
    color: var(--trt-amber);
    font-size: 20px;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.2s;
    animation: quizPulse 3s ease-in-out infinite;
}

.quiz-banner-link:hover {
    background: rgba(255, 179, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.3);
}

@keyframes quizPulse {

    0%,
    100% {
        border-color: var(--trt-amber);
    }

    50% {
        border-color: #ff6600;
        text-shadow: 0 0 8px var(--trt-amber);
    }
}

/* ─── Quiz Page ─────────────────────────── */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.quiz-subtitle {
    font-size: 18px;
    color: var(--trt-cream);
    margin-bottom: 20px;
    opacity: 0.8;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.3s;
}

.quiz-step.active {
    display: block;
}

.quiz-step.done {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-q {
    font-size: 24px;
    color: var(--phosphor-white);
    text-shadow: var(--phosphor-glow);
    margin-bottom: 16px;
    line-height: 1.3;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-opt {
    background: rgba(0, 0, 80, 0.6);
    border: 1px solid rgba(224, 224, 255, 0.2);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.quiz-opt:hover {
    background: rgba(0, 0, 120, 0.8);
    border-color: var(--trt-amber);
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.3);
}

.quiz-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.quiz-dot {
    width: 12px;
    height: 12px;
    border: 1px solid var(--trt-amber);
    background: transparent;
    transition: all 0.3s;
}

.quiz-dot.active {
    background: var(--trt-amber);
    box-shadow: 0 0 6px var(--trt-amber);
}

.quiz-dot.done {
    background: #0f0;
    border-color: #0f0;
}

.quiz-result {
    text-align: center;
    animation: fadeIn 0.5s;
}

.quiz-result-emoji {
    font-size: 64px;
    margin-bottom: 10px;
}

.quiz-result-name {
    font-size: 36px;
    color: var(--trt-amber);
    text-shadow: 0 0 12px var(--trt-amber);
    margin-bottom: 8px;
}

.quiz-result-dizi {
    font-size: 20px;
    color: #0ff;
    margin-bottom: 10px;
}

.quiz-result-desc {
    font-size: 18px;
    color: var(--trt-cream);
    line-height: 1.4;
    opacity: 0.9;
}

/* ─── Badges ────────────────────────────── */
.user-badges {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

.badge-icon {
    font-size: 16px;
    cursor: help;
    filter: drop-shadow(0 0 4px rgba(255, 179, 0, 0.5));
    transition: transform 0.15s;
}

.badge-icon:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 0 8px rgba(255, 179, 0, 0.8));
}

/* ─── Rank Badges ────────────────────────── */
.rank-badge {
    display: inline-block;
    margin-right: 4px;
    font-size: 1.1em;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.rank-yapimci {
    filter: drop-shadow(0 0 5px #00ffff);
}

.rank-senarist {
    filter: drop-shadow(0 0 5px #00ff00);
}

.rank-basrol {
    filter: drop-shadow(0 0 5px #ffff00);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.filter-btn {
    background: rgba(0, 0, 80, 0.6);
    border: 1px solid rgba(224, 224, 255, 0.2);
    color: var(--trt-cream);
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(255, 179, 0, 0.15);
    border-color: var(--trt-amber);
    color: var(--trt-amber);
}

/* ─── Dizi Channel Layout ──────────────── */
.screen-content.has-live-bg {
    background: transparent;
    padding: 0;
}

.channel-layout {
    display: flex;
    height: 100%;
}

.footer-toggle-btn {
    font-size: 16px;
    padding: 4px 12px;
    margin-right: 20px;
    /* other styles are inherited from .retro-btn for a unified look */
}

.footer-toggle-btn:hover {
    transform: scale(1.05);
}

/* ─── Volume OSD (On-Screen Display) ───── */
.volume-osd-container {
    position: absolute;
    bottom: 80px;
    left: 20px;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.volume-osd-container.active {
    opacity: 1;
}

.volume-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    color: var(--phosphor-green);
    font-size: 18px;
    font-weight: bold;
    text-shadow: var(--phosphor-glow);
    margin-bottom: 5px;
}

.volume-bars {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
}

.vol-bar {
    width: 25px;
    height: 8px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.vol-bar.fill {
    background: var(--phosphor-green);
    border-color: #fff;
    box-shadow: var(--phosphor-glow);
}

/* ─── Brightness OSD (On-Screen Display) ───── */
.brightness-osd-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.brightness-osd-container.active {
    opacity: 1;
}

.brightness-label {
    color: var(--trt-amber);
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 5px var(--trt-amber);
}

.brightness-bars {
    display: flex;
    gap: 4px;
}

.bri-bar {
    width: 20px;
    height: 8px;
    background: rgba(255, 179, 0, 0.2);
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.bri-bar.fill {
    background: var(--trt-amber);
    border-color: #fff;
    box-shadow: 0 0 5px var(--trt-amber);
}

.channel-sidebar {
    width: 450px;
    max-width: 100%;
    background: rgba(0, 0, 40, 0.85);
    /* Dark background for readability */
    backdrop-filter: blur(8px);
    border-right: 2px solid rgba(224, 224, 255, 0.2);
    overflow-y: auto;
    padding: 20px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.channel-main-video {
    flex: 1;
    position: relative;
    /* Keeps area clear for YouTube iframe underneath */
}

/* Adjustments for sidebar content */
.channel-sidebar .dizi-hero {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(224, 224, 255, 0.2);
}

.channel-sidebar .series-logo {
    font-size: 32px;
}

.channel-sidebar .replik-card {
    background: rgba(255, 255, 255, 0.03);
}

/* Responsive sidebar */
@media (max-width: 900px) {
    .channel-layout {
        flex-direction: column-reverse;
        /* Video on top, chat below */
    }

    .channel-sidebar {
        width: 100%;
        height: 50%;
        border-right: none;
        border-top: 2px solid rgba(224, 224, 255, 0.2);
    }

    .channel-main-video {
        height: 50%;
        min-height: 250px;
    }
}

/* ─── TV Boot Sequence (Intro) ──────── */
.tv-boot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* transition for fading out at the end */
    transition: opacity 1s ease-in-out, visibility 1s;
}

.tv-boot-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-click-area {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.boot-prompt-text {
    font-size: 24px;
    color: var(--phosphor-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    font-family: 'VT323', monospace;
}

.blink-text {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.boot-dot {
    position: absolute;
    width: 0;
    height: 0;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px 10px #fff;
    opacity: 0;
}

.boot-line {
    position: absolute;
    width: 0;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    opacity: 0;
}

.boot-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.1) 4px);
    background-size: 100% 4px;
    opacity: 0;
    background-color: #111;
}

.boot-replik {
    position: absolute;
    z-index: 5;
    color: var(--phosphor-white);
    font-size: 32px;
    text-align: center;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 20px #fff;
    max-width: 80%;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s, transform 0.5s;
}

.boot-replik.show {
    opacity: 1;
    transform: scale(1);
}

/* Animations injected by JS */
.anim-dot {
    animation: bootDot 0.5s ease-out forwards;
}

.anim-line {
    animation: bootLine 0.3s ease-out forwards;
}

.anim-static {
    animation: bootStatic 0.1s steps(2, end) infinite;
    opacity: 0.8 !important;
}

@keyframes bootDot {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    50% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }

    100% {
        width: 4px;
        height: 4px;
        opacity: 1;
    }
}

@keyframes bootLine {
    0% {
        width: 4px;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 1;
    }
}

@keyframes bootStatic {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 4px;
    }
}

/* ─── Global Chat ───────────────────────────────────────── */
.global-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    height: 320px;
    min-height: 200px;
    max-height: 90vh;
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid var(--trt-wood-light);
    box-shadow: 0 0 15px rgba(93, 64, 55, 0.4);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    font-family: 'VT323', monospace;
    overflow: hidden;
}

.global-chat-container.minimized {
    transform: translateY(calc(100% - 40px));
}

.chat-resize-handle {
    width: 100%;
    height: 6px;
    cursor: ns-resize;
    background: linear-gradient(to right, transparent 30%, var(--trt-wood-light) 50%, transparent 70%);
    flex-shrink: 0;
}

.chat-input-form input {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.chat-header {
    background: var(--trt-wood);
    color: var(--phosphor-white);
    padding: 8px 12px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.chat-toggle-btn {
    background: transparent;
    border: none;
    color: var(--phosphor-white);
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--trt-wood-light);
    border-radius: 3px;
}

.chat-msg {
    word-break: break-word;
    border-bottom: 1px dotted rgba(93, 64, 55, 0.4);
    padding-bottom: 4px;
}

.chat-msg-time {
    color: #666;
    font-size: 14px;
    margin-right: 5px;
}

.chat-msg-auth {
    color: var(--trt-wood-light);
    font-weight: bold;
    margin-right: 5px;
}

.chat-msg-auth.me {
    color: #00ff00;
}

.chat-msg-auth.system {
    color: #ff5555;
}

.chat-msg-text {
    color: var(--phosphor-white);
}

.chat-msg.system-msg .chat-msg-text {
    color: #ffd700;
    font-style: italic;
}

.chat-gif {
    display: block;
    max-width: 100%;
    border-radius: 4px;
    margin-top: 4px;
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.chat-welcome {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

.chat-input-form {
    display: flex;
    padding: 8px;
    background: #000;
    border-top: 1px solid var(--trt-wood-light);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.chat-input-form input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 16px;
    outline: none;
}

.chat-input-form button {
    background: var(--trt-wood);
    color: var(--phosphor-white);
    border: none;
    font-family: 'VT323', monospace;
    padding: 2px 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.chat-input-form button:hover {
    background: #fff;
}

/* ─── Repdiz Modal (Generic Fullscreen) ─── */
.repdiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'VT323', monospace;
}

.repdiz-modal-content {
    background: var(--signal-blue);
    border: 3px solid var(--trt-wood-light);
    padding: 15px 25px;
    width: 600px;
    max-width: 95%;
    box-shadow: 0 0 40px rgba(93, 64, 55, 0.5);
    position: relative;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 18px;
    font-size: 32px;
    color: var(--phosphor-white);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--trt-amber);
}

/* ─── Leaderboard ──────────────────────────── */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-bottom: 1px dotted rgba(255, 179, 0, 0.2);
    transition: background 0.2s;
}

.leaderboard-item:hover {
    background: rgba(255, 179, 0, 0.1);
}

.lb-rank {
    width: 35px;
    font-size: 18px;
    color: var(--trt-amber);
    font-weight: bold;
}

.lb-user {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lb-name {
    font-size: 18px;
    color: var(--phosphor-white);
}

.lb-level {
    font-size: 13px;
    color: #888;
}

.lb-xp {
    font-size: 16px;
    color: #0f0;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* ─── Brightness OSD (Removed old conflicting CSS) ───────────────────────── */

/* ─── RSS Breaking News Ticker ────────────────────────── */
.news-ticker-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 40, 0.95);
    border-top: 1px solid rgba(224, 224, 255, 0.2);
    color: var(--phosphor-white);
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 4px 0;
    overflow: hidden;
    white-space: nowrap;
    z-index: 50;
    /* Above video and effects, below modal */
}

.news-ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: scrollTicker 30s linear infinite;
}

@keyframes scrollTicker {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* ─── Google Login Button ───────────────── */
.google-login-btn {
    border-color: rgba(66, 133, 244, 0.4) !important;
    background: rgba(66, 133, 244, 0.05) !important;
    transition: all 0.2s ease;
}

.google-login-btn:hover {
    border-color: #4285F4 !important;
    background: rgba(66, 133, 244, 0.15) !important;
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.3) !important;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 0;
    filter: grayscale(100%) contrast(1.2);
    object-fit: cover;
    border: 3px solid #000;
}

.google-login-btn span {
    text-shadow: 0 0 5px rgba(66, 133, 244, 0.5);
}