/* ================================================================
   TVKit v7.0 — "SIGNAL" — Ultra-Premium Broadcast Design
   Syne + DM Sans · Deep Teal-Black · Gold Accents · 3D Splash
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

:root {
    /* Palette — deep broadcast black with teal signal */
    --bg-void:    #03050d;
    --bg-deep:    #060912;
    --bg-base:    #0a0e1a;
    --bg-surface: rgba(255,255,255,0.035);
    --bg-glass:   rgba(255,255,255,0.055);
    --bg-glass2:  rgba(255,255,255,0.08);
    --bg-hover:   rgba(255,255,255,0.075);

    /* Borders */
    --border:       rgba(255,255,255,0.07);
    --border-light: rgba(255,255,255,0.11);
    --border-glow:  rgba(0,212,180,0.4);

    /* Accent — broadcast teal + gold signal */
    --primary:       #00D4B4;
    --primary-dim:   #00A890;
    --primary-dark:  #007A68;
    --primary-glow:  rgba(0,212,180,0.3);
    --primary-glow2: rgba(0,212,180,0.12);
    --gold:          #F0B429;
    --gold-dim:      #C9930E;
    --gold-glow:     rgba(240,180,41,0.35);

    /* Semantic */
    --success: #00D4B4;
    --warning: #F0B429;
    --error:   #FF4757;
    --live:    #FF3B5C;

    /* Text */
    --t1: rgba(255,255,255,0.94);
    --t2: rgba(255,255,255,0.52);
    --t3: rgba(255,255,255,0.28);

    /* Radii */
    --r-xs: 6px; --r-sm: 10px; --r-md: 14px;
    --r-lg: 20px; --r-xl: 26px; --r-2xl: 34px;

    /* Shadows */
    --shadow-glow:   0 0 50px rgba(0,212,180,0.15);
    --shadow-card:   0 8px 32px rgba(0,0,0,0.5);
    --shadow-player: 0 28px 90px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.04);

    /* Ease */
    --ease:   cubic-bezier(0.4,0,0.2,1);
    --spring: cubic-bezier(0.16,1,0.3,1);
    --t1d: 0.15s var(--ease);
    --t2d: 0.3s var(--spring);
    --t3d: 0.5s var(--spring);
}

/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-void);
    color: var(--t1);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0,212,180,0.3); color:#fff; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,212,180,0.25); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,180,0.45); }



/* ================================================================
   BG SCENE
   ================================================================ */
.bg-scene {
    position: fixed; inset: 0; z-index: 0;
    overflow: hidden; pointer-events: none;
}
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(100px); opacity: 0.12;
    animation: orbFloat 22s ease-in-out infinite;
}
.orb-1 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, #00D4B4, #006458);
    top: -250px; left: -200px; animation-delay: 0s;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #F0B429, #8B6000);
    bottom: -180px; right: -120px; animation-delay: -9s; opacity: 0.08;
}
.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #00D4B4, #004040);
    top: 45%; right: 28%; animation-delay: -18s; opacity: 0.07;
}
@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(50px,-40px) scale(1.06); }
    66%      { transform: translate(-25px,25px) scale(0.94); }
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,212,180,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,180,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, transparent 72%);
}
.noise-overlay {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.025; mix-blend-mode: overlay;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.app-container {
    position: relative; z-index: 1;
    display: flex; height: 100vh; width: 100vw;
    transition: opacity 0.6s var(--ease);
}

/* ================================================================
   SIDE NAV
   ================================================================ */
.side-nav {
    width: 68px; height: 100%; flex-shrink: 0;
    background: rgba(6,9,18,0.9);
    backdrop-filter: blur(28px) saturate(1.6);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 0; z-index: 20;
    box-shadow: 2px 0 24px rgba(0,0,0,0.35);
    animation: slideRight 0.5s var(--spring) backwards;
}
@keyframes slideRight {
    from { opacity:0; transform: translateX(-20px); }
    to   { opacity:1; transform: translateX(0); }
}

.logo-mini { margin-bottom: 8px; }
.logo-icon-bg {
    position: relative;
    width: 40px; height: 40px; border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(0,212,180,0.2), rgba(0,122,104,0.12));
    border: 1px solid rgba(0,212,180,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,212,180,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: var(--t2d); cursor: pointer;
    animation: libPulse 4s ease-in-out infinite;
}
.logo-icon-bg:hover { transform: scale(1.1) rotate(-8deg); }
@keyframes libPulse {
    0%,100% { box-shadow: 0 4px 20px rgba(0,212,180,0.2); }
    50%      { box-shadow: 0 4px 32px rgba(0,212,180,0.4); }
}

.nav-sep {
    width: 32px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin: 10px 0;
}

.nav-menu {
    flex: 1; display: flex; flex-direction: column; gap: 3px;
    width: 100%; padding: 0 9px;
    overflow-y: auto; overflow-x: hidden;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-item {
    width: 50px; height: 50px; margin: 0 auto;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--t3);
    transition: var(--t1d); border: 1px solid transparent;
    font-size: 20px; position: relative;
}
.nav-item:hover { color: var(--t1); background: var(--bg-glass); border-color: var(--border); transform: scale(1.05); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(0,212,180,0.15), rgba(0,122,104,0.1));
    color: var(--primary); border-color: rgba(0,212,180,0.25);
    box-shadow: 0 4px 16px rgba(0,212,180,0.12), inset 0 0 0 1px rgba(0,212,180,0.08);
}
.nav-item.active::before {
    content: '';
    position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 22px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dim));
    border-radius: 0 3px 3px 0;
    box-shadow: 2px 0 10px var(--primary-glow);
}
.nav-item::after {
    content: attr(title);
    position: absolute; left: 58px; top: 50%; transform: translateY(-50%) translateX(-6px);
    background: rgba(12,14,26,0.97); backdrop-filter: blur(12px);
    border: 1px solid var(--border-light); color: var(--t1);
    padding: 5px 10px; border-radius: var(--r-sm);
    font-size: 11px; white-space: nowrap; font-family: 'DM Sans', sans-serif;
    pointer-events: none; opacity: 0; transition: var(--t1d); z-index: 99;
    box-shadow: var(--shadow-card);
}
.nav-item:hover::after { opacity:1; transform: translateY(-50%) translateX(0); }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-bottom { margin-top: auto; padding-top: 8px; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    width: 296px; height: 100%; flex-shrink: 0;
    background: rgba(8,10,20,0.88);
    backdrop-filter: blur(36px) saturate(1.5);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; z-index: 10;
    transition: transform var(--t3d);
    animation: slideRight 0.5s var(--spring) backwards 0.05s;
}

