/* tv-ui.css - Smart TV Interface Theme untuk SMKTI TV */
:root {
    --bg-dark: #141518;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(37, 99, 235, 0.25);
    --accent-blue: #2563eb;
    --accent-blue-glow: rgba(37, 99, 235, 0.55);
    --accent-sky: #38bdf8;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    /* Efek pendaran biru di sisi kanan/atas seperti pada video referensi */
    background-image: 
        radial-gradient(circle at 88% 45%, rgba(29, 78, 216, 0.42) 0%, rgba(20, 21, 24, 0) 55%),
        radial-gradient(circle at 15% 15%, rgba(30, 58, 138, 0.18) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar Minimalis */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* Top Header Bar (Logo Kiri + Jam/Cuaca/Status Kanan) */
.tv-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px 12px 36px;
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(to bottom, rgba(20, 21, 24, 0.92) 60%, rgba(20, 21, 24, 0));
}

.tv-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tv-brand-badge {
    background: var(--accent-blue);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--accent-blue-glow);
}

/* Left Navigation Icon Rail (Seperti di Video Referensi) */
.tv-layout {
    display: flex;
    min-height: calc(100vh - 110px);
}

.tv-rail {
    width: 96px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 28px;
    gap: 22px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 120px);
    z-index: 35;
}

.rail-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.rail-btn:hover, .rail-btn:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
    outline: none;
}

.rail-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 0 22px var(--accent-blue-glow);
    transform: scale(1.08);
}

/* Tooltip label saat hover ikon rail */
.rail-btn::after {
    content: attr(data-label);
    position: absolute;
    left: 60px;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
    transition: all 0.2s ease;
}

.rail-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Main Content Area */
.tv-main {
    flex-grow: 1;
    padding: 12px 40px 80px 16px;
    max-width: calc(100vw - 96px);
}

/* Hero Focus Cards (3 Kartu Vertikal Mengambang seperti Home Delfi TV) */
.tv-hero-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tv-hero-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--accent-sky);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.tv-hero-card:hover, .tv-hero-card.focused {
    transform: translateY(-8px) scale(1.03);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.35) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(37, 99, 235, 0.3);
}

.tv-hero-card:hover::after, .tv-hero-card.focused::after {
    opacity: 1;
    left: 15%;
    right: 15%;
}

/* Horizontal Media List Card (Tampilan Daftar Berita/Channel Video Kanan) */
.tv-list-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.tv-list-card:hover, .tv-list-card.active-ch {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Category Text Menu (Kiri pada layar jelajah seperti video menit 00:12 - 00:20) */
.cat-text-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
}

.cat-text-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.cat-text-item.active {
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    padding-left: 14px;
    border-left: 3px solid var(--accent-blue);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), transparent);
}

/* Player Container */
#player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #090a0d;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

/* Minimal Ticker Footer */
.tv-footer {
    position: fixed;
    bottom: 0;
    left: 96px;
    right: 0;
    z-index: 30;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 28px;
    font-size: 11px;
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    margin-right: 20px;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 28s linear infinite;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Responsif Mobile / Layar Kecil */
@media (max-width: 768px) {
    .tv-topbar { padding: 14px 16px; }
    .tv-layout { flex-direction: column; }
    .tv-rail {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 10px;
        background: rgba(15, 17, 21, 0.96);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 60;
    }
    .rail-btn::after { display: none; }
    .tv-main {
        max-width: 100vw;
        padding: 10px 16px 90px 16px;
    }
    .tv-footer {
        left: 0;
        bottom: 60px;
        padding: 4px 12px;
    }
}