/* ============================================================
   COUB.XYZ — style.css
   TikTok-inspired vertical live TV platform
   ============================================================ */

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #0a0a0f;
  color: #f0f0f5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* TOKENS */
:root {
  --accent: #ff3d5a;
  --accent2: #ff8c42;
  --live: #ff3d5a;
  --gold: #ffd700;
  --bg: #0a0a0f;
  --bg2: #13131a;
  --bg3: #1c1c26;
  --glass: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --muted: #7a7a90;
  --topbar-h: 56px;
  --bottom-nav-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
ul { list-style: none; }

.hidden { display: none !important; }
.accent { color: var(--accent); }

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  animation: splashFade 0.5s ease 2.2s forwards;
}
@keyframes splashFade { to { opacity: 0; pointer-events: none; } }

.splash-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 36px; font-weight: 800;
  animation: splashSlide 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes splashSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.splash-icon {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 32px rgba(255,61,90,0.5);
  animation: splashPulse 1s ease infinite alternate 0.6s;
}
@keyframes splashPulse { to { box-shadow: 0 0 48px rgba(255,61,90,0.8); } }

.splash-name { font-size: 32px; font-weight: 800; }
.splash-tagline {
  font-size: 14px; color: var(--muted); letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: splashSlide 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
}

.splash-loader {
  display: flex; gap: 6px; margin-top: 24px;
  animation: splashSlide 0.6s ease 0.3s both;
}
.splash-loader span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: dotBounce 0.8s ease infinite;
}
.splash-loader span:nth-child(2) { animation-delay: 0.15s; }
.splash-loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.5); opacity: 1; }
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: flex; flex-direction: column;
  min-height: 100dvh;
  animation: appReveal 0.4s ease 2.3s both;
}
@keyframes appReveal { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(to bottom, rgba(10,10,15,0.95), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar-logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  cursor: pointer;
  transition: opacity var(--transition);
}
.topbar-logo:active { opacity: 0.7; }

.topbar-actions { display: flex; gap: 4px; }

.topbar-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background var(--transition), transform 0.15s;
}
.topbar-btn:active { transform: scale(0.9); background: var(--glass); }
.lang-btn { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  animation: searchIn 0.25s ease both;
}
@keyframes searchIn { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.search-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }

.search-clear {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg3);
  font-size: 12px; color: var(--muted);
}

.search-filters {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.search-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 13px;
  transition: all var(--transition);
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search-results {
  flex: 1; overflow-y: auto;
  padding: 8px 16px 80px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}
.search-result-item:active { opacity: 0.6; }

.result-thumb {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }

.result-info { flex: 1; min-width: 0; }
.result-name {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.result-live {
  font-size: 11px; font-weight: 700;
  background: var(--live); color: #fff;
  padding: 3px 8px; border-radius: 20px;
  letter-spacing: 0.05em;
  animation: livePulse 2s ease infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.no-results {
  text-align: center; padding: 48px 16px;
  color: var(--muted);
}
.no-results-icon { font-size: 48px; margin-bottom: 12px; }

/* ============================================================
   DRAWER
   ============================================================ */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: min(300px, 85vw);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  animation: drawerIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
  overflow-y: auto;
}
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800;
}
.drawer-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg3);
  font-size: 14px;
}

.drawer-nav { padding: 12px 0; flex: 1; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  font-size: 15px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
}
.drawer-link:hover, .drawer-link.active {
  background: var(--glass);
  color: var(--accent);
}

.drawer-lang { padding: 16px 20px; border-top: 1px solid var(--border); }
.drawer-lang-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.lang-options { display: flex; gap: 8px; }
.lang-opt {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
}
.lang-opt.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.drawer-email { font-size: 13px; color: var(--muted); transition: color var(--transition); }
.drawer-email:hover { color: var(--accent); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  flex: 1;
  padding-top: var(--topbar-h);
  padding-bottom: var(--bottom-nav-h);
  min-height: 100dvh;
}

.view { display: none; }
.view.active { display: block; }

/* ============================================================
   CATEGORY RAIL
   ============================================================ */
.category-rail {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 90;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px;
  background: linear-gradient(to bottom, rgba(10,10,15,0.98), rgba(10,10,15,0.6));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-rail::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ============================================================
   REEL FEED
   ============================================================ */
.reel-feed {
  margin-top: 50px; /* below category rail */
  height: calc(100dvh - var(--topbar-h) - 50px - var(--bottom-nav-h));
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reel-feed::-webkit-scrollbar { display: none; }

/* REEL CARD */
.reel-card {
  height: calc(100dvh - var(--topbar-h) - 50px - var(--bottom-nav-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  background: var(--bg2);
  overflow: hidden;
  cursor: pointer;
}

.reel-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  display: flex; align-items: center; justify-content: center;
}
.reel-emoji {
  font-size: clamp(60px, 20vw, 120px);
  opacity: 0.15;
  user-select: none;
}

/* Gradient overlays */
.reel-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(0,0,0,0.7) 75%,
    rgba(0,0,0,0.95) 100%
  );
  z-index: 1;
}
.reel-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  z-index: 1;
}