.sidebar-header {
    padding: 18px 14px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 100%);
    position: relative;
}

.logo { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.logo-icon-sm {
    width: 28px; height: 28px; border-radius: 8px;
    background: linear-gradient(135deg, rgba(0,212,180,0.2), rgba(0,122,104,0.12));
    border: 1px solid rgba(0,212,180,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,212,180,0.2);
}
.logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 17px; font-weight: 800; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 8.5px; font-weight: 700;
    background: rgba(255,59,92,0.12);
    border: 1px solid rgba(255,59,92,0.25);
    color: var(--live); padding: 2px 7px 2px 5px;
    border-radius: 4px; letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255,59,92,0.5);
    animation: badgePulse 2.5s ease-in-out infinite;
}
.badge-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 6px var(--live);
    animation: dotBlink 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0%,100% { box-shadow: 0 0 8px rgba(255,59,92,0.2); }
    50%      { box-shadow: 0 0 16px rgba(255,59,92,0.4); }
}

.sidebar-close {
    position: absolute; top: 16px; right: 14px;
    display: none;
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--t2);
    align-items: center; justify-content: center;
    cursor: pointer; transition: var(--t1d);
}
.sidebar-close:hover { background: rgba(255,255,255,0.1); color: var(--t1); }

/* Search */
.search-box { position: relative; margin-bottom: 9px; }
.search-icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--t3); pointer-events: none; transition: color var(--t1d);
}
.search-box:focus-within .search-icon { color: var(--primary); }
.search-box input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 12px 9px 34px;
    color: var(--t1); font-family: 'DM Sans', inherit;
    font-size: 13px; outline: none; transition: var(--t1d);
    caret-color: var(--primary);
}
.search-box input:focus {
    background: rgba(0,212,180,0.05);
    border-color: rgba(0,212,180,0.35);
    box-shadow: 0 0 0 3px rgba(0,212,180,0.1), 0 0 20px rgba(0,212,180,0.08);
}
.search-box input::placeholder { color: var(--t3); }

/* Filters */
.filters {
    display: flex; gap: 5px;
    overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); color: var(--t2);
    padding: 4px 11px; border-radius: 99px;
    font-size: 11px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    transition: var(--t1d); font-family: 'DM Sans', inherit;
}
.filter-btn:hover { background: var(--bg-glass); color: var(--t1); border-color: var(--border-light); }
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-dark), rgba(0,100,80,0.8));
    border-color: rgba(0,212,180,0.4); color: var(--primary);
    box-shadow: 0 3px 12px rgba(0,212,180,0.2); transform: translateY(-1px);
    font-weight: 600;
}

.sidebar-bottom-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px;
}
.channel-count { font-size: 10.5px; color: var(--t3); letter-spacing: 0.3px; }

/* View Toggle */
.view-toggle-wrap { display: flex; gap: 4px; }
.view-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 26px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: var(--r-xs); color: var(--t3); cursor: pointer; transition: var(--t1d);
}
.view-toggle-btn:hover { background: var(--bg-glass); color: var(--t1); }
.view-toggle-btn.active {
    background: linear-gradient(135deg, rgba(0,212,180,0.15), rgba(0,122,104,0.1));
    border-color: rgba(0,212,180,0.35); color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,212,180,0.15);
}

/* Channel List */
.channel-list-container {
    flex: 1; overflow-y: auto; padding: 8px 6px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}
.channel-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--r-md);
    cursor: pointer; border: 1px solid transparent;
    margin-bottom: 2px; transition: all var(--t1d);
    position: relative; overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,212,180,0.15);
}
.channel-item::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,212,180,0) 0%, rgba(0,212,180,0.05) 100%);
    opacity: 0; transition: opacity var(--t1d); border-radius: inherit;
}
.channel-item:hover {
    background: var(--bg-glass); border-color: var(--border);
    transform: translateX(3px) scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.channel-item:hover::before { opacity:1; }
.channel-item.active {
    background: linear-gradient(135deg, rgba(0,212,180,0.1), rgba(0,168,144,0.05));
    border-color: rgba(0,212,180,0.22);
    box-shadow: 0 0 0 1px rgba(0,212,180,0.08), 0 4px 20px rgba(0,212,180,0.08);
}
.channel-item.active::after {
    content: '';
    position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 2px; background: linear-gradient(180deg, var(--primary), var(--primary-dim));
    border-radius: 0 2px 2px 0; box-shadow: 2px 0 8px var(--primary-glow);
}
.channel-logo {
    width: 38px; height: 38px; border-radius: var(--r-sm);
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; border: 1px solid var(--border);
    transition: var(--t1d);
}
.channel-item:hover .channel-logo { border-color: rgba(0,212,180,0.25); box-shadow: 0 0 10px rgba(0,212,180,0.12); }
.channel-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.channel-logo span { font-size: 12px; font-weight: 700; color: var(--t3); font-family: 'Syne', sans-serif; }
.channel-info { flex: 1; overflow: hidden; }
.channel-name {
    font-size: 12.5px; font-weight: 500; color: var(--t1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px; transition: color var(--t1d);
}
.channel-item.active .channel-name { color: var(--primary); font-weight: 600; }
.channel-group { font-size: 10px; color: var(--t3); }
.fav-btn {
    background: transparent; border: none; color: var(--t3);
    cursor: pointer; padding: 4px; transition: var(--t1d);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0;
}
.fav-btn:hover { color: var(--live); transform: scale(1.2); }
.fav-btn.favorited { color: var(--live); }
.fav-btn.favorited svg { fill: var(--live); }

/* Loading State */
.loading-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 50px 20px; gap: 16px; color: var(--t3);
}
.loading-state p { font-size: 12px; letter-spacing: 0.5px; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    padding: 16px 20px; overflow: hidden; min-width: 0;
    animation: fadeIn 0.5s var(--ease) backwards 0.1s;
}
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

.player-wrapper { flex: 1; display: flex; flex-direction: column; gap: 0; }

/* Top bar */
.player-topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding: 0 2px;
    animation: fadeSlideDown 0.5s var(--spring) backwards;
}
@keyframes fadeSlideDown {
    from { opacity:0; transform: translateY(-10px); }
    to   { opacity:1; transform: translateY(0); }
}
.current-channel-info { display: flex; align-items: center; gap: 12px; }
.channel-logo-placeholder {
    width: 42px; height: 42px; border-radius: var(--r-md);
    background: var(--bg-glass); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: var(--t2d);
}
.channel-logo-placeholder img { max-width: 100%; max-height: 100%; object-fit: contain; }
.channel-logo-placeholder span { font-size: 15px; font-weight: 800; color: var(--t3); font-family: 'Syne', sans-serif; }
.channel-meta h1 {
    font-family: 'Syne', sans-serif;
    font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--t1), rgba(255,255,255,0.65));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 4px;
}
.meta-badges { display: flex; align-items: center; gap: 8px; }
.live-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,59,92,0.1); border: 1px solid rgba(255,59,92,0.22);
    color: var(--live); font-size: 9px; font-weight: 800;
    padding: 2px 8px; border-radius: 4px; letter-spacing: 1.2px;
    transition: opacity var(--t1d); text-shadow: 0 0 8px rgba(255,59,92,0.5);
}
.dot {
    width: 5px; height: 5px; background: var(--live); border-radius: 50%;
    animation: dotBlink 1.5s ease-in-out infinite; box-shadow: 0 0 6px var(--live);
}
@keyframes dotBlink { 0%,100%{opacity:1;} 50%{opacity:0.2;} }
.stream-stats { font-size: 10.5px; color: var(--t3); }
.topbar-actions { display: flex; align-items: center; }
.kbd-hint { font-size: 10px; color: var(--t3); }
.kbd-hint kbd {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    padding: 1px 5px; border-radius: 4px; font-size: 9px; font-family: inherit; color: var(--t2);
}