/* Video embed */
.reel-iframe-wrap {
  position: absolute; inset: 0;
  z-index: 0;
}
.reel-iframe-wrap iframe {
  width: 100%; height: 100%;
  border: none;
  pointer-events: none;
}

/* LIVE BADGE */
.reel-live-badge {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  background: var(--live);
  color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 6px;
  letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 5px;
}
.reel-live-badge::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: livePulse 1.5s ease infinite;
}

/* SIDE ACTIONS */
.reel-actions {
  position: absolute; right: 16px; bottom: 120px; z-index: 10;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
}

.reel-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff;
  transition: transform 0.15s;
  background: none; border: none;
}
.reel-action-btn:active { transform: scale(0.85); }

.reel-action-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  transition: background var(--transition);
}
.reel-action-btn:active .reel-action-icon { background: rgba(255,61,90,0.4); }
.reel-action-btn.active .reel-action-icon { background: var(--accent); }

.reel-action-label { font-size: 11px; font-weight: 600; }

/* MUTE BTN */
.reel-mute {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  transition: transform 0.15s;
}
.reel-mute:active { transform: scale(0.9); }

/* REEL INFO */
.reel-info {
  position: absolute; bottom: 24px; left: 16px; right: 80px; z-index: 5;
}
.reel-channel-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.reel-channel-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.reel-channel-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700;
}
.reel-channel-country { font-size: 12px; color: rgba(255,255,255,0.6); }
.reel-desc {
  font-size: 13px; color: rgba(255,255,255,0.8);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-cat-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}

/* PLAY OVERLAY */
.reel-play-overlay {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.reel-play-overlay.show { opacity: 1; pointer-events: auto; }
.play-icon-big {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.reel-play-overlay.show .play-icon-big { transform: scale(1); }

/* SWIPE HINT */
.swipe-hint {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); left: 50%; transform: translateX(-50%);
  z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  animation: swipeHintFade 3s ease 3s forwards;
  pointer-events: none;
}
@keyframes swipeHintFade { to { opacity: 0; } }
.swipe-hint svg { animation: bounce 1.5s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ============================================================
   VIEW HEADER
   ============================================================ */
.view-header {
  padding: 24px 20px 12px;
}
.view-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  margin-bottom: 4px;
}
.view-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
}
.view-header p { font-size: 14px; color: var(--muted); }

/* ============================================================
   CHANNEL DIRECTORY
   ============================================================ */
.dir-categories {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 16px 16px;
  scrollbar-width: none;
}
.dir-categories::-webkit-scrollbar { display: none; }

.dir-cat-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.dir-cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 16px 100px;
}

.dir-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}
.dir-card:active { transform: scale(0.96); }

.dir-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  position: relative;
}
.dir-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.dir-card-live-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--live); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.08em;
}

.dir-card-body { padding: 10px; }
.dir-card-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.dir-card-meta { font-size: 11px; color: var(--muted); }

/* ============================================================
   SPORTS HUB
   ============================================================ */
.sports-header h2 { color: #fff; }

.sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 16px;
}

.sports-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sports-card:active { transform: scale(0.95); }
.sports-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,61,90,0.05), transparent);
}
.sports-card-icon { font-size: 32px; margin-bottom: 8px; }
.sports-card-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.sports-card-meta { font-size: 11px; color: var(--muted); }

.schedule-list {
  padding: 0 16px 100px;
  display: flex; flex-direction: column; gap: 8px;
}

.schedule-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.schedule-time {
  font-size: 12px; font-weight: 700; color: var(--accent);
  width: 48px; flex-shrink: 0;
}
.schedule-info { flex: 1; min-width: 0; }
.schedule-match { font-size: 14px; font-weight: 600; }
.schedule-channel { font-size: 12px; color: var(--muted); }
.schedule-sport {
  font-size: 11px; padding: 3px 8px;
  background: var(--bg3); border-radius: 20px;
  white-space: nowrap;
}

/* ============================================================
   FAVORITES
   ============================================================ */
.fav-section { padding: 0 16px 20px; }
.fav-section h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  margin-bottom: 12px; padding-top: 8px;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.fav-empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center; color: var(--muted); font-size: 14px;
}
.fav-empty-icon { font-size: 36px; margin-bottom: 8px; }