/* ================================================================
   VIDEO STAGE
   ================================================================ */
.video-stage { flex: 1; min-height: 0; }
.video-container {
    height: 100%; position: relative;
    background: #000; border-radius: var(--r-2xl);
    overflow: hidden; box-shadow: var(--shadow-player);
    border: 1px solid rgba(255,255,255,0.05);
    transition: border-radius var(--t2d);
    animation: containerIn 0.6s var(--spring) backwards 0.1s;
}
@keyframes containerIn {
    from { opacity:0; transform: scale(0.97) translateY(12px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.video-container.fullscreen { border-radius: 0; border: none; }
video { width:100%; height:100%; object-fit:contain; outline:none; display:block; transition: filter 0.3s ease; }
/* Screenshot Flash */
.screenshot-flash {
    position:absolute; inset:0; background:#fff; z-index:100;
    pointer-events:none; animation: ssFlash 0.5s ease-out forwards;
}
@keyframes ssFlash { from{opacity:0.8;} to{opacity:0;} }

/* Placeholder */
.video-placeholder {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: opacity var(--t3d), transform var(--t3d);
}
.video-placeholder.hidden { opacity:0; pointer-events:none; transform: scale(1.02); }
.ph-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #060912 0%, #0c1022 50%, #060912 100%);
}
.ph-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,212,180,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,180,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift { from{transform:translateY(0);} to{transform:translateY(40px);} }

.ph-content {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.ph-icon-wrap {
    position: relative; width: 150px; height: 150px;
    display: flex; align-items: center; justify-content: center;
}
/* Orbiting satellites */
.ph-orbit {
    position: absolute; border-radius: 50%; border: 1px dashed;
    animation: orbitSpin linear infinite;
}
.ph-orbit-1 {
    width: 150px; height: 150px;
    border-color: rgba(0,212,180,0.12);
    animation-duration: 12s;
}
.ph-orbit-2 {
    width: 110px; height: 110px;
    border-color: rgba(240,180,41,0.1);
    animation-duration: 8s; animation-direction: reverse;
}
@keyframes orbitSpin { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
.ph-sat {
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 10px var(--primary-glow);
}
.ph-orbit-2 .ph-sat { background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }

.ph-icon-ring {
    position: absolute; border-radius: 50%; border: 1px solid;
    animation: ringRotate 8s linear infinite;
}
.ring-outer { width:140px; height:140px; border-color:rgba(0,212,180,0.12); animation-duration:16s; }
.ring-mid   { width:106px; height:106px; border-color:rgba(0,212,180,0.22); animation-duration:11s; animation-direction:reverse; }
.ring-inner { width:74px;  height:74px;  border-color:rgba(0,212,180,0.38); animation-duration:7s; }
@keyframes ringRotate {
    from { transform: rotate(0deg) rotateX(55deg); }
    to   { transform: rotate(360deg) rotateX(55deg); }
}
.ph-icon-core {
    width: 58px; height: 58px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,212,180,0.15), rgba(0,122,104,0.1));
    border: 1px solid rgba(0,212,180,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 40px rgba(0,212,180,0.25), inset 0 0 20px rgba(0,212,180,0.08);
    animation: coreGlow 3s ease-in-out infinite;
}
@keyframes coreGlow {
    0%,100% { box-shadow: 0 0 30px rgba(0,212,180,0.25), inset 0 0 20px rgba(0,212,180,0.08); }
    50%      { box-shadow: 0 0 60px rgba(0,212,180,0.4), inset 0 0 30px rgba(0,212,180,0.15); }
}
.ph-title { font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.55); }
.ph-sub   { font-size: 12px; color: rgba(255,255,255,0.28); }

/* Loader */
.loader-overlay {
    position: absolute; inset: 0; z-index: 5;
    background: rgba(3,5,13,0.88); backdrop-filter: blur(12px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 20px; opacity:0; pointer-events:none; transition: opacity var(--t1d);
}
.loader-overlay.show { opacity:1; pointer-events:all; }

.loader-3d {
    position: relative; width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
}
.l3d-r {
    position: absolute; border-radius: 50%;
    border: 2px solid transparent;
    animation: l3dSpin linear infinite;
}
.l3d-r1 { width:64px; height:64px; border-top-color: var(--primary); animation-duration: 1s; }
.l3d-r2 { width:46px; height:46px; border-right-color: var(--gold); animation-duration: 1.4s; animation-direction:reverse; }
.l3d-r3 { width:30px; height:30px; border-bottom-color: rgba(0,212,180,0.6); animation-duration: 0.85s; }
@keyframes l3dSpin { to { transform: rotate(360deg); } }
.l3d-core {
    position: absolute; color: var(--primary);
    animation: corePulse 1.5s ease-in-out infinite;
}
@keyframes corePulse { 0%,100%{opacity:0.7;} 50%{opacity:1;} }
.loader-text { font-size: 13px; color: var(--t2); letter-spacing: 0.5px; display: flex; align-items: baseline; }
.ldots span { animation: ldot 1.4s ease-in-out infinite; opacity:0; }
.ldots span:nth-child(1) { animation-delay: 0s; }
.ldots span:nth-child(2) { animation-delay: 0.2s; }
.ldots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ldot { 0%,80%,100%{opacity:0;} 40%{opacity:1;} }

/* Error */
.error-overlay {
    position: absolute; inset: 0; z-index: 5;
    background: rgba(3,5,13,0.9); backdrop-filter: blur(14px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; opacity:0; pointer-events:none; transition: opacity var(--t1d);
}
.error-overlay.show { opacity:1; pointer-events:all; }
.err-icon-wrap {
    position: relative;
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(255,71,87,0.08); border: 1px solid rgba(255,71,87,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--error);
}
.err-pulse-ring {
    position: absolute; inset: -6px; border-radius: 50%;
    border: 1px solid rgba(255,71,87,0.25);
    animation: errPulse 2s ease-in-out infinite;
}
@keyframes errPulse {
    0%,100% { transform:scale(1); opacity:0.5; }
    50%      { transform:scale(1.15); opacity:0.1; }
}
.err-title { font-size: 14px; color: var(--t2); }
.retry-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, var(--primary-dark), rgba(0,100,80,0.8));
    border: 1px solid rgba(0,212,180,0.3);
    color: var(--primary); padding: 9px 22px; border-radius: var(--r-md);
    font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'DM Sans', inherit;
    box-shadow: 0 4px 16px rgba(0,212,180,0.15); transition: var(--t1d);
}
.retry-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,212,180,0.25); }