/* ============================================================
   CHANNEL PAGE
   ============================================================ */
.channel-page { padding: 0 0 100px; }

.ch-hero {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ch-hero-bg {
  position: absolute; inset: 0;
  font-size: 120px; opacity: 0.08;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.ch-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
}

.ch-logo {
  width: 80px; height: 80px;
  background: var(--bg2);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 1;
}

.ch-meta { padding: 20px; }
.ch-name {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800; margin-bottom: 6px;
}
.ch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ch-tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg3);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--border);
}
.ch-tag.live { background: var(--live); border-color: var(--live); color: #fff; }

.ch-desc { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 20px; }

.ch-actions { display: flex; gap: 10px; }
.ch-btn {
  flex: 1; padding: 14px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  font-family: inherit;
  transition: all var(--transition);
}
.ch-btn-watch {
  background: var(--accent);
  color: #fff;
}
.ch-btn-watch:active { opacity: 0.85; transform: scale(0.97); }
.ch-btn-fav {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
}
.ch-btn-fav.active { border-color: var(--accent); color: var(--accent); }
.ch-btn-share {
  width: 48px; flex: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}

.ch-back {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; color: #fff; cursor: pointer;
}

/* ============================================================
   PREMIUM PAGE
   ============================================================ */
.premium-hero {
  padding: 40px 24px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,61,90,0.15), rgba(255,140,66,0.1));
  border-bottom: 1px solid var(--border);
}
.premium-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 20px;
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(255,61,90,0.4);
}
.premium-hero h2 {
  font-family: 'Syne', sans-serif;
  font-size: 28px; font-weight: 800;
  line-height: 1.2; margin-bottom: 12px;
}
.premium-hero p { font-size: 15px; color: var(--muted); }

.premium-plans {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 24px 16px;
}

.plan-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  position: relative;
}
.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(255,61,90,0.08), var(--bg2));
}

.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.1em;
}

.plan-name { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.plan-price { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--muted); }

.plan-features { text-align: left; margin-bottom: 20px; }
.plan-features li {
  font-size: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li.muted { color: var(--muted); }

.plan-btn {
  width: 100%; padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  font-family: inherit;
  background: var(--accent); color: #fff;
  transition: opacity var(--transition);
}
.plan-btn:active { opacity: 0.8; }
.plan-btn.secondary { background: var(--bg3); border: 1px solid var(--border); color: var(--muted); }

.donate-section {
  margin: 8px 16px 100px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.donate-section h3 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.donate-section p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.donate-btn {
  padding: 14px 32px;
  background: linear-gradient(90deg, #ff3d5a, #ff8c42);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(255,61,90,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}
.donate-btn:active { transform: scale(0.96); box-shadow: 0 2px 10px rgba(255,61,90,0.2); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-card {
  margin: 0 16px 100px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.contact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-of-type { border-bottom: none; }
.contact-row a, .contact-row span { font-size: 15px; font-weight: 500; }
.contact-row a { color: var(--accent); }
.contact-note {
  margin-top: 16px;
  font-size: 14px; color: var(--muted); line-height: 1.6;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--accent); }
.nav-item:active { opacity: 0.7; }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 500;
  background: rgba(30,30,40,0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   LANGUAGE MODAL
   ============================================================ */
.lang-modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lang-modal-content {
  width: 100%; max-width: 500px;
  background: var(--bg2);
  border-radius: var(--radius) var(--radius) 0 0;
  border-top: 1px solid var(--border);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
  animation: modalUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes modalUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.lang-modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  margin-bottom: 16px;
}
.lang-modal-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-modal-opt {
  padding: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  transition: all var(--transition);
}
.lang-modal-opt.active { border-color: var(--accent); color: var(--accent); }
.lang-flag { font-size: 20px; }

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ============================================================
   ANIMATIONS & TRANSITIONS
   ============================================================ */
.fade-in { animation: fadeIn 0.3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.slide-up { animation: slideUp 0.35s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
  .premium-plans { grid-template-columns: 240px 240px; justify-content: center; }
  .dir-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .sports-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (min-width: 900px) {
  .reel-feed {
    max-width: 420px; margin: 50px auto 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .topbar { max-width: 1200px; margin: 0 auto; left: 50%; transform: translateX(-50%); right: auto; width: 100%; }
  .bottom-nav { max-width: 900px; left: 50%; transform: translateX(-50%); right: auto; }
  .category-rail { max-width: 900px; left: 50%; transform: translateX(-50%); right: auto; }
}

/* RTL support */
[dir="rtl"] .drawer { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .reel-actions { right: auto; left: 16px; }
[dir="rtl"] .reel-info { left: 80px; right: 16px; }