/* Custom Controls */
.custom-controls {
    position: absolute; bottom:0; left:0; right:0; z-index:10;
    opacity:0; transform: translateY(4px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.video-container:hover .custom-controls,
.video-container.controls-visible .custom-controls { opacity:1; transform:translateY(0); }
.ctrl-gradient {
    position: absolute; bottom:0; left:0; right:0; height: 130px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
    pointer-events: none; border-radius: 0 0 var(--r-2xl) var(--r-2xl);
}
.video-container.fullscreen .ctrl-gradient { border-radius: 0; }
.ctrl-inner { position: relative; z-index: 2; padding: 0 16px 14px; }

/* Progress */
.progress-container { padding: 10px 0 6px; cursor: pointer; position: relative; }
.progress-track {
    height: 3px; background: rgba(255,255,255,0.15); border-radius: 99px; position: relative;
    transition: height 0.15s var(--ease);
}
.progress-container:hover .progress-track { height: 5px; }
.progress-buffered { position:absolute; top:0; left:0; height:100%; background:rgba(255,255,255,0.18); border-radius:99px; }
.progress-played {
    position:absolute; top:0; left:0; height:100%;
    background: linear-gradient(90deg, var(--primary), rgba(0,212,180,0.7));
    border-radius:99px; box-shadow: 0 0 8px var(--primary-glow);
}
.progress-knob {
    position:absolute; right:-6px; top:50%;
    transform: translateY(-50%) scale(0);
    width:13px; height:13px; background:#fff; border-radius:50%;
    box-shadow: 0 0 0 3px var(--primary-glow), 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.15s var(--spring);
}
.progress-container:hover .progress-knob { transform: translateY(-50%) scale(1); }

/* Controls row */
.controls-row { display:flex; justify-content:space-between; align-items:center; padding: 2px 0 0; }
.controls-left, .controls-right { display:flex; align-items:center; gap:2px; }
.ctrl-btn {
    background:transparent; border:none; color:rgba(255,255,255,0.8);
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; transition: all var(--t1d); flex-shrink:0;
}
.ctrl-btn:hover { color:#fff; background:rgba(255,255,255,0.12); transform:scale(1.12); }
.ctrl-btn:active { transform:scale(0.95); }
.play-btn {
    width:40px; height:40px;
    background: rgba(0,212,180,0.15) !important;
    border: 1px solid rgba(0,212,180,0.25) !important;
    box-shadow: 0 0 16px rgba(0,212,180,0.15);
}
.play-btn:hover { background: rgba(0,212,180,0.28) !important; box-shadow: 0 0 24px rgba(0,212,180,0.3) !important; }
.volume-group { display:flex; align-items:center; }
.volume-slider {
    width:0; opacity:0; transition: width 0.2s var(--ease), opacity 0.2s;
    -webkit-appearance:none; appearance:none; height:3px;
    background:rgba(255,255,255,0.2); border-radius:99px; outline:none;
    cursor:pointer; accent-color: var(--primary);
}
.volume-group:hover .volume-slider { width:64px; opacity:1; margin-left:2px; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance:none; width:12px; height:12px; background:#fff; border-radius:50%; cursor:pointer; }
.time-display { font-size:11px; color:rgba(255,255,255,0.55); margin-left:6px; font-variant-numeric:tabular-nums; letter-spacing:0.5px; }
.ctrl-live {
    display:flex; align-items:center; gap:5px;
    font-size:9px; font-weight:800; color:var(--live);
    letter-spacing:1.2px; margin-left:6px; opacity:0;
    transition: opacity var(--t1d); text-transform:uppercase; font-family:'Syne',sans-serif;
}
.ctrl-live.show { opacity:1; }
.ctrl-live-dot { width:5px; height:5px; background:var(--live); border-radius:50%; animation:dotBlink 1.5s infinite; box-shadow:0 0 6px var(--live); }
.icon-btn { border-radius:var(--r-xs)!important; width:auto!important; padding:0 8px!important; }
.fs-btn { width:36px!important; }
.quality-btn { display:flex!important; align-items:center; gap:5px; width:auto!important; padding:0 8px!important; border-radius:var(--r-xs)!important; }
.quality-label { font-size:11px; font-weight:600; color:var(--primary); }

/* Filters Row */
.filters-row { display:flex; align-items:center; gap:8px; width:100%; margin-top:4px; }
.filters-row .filters { flex:1; }
.hd-toggle-btn {
    background:rgba(255,255,255,0.05); border:1px solid var(--border);
    color:var(--t3); padding:4px 10px; border-radius:var(--r-sm);
    font-size:10px; font-weight:800; cursor:pointer; transition:var(--t1d);
}
.hd-toggle-btn:hover { color:var(--primary); border-color:rgba(0,212,180,0.3); }
.hd-toggle-btn.active {
    background:rgba(0,212,180,0.15); color:var(--primary); border-color:rgba(0,212,180,0.4);
    box-shadow: 0 0 10px rgba(0,212,180,0.2);
}

/* Display Menu */
.display-menu { min-width:200px; padding:12px; }
.menu-header { font-size:12px; font-weight:700; color:var(--primary); margin-bottom:12px; font-family:'Syne',sans-serif; text-transform:uppercase; letter-spacing:0.5px; }
.settings-group { display:flex; flex-direction:column; gap:12px; }
.setting-item { display:flex; flex-direction:column; gap:6px; }
.setting-item label { font-size:10px; color:var(--t3); font-weight:600; text-transform:uppercase; }
.setting-item input[type="range"] {
    -webkit-appearance:none; width:100%; height:3px; background:rgba(255,255,255,0.15);
    border-radius:99px; outline:none; accent-color:var(--primary);
}
.reset-settings-btn {
    margin-top:4px; background:rgba(255,255,255,0.05); border:1px solid var(--border);
    color:var(--t2); padding:6px; border-radius:var(--r-sm); font-size:11px; cursor:pointer;
    transition:var(--t1d);
}
.reset-settings-btn:hover { background:rgba(255,255,255,0.1); color:var(--t1); }

/* Popup menus */
.popup-menu {
    position:absolute; bottom:48px; right:0;
    background:rgba(8,10,20,0.98); backdrop-filter:blur(28px);
    border:1px solid rgba(255,255,255,0.08); border-radius:var(--r-lg);
    padding:6px; display:none; min-width:160px; z-index:20;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,212,180,0.05);
    animation: menuIn 0.2s var(--spring);
}
@keyframes menuIn { from{opacity:0;transform:translateY(8px) scale(0.95);} to{opacity:1;transform:translateY(0) scale(1);} }
.popup-menu.show { display:block; }
.quality-selector, .speed-selector { position:relative; }
.quality-option, .speed-option {
    display:flex; justify-content:space-between; align-items:center;
    padding:8px 12px; border-radius:var(--r-sm);
    cursor:pointer; font-size:12px; color:rgba(255,255,255,0.6); transition:var(--t1d); gap:8px;
}
.quality-option:hover, .speed-option:hover { background:rgba(255,255,255,0.06); color:#fff; }
.quality-option.active, .speed-option.active { color:var(--primary); font-weight:600; background:rgba(0,212,180,0.08); }
.q-res { font-weight:600; } .q-bitrate { font-size:10px; color:rgba(255,255,255,0.3); margin-left:auto; }
.q-badge { font-size:8px; font-weight:800; background:linear-gradient(135deg,var(--primary-dark),rgba(0,80,65,0.8)); border:1px solid rgba(0,212,180,0.3); color:var(--primary); padding:1px 5px; border-radius:3px; letter-spacing:0.5px; }

/* ================================================================
   SPINNER
   ================================================================ */
.spinner-3d { width:48px; height:48px; position:relative; margin-bottom:4px; }
.ring { position:absolute; inset:0; border-radius:50%; border:2px solid transparent; animation:ringSpinA 1.2s linear infinite; }
.r1 { border-top-color:var(--primary); animation-duration:1s; }
.r2 { inset:8px; border-right-color:var(--gold); animation-duration:1.4s; animation-direction:reverse; }
.r3 { inset:16px; border-bottom-color:rgba(0,212,180,0.5); animation-duration:0.9s; }
@keyframes ringSpinA { to { transform:rotate(360deg); } }

/* ================================================================
   MOBILE TOGGLE BUTTON
   ================================================================ */
.mobile-toggle {
    display:none; position:fixed; bottom:22px; left:50%; transform:translateX(-50%);
    z-index:50; align-items:center; gap:8px;
    background: rgba(8,10,22,0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,212,180,0.3);
    color:var(--primary); padding:11px 22px; border-radius:99px;
    font-size:13px; font-weight:600; font-family:'DM Sans',inherit; cursor:pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 24px rgba(0,212,180,0.15), 0 0 0 1px rgba(0,212,180,0.1);
    transition: var(--t2d);
}
.mobile-toggle:hover { transform:translateX(-50%) translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 32px rgba(0,212,180,0.2); }
.toggle-label { font-size:13px; font-weight:600; }

/* ================================================================
   MOBILE OVERLAY — KEY FIX: NO BLUR ON BODY
   ================================================================ */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,0.7);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t2d);
}
/* Mobilde overlay sidebar alanını kapatmamalı */
@media (max-width: 700px) {
    .sidebar-overlay.show {
        left: 300px; /* sidebar genişliği kadar boşluk bırak */
        max-left: 88vw;
    }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) { .sidebar { width: 260px; } }
@media (max-width: 900px) {
    .side-nav { display: none; }
    .sidebar { width: 248px; }
    .main-content { padding: 10px; }
}
@media (max-width: 700px) {
    body { overflow: hidden; }
    .app-container { flex-direction: column; }

    /* Sidebar slides in — overlay shows WITHOUT blurring entire page */
    .sidebar {
        position: fixed; left:0; top:0; bottom:0;
        width: 300px; max-width: 88vw;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform var(--t3d);
        box-shadow: 6px 0 48px rgba(0,0,0,0.7);
        animation: none !important;
        touch-action: pan-y;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open ~ * .mobile-toggle,
    .mobile-toggle.hidden,
    body:has(.sidebar.open) .mobile-toggle { display:none !important; }

    .sidebar-overlay {
        display: block;
    }
    .sidebar-overlay.show {
        opacity: 1;
        pointer-events: all;
        left: min(300px, 88vw); /* sidebar'ın sağından başla */
    }

    .sidebar-close { display:flex; }

    /* Touch cihazlarda hover transform tıklamayı engellemesin */
    .channel-item:hover {
        transform: none;
    }
    .channel-item:active {
        background: var(--bg-glass);
        border-color: var(--border);
    }
    /* Mobilde entry animasyonu tıklamayı bloke ediyor — kapat */
    .channel-item {
        animation: none !important;
    }
    /* Card view tilt transform'u mobilde sıfırla */
    .channel-item.card {
        transform: none !important;
    }

    .main-content { padding:10px 8px 80px; height:100vh; flex:none; overflow:hidden; }
    .player-topbar { display:none; }
    .video-container { border-radius: var(--r-xl); }
    .ctrl-gradient { border-radius: 0 0 var(--r-xl) var(--r-xl); }
    .mobile-toggle { display:flex; }
    .kbd-hint { display:none; }
    .orb-1 { width:280px; height:280px; }
    .orb-2 { width:220px; height:220px; }
    .orb-3 { display:none; }


}
@media (max-width: 480px) {
    .main-content { padding: 8px 6px 74px; }
    .video-container { border-radius: var(--r-lg); }
    .ctrl-inner { padding: 0 10px 10px; }
    .ph-icon-wrap { width:110px; height:110px; }
    .ring-outer { width:110px; height:110px; }
    .ring-mid   { width:82px;  height:82px; }
    .ring-inner { width:56px;  height:56px; }
    .ph-orbit-1 { width:110px; height:110px; }
    .ph-orbit-2 { width:82px;  height:82px; }
    .ph-icon-core { width:44px; height:44px; }
    .ph-title { font-size:13px; }
    .time-display, .ctrl-live { display:none; }
    .ctrl-btn { width:30px; height:30px; }
}

/* ================================================================
   CHANNEL CARD VIEW
   ================================================================ */
.channel-list.card-view { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:4px 2px; }
.channel-item.card {
    flex-direction:column; padding:0; border-radius:var(--r-lg);
    overflow:hidden; background:rgba(255,255,255,0.03);
    border:1px solid var(--border); cursor:pointer; position:relative;
    margin:0; transform-style:preserve-3d;
    transition: all 0.25s var(--spring);
    animation: cardIn 0.4s var(--spring) backwards;
}
@keyframes cardIn { from{opacity:0;transform:scale(0.88) translateY(12px);} to{opacity:1;transform:scale(1) translateY(0);} }
.channel-item.card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(0,212,180,0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,212,180,0.12), 0 0 30px rgba(0,212,180,0.08);
}
.channel-item.card.active { border-color:rgba(0,212,180,0.4); box-shadow:0 8px 32px rgba(0,212,180,0.15); }
.channel-item.card.active::after { display:none; }
.card-thumb {
    position:relative; width:100%; aspect-ratio:16/9;
    background:linear-gradient(135deg,#0a0e1a,#0e1528);
    display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0;
}
.card-thumb-bg { position:absolute; inset:0; background:radial-gradient(ellipse at center,rgba(0,212,180,0.06) 0%,transparent 70%); }
.card-thumb-grid {
    position:absolute; inset:0;
    background-image: linear-gradient(rgba(0,212,180,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(0,212,180,0.04) 1px,transparent 1px);
    background-size:16px 16px; opacity:0; transition:opacity 0.3s;
}
.channel-item.card:hover .card-thumb-grid { opacity:1; }
.card-logo-wrap {
    position:relative; z-index:2; width:52px; height:52px;
    background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
    border-radius:var(--r-md); display:flex; align-items:center; justify-content:center;
    overflow:hidden; box-shadow:0 4px 16px rgba(0,0,0,0.4);
    transition: all 0.3s var(--spring);
}
.channel-item.card:hover .card-logo-wrap { transform:scale(1.1); box-shadow:0 8px 28px rgba(0,212,180,0.25); border-color:rgba(0,212,180,0.3); }
.card-logo-wrap img { max-width:80%; max-height:80%; object-fit:contain; }
.card-logo-wrap .card-initials { font-size:17px; font-weight:800; color:var(--primary); font-family:'Syne',sans-serif; }
.card-live-dot {
    position:absolute; top:7px; right:7px; z-index:3;
    width:8px; height:8px; background:var(--live); border-radius:50%;
    border:1.5px solid rgba(0,0,0,0.4); box-shadow:0 0 8px var(--live);
    animation:dotBlink 1.5s ease-in-out infinite; opacity:0; transition:opacity 0.2s;
}
.channel-item.card.active .card-live-dot { opacity:1; }
.card-play-overlay {
    position:absolute; inset:0; z-index:3;
    display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0); transition:background 0.3s;
}
.channel-item.card:hover .card-play-overlay { background:rgba(0,0,0,0.22); }
.card-play-icon {
    width:36px; height:36px; background:rgba(0,212,180,0.9); border-radius:50%;
    display:flex; align-items:center; justify-content:center; color:#fff;
    opacity:0; transform:scale(0.6); transition:all 0.25s var(--spring);
    box-shadow:0 4px 20px rgba(0,212,180,0.5);
}
.channel-item.card:hover .card-play-icon { opacity:1; transform:scale(1); }
.channel-item.card.active .card-play-icon { opacity:1; transform:scale(1); background:var(--live); box-shadow:0 4px 20px rgba(255,59,92,0.5); }
.card-footer { padding:9px 10px 8px; position:relative; z-index:2; }
.card-name {
    font-size:11.5px; font-weight:600; color:var(--t1);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px;
}
.channel-item.card.active .card-name { color:var(--primary); }
.card-meta { display:flex; align-items:center; justify-content:space-between; gap:4px; }
.card-group { font-size:9.5px; color:var(--t3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-fav-btn { background:transparent; border:none; color:var(--t3); cursor:pointer; padding:2px; transition:var(--t1d); flex-shrink:0; display:flex; align-items:center; }
.card-fav-btn:hover { color:var(--live); transform:scale(1.2); }
.card-fav-btn.favorited { color:var(--live); }
.card-fav-btn.favorited svg { fill:var(--live); }

/* Tooltip */
.ch-preview-tooltip {
    position:fixed; z-index:200; width:220px;
    background:rgba(8,10,20,0.98); backdrop-filter:blur(24px);
    border:1px solid rgba(255,255,255,0.08); border-radius:var(--r-lg);
    overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,212,180,0.08);
    pointer-events:none; opacity:0; transform:scale(0.94) translateY(4px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--spring);
}
.ch-preview-tooltip.visible { opacity:1; transform:scale(1) translateY(0); }
.tooltip-thumb {
    width:100%; height:110px;
    background:linear-gradient(135deg,#080c1a,#0c1224);
    display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;
}
.tooltip-thumb-grid {
    position:absolute; inset:0;
    background-image:linear-gradient(rgba(0,212,180,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(0,212,180,0.05) 1px,transparent 1px);
    background-size:16px 16px;
}
.tooltip-logo { position:relative; z-index:1; width:64px; height:64px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); border-radius:var(--r-md); display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:0 8px 28px rgba(0,0,0,0.5), 0 0 20px rgba(0,212,180,0.1); }
.tooltip-logo img { max-width:80%; max-height:80%; object-fit:contain; }
.tooltip-logo .tooltip-initials { font-size:22px; font-weight:800; color:var(--primary); font-family:'Syne',sans-serif; }
.tooltip-glow { position:absolute; inset:0; background:radial-gradient(ellipse at center,rgba(0,212,180,0.1) 0%,transparent 70%); }
.tooltip-body { padding:10px 12px 12px; }
.tooltip-name { font-size:13px; font-weight:700; color:var(--t1); margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:'Syne',sans-serif; }
.tooltip-group { font-size:10.5px; color:var(--t3); margin-bottom:8px; }
.tooltip-action { display:flex; align-items:center; gap:6px; font-size:10.5px; color:var(--primary); font-weight:600; }

/* Entry animations */
.channel-item { animation: itemIn 0.3s var(--spring) backwards; }
@keyframes itemIn { from{opacity:0;transform:translateX(-10px);} to{opacity:1;transform:translateX(0);} }
.channel-item:nth-child(1){animation-delay:0s}.channel-item:nth-child(2){animation-delay:.02s}.channel-item:nth-child(3){animation-delay:.04s}.channel-item:nth-child(4){animation-delay:.06s}.channel-item:nth-child(5){animation-delay:.08s}.channel-item:nth-child(6){animation-delay:.1s}.channel-item:nth-child(7){animation-delay:.12s}.channel-item:nth-child(8){animation-delay:.14s}.channel-item:nth-child(9){animation-delay:.16s}.channel-item:nth-child(10){animation-delay:.18s}

@media (max-width:900px) { .channel-list.card-view{grid-template-columns:1fr 1fr;} }
@media (max-width:700px) { .channel-list.card-view{grid-template-columns:1fr 1fr;gap:7px;} .ch-preview-tooltip{display:none;} }
@media (max-width:400px) { .channel-list.card-view{grid-template-columns:1fr;} .channel-item.card{flex-direction:row;border-radius:var(--r-md);} .card-thumb{width:90px;aspect-ratio:1/1;flex-shrink:0;} }

/* ================================================================
   MOBİL ÜLKE ŞERİDİ
   ================================================================ */
.mobile-country-strip {
    display: none;
}
@media (max-width: 700px) {
    .mobile-country-strip {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding: 8px 10px;
        border-bottom: 1px solid var(--border);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mobile-country-strip::-webkit-scrollbar { display: none; }
    .mobile-country-strip .nav-item {
        width: 36px; height: 36px; min-width: 36px;
        border-radius: var(--r-md);
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; font-size: 18px;
        background: rgba(255,255,255,0.04);
        border: 1px solid transparent;
        transition: all var(--t1d);
        touch-action: manipulation;
    }
    .mobile-country-strip .nav-item.active {
        background: rgba(0,212,180,0.15);
        border-color: rgba(0,212,180,0.35);
    }
    .mobile-country-strip .nav-icon { line-height: 1; font-size: 18px; }
}

/* ================================================================
   STREAM STATUS BADGE
   ================================================================ */
.stream-status {
    width: 7px; height: 7px; border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.12); /* gri = henüz bilinmiyor */
    margin-right: 4px;
    transition: background 0.5s, box-shadow 0.5s;
    position: relative;
}
.stream-status.status-live {
    background: #00e676;
    box-shadow: 0 0 7px rgba(0,230,118,0.8);
    animation: statusPulse 2.5s ease-in-out infinite;
}
.stream-status.status-dead {
    background: #ff3b5c;
    box-shadow: 0 0 4px rgba(255,59,92,0.4);
    animation: none;
}
@keyframes statusPulse {
    0%,100% { opacity: 1; box-shadow: 0 0 7px rgba(0,230,118,0.8); }
    50%      { opacity: 0.6; box-shadow: 0 0 3px rgba(0,230,118,0.3); }
}

/* Card view'da sol üst köşeye küçük dot */
.card-stream-status {
    position: absolute;
    top: 7px; left: 7px;
    width: 8px; height: 8px;
    z-index: 4;
    margin: 0;
}

/* ══ Son İzlenen & Favoriler nav items ══ */
.nav-item[data-country="Son İzlenen"] .nav-icon svg { color: var(--accent); }
.nav-item[data-country="Favoriler"] .nav-icon svg { color: #F0B429; }

/* Recently watched badge on channel items */
.channel-item.recently-watched::after {
    content: '▶';
    font-size: 9px;
    color: var(--accent);
    position: absolute;
    bottom: 6px;
    right: 36px;
    opacity: 0.7;
}

/* New country notification pulse */
@keyframes newCountryPulse {
    0% { box-shadow: 0 0 0 0 rgba(0,212,180,0.5); }
    70% { box-shadow: 0 0 0 6px rgba(0,212,180,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,212,180,0); }
}
.nav-item.new-country {
    animation: newCountryPulse 1.5s ease-out 1;
}


/* ================================================================
   TV / BÜYÜK EKRAN OPTİMİZASYONU (1920px ve üzeri)
   ================================================================ */

/* --- TV Genel Temel --- */
@media (min-width: 1920px) {

    /* Yazı tipleri büyüsün */
    body { font-size: 18px; }

    /* Ana layout genişliği ve boşlukları */
    .app-container { gap: 0; }

    /* Yan ikon nav daha geniş */
    .side-nav {
        width: 80px !important;
        padding: 20px 0;
    }
    .logo-icon-bg {
        width: 52px; height: 52px;
    }
    .logo-icon-bg svg { width: 26px; height: 26px; }
    .nav-item { width: 52px; height: 52px; }
    .nav-item svg { width: 22px; height: 22px; }

    /* Sidebar daha geniş */
    .sidebar { width: 340px !important; }

    /* Sidebar header */
    .logo-text { font-size: 22px !important; }
    .logo-badge { font-size: 11px !important; padding: 3px 10px !important; }
    .logo-icon-sm { width: 26px; height: 26px; }
    .logo-icon-sm svg { width: 18px; height: 18px; }

    /* Arama kutusu */
    .search-box { border-radius: 14px; }
    .search-box input {
        font-size: 16px !important;
        padding: 12px 14px 12px 42px !important;
    }
    .search-icon { width: 18px; height: 18px; top: 14px; left: 14px; }

    /* Filtre butonları */
    .filter-btn {
        font-size: 13px !important;
        padding: 6px 14px !important;
        border-radius: 20px !important;
    }
    .hd-toggle-btn {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }

    /* Kanal listesi öğeleri */
    .channel-item {
        padding: 12px 18px !important;
        border-radius: 16px !important;
        min-height: 68px;
    }
    .channel-logo {
        width: 48px !important; height: 48px !important;
        border-radius: 12px !important;
        flex-shrink: 0;
    }
    .channel-logo img { width: 100%; height: 100%; }
    .channel-logo span { font-size: 15px !important; }
    .channel-name { font-size: 15px !important; font-weight: 600; }
    .channel-group { font-size: 12px !important; }

    /* Kanal sayısı */
    .channel-count { font-size: 13px !important; }

    /* Player üst bar */
    .player-topbar { padding: 18px 28px !important; }
    .channel-logo-placeholder {
        width: 56px !important; height: 56px !important;
        border-radius: 14px !important;
    }
    .channel-logo-placeholder span { font-size: 20px !important; }
    #currentName { font-size: 22px !important; }
    .live-badge { font-size: 12px !important; padding: 4px 12px !important; }
    .stream-stats { font-size: 13px !important; }
    .kbd-hint { font-size: 12px !important; }
    .kbd-hint kbd { font-size: 11px !important; }

    /* Video kontrolleri */
    .custom-controls { padding: 0 28px 20px !important; }
    .ctrl-btn { width: 48px !important; height: 48px !important; }
    .ctrl-btn svg { width: 22px !important; height: 22px !important; }
    .play-btn { width: 58px !important; height: 58px !important; }
    .play-btn svg { width: 26px !important; height: 26px !important; }
    .volume-slider { width: 120px !important; height: 5px !important; }
    .time-display { font-size: 14px !important; }
    .ctrl-live { font-size: 12px !important; }
    .quality-label { font-size: 14px !important; }
    .quality-btn { padding: 0 14px !important; gap: 8px !important; font-size: 13px !important; }

    /* Progress bar */
    .progress-track { height: 5px !important; }
    .progress-knob { width: 14px !important; height: 14px !important; right: -7px !important; top: -5px !important; }

    /* Placeholder ekranı */
    .ph-title { font-size: 22px !important; }
    .ph-sub { font-size: 16px !important; }

    /* Hata ekranı */
    .err-title { font-size: 18px !important; }
    .retry-btn { font-size: 16px !important; padding: 12px 28px !important; border-radius: 14px !important; }

    /* Yükleniyor yazısı */
    .loader-text { font-size: 17px !important; }

    /* Popup menüler */
    .display-menu { min-width: 260px !important; padding: 18px !important; }
    .menu-header { font-size: 15px !important; }
    .setting-item label { font-size: 13px !important; }
    .speed-menu, .quality-menu { min-width: 200px !important; }
    .q-item { font-size: 15px !important; padding: 10px !important; }
    .q-res { font-size: 15px !important; }
    .q-bitrate { font-size: 12px !important; }
    .q-badge { font-size: 11px !important; }

    /* Tooltip */
    .ch-preview-tooltip { padding: 14px !important; border-radius: 18px !important; }
    .tooltip-name { font-size: 15px !important; }
    .tooltip-group { font-size: 12px !important; }
    .tooltip-action { font-size: 12px !important; }

    /* Scrollbar biraz daha görünür */
    ::-webkit-scrollbar { width: 5px; }
}

/* --- 4K Ekran (3840px ve üzeri) --- */
@media (min-width: 3840px) {
    body { font-size: 28px; }
    .sidebar { width: 480px !important; }
    .side-nav { width: 110px !important; }
    .channel-item { min-height: 96px; padding: 18px 26px !important; }
    .channel-logo { width: 68px !important; height: 68px !important; }
    .channel-name { font-size: 22px !important; }
    .channel-group { font-size: 17px !important; }
    #currentName { font-size: 32px !important; }
    .ctrl-btn { width: 68px !important; height: 68px !important; }
    .play-btn { width: 84px !important; height: 84px !important; }
}

/* --- TV Odak Stilleri (Uzaktan Kumanda Navigasyonu) --- */
@media (min-width: 1920px) {
    /* Tüm tıklanabilir öğeler için odak halkası */
    .channel-item:focus,
    .nav-item:focus,
    .filter-btn:focus,
    .ctrl-btn:focus,
    .retry-btn:focus,
    .hd-toggle-btn:focus,
    .view-toggle-btn:focus {
        outline: 3px solid var(--primary) !important;
        outline-offset: 3px;
        box-shadow: 0 0 0 6px var(--primary-glow) !important;
    }

    /* Klavye navigasyonu için hover efektini güçlendir */
    .channel-item:hover,
    .channel-item:focus {
        background: rgba(0,212,180,0.12) !important;
        transform: translateX(4px) !important;
        transition: all 0.15s var(--ease) !important;
    }

    /* Kontrol butonları hover */
    .ctrl-btn:hover,
    .ctrl-btn:focus {
        background: rgba(255,255,255,0.15) !important;
        transform: scale(1.12) !important;
    }
}

/* --- TV Yatay / Landscape Optimizasyonu --- */
@media (min-width: 1920px) and (orientation: landscape) {
    /* Video alanı maksimum alan kullansın */
    .video-stage { flex: 1; }
    
    /* Orb animasyonları TV'de performans için sadeleşsin */
    .orb {
        animation-duration: 40s !important;
        opacity: 0.08 !important;
    }

    /* Noise overlay TV'de kapat (LCD'de gereksiz) */
    .noise-overlay { display: none; }
}

/* --- TV Cursor Gizleme (Inactivity) --- */
@media (min-width: 1920px) {
    body.hide-cursor * { cursor: none !important; }
}
