:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --surface: rgba(20, 20, 20, 0.85);
  --surface-2: rgba(28, 28, 28, 0.92);
  --glass: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(239, 68, 68, 0.35);
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --muted-2: #5a5a5a;
  --accent: #ef4444;
  --accent-lt: #f87171;
  --accent-dk: #b91c1c;
  --accent-glow: rgba(239, 68, 68, 0.3);
  --live: #ef4444;
  --live-glow: rgba(239, 68, 68, 0.4);
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.3);
  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(239, 68, 68, 0.18);
  --maxw: 1280px;
  --gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  --gradient-warm: linear-gradient(135deg, #fbbf24 0%, #ef4444 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse 800px 600px at 20% 0%, rgba(239, 68, 68, 0.07), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 10%, rgba(220, 38, 38, 0.05), transparent 50%),
    radial-gradient(ellipse 400px 300px at 50% 100%, rgba(251, 191, 36, 0.03), transparent 60%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  position: relative; width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--gradient);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.brand-mark::after {
  content: ''; width: 0; height: 0;
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.brand-text {
  font-family: 'Anton', 'Impact', system-ui, sans-serif;
  font-weight: 400; font-size: 26px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.brand-text span { 
  -webkit-text-fill-color: #fbbf24;
  background: none;
}

.search-box {
  flex: 1; max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 0 16px; height: 44px; border-radius: 12px;
  color: var(--muted); transition: all 0.3s ease;
}
.search-box:focus-within { 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.search-box input::placeholder { color: var(--muted-2); }

.status-pill {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 12px; color: var(--muted); font-weight: 600;
  background: var(--glass); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 10px;
  letter-spacing: 0.02em;
}
.header-store {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  background: var(--gradient);
  border: none; border-radius: 10px;
  padding: 10px 16px; 
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transition: all 0.3s ease;
}
.header-store:hover { 
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}
.header-store svg { flex-shrink: 0; }
.header-support {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 12px; font-weight: 600; color: var(--text);
  border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 10px;
  padding: 8px 14px;
  background: var(--glass);
  transition: all 0.3s ease;
}
.header-support svg { color: var(--accent-lt); flex-shrink: 0; }
.header-support:hover { 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted);
  background: var(--glass); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; transition: all 0.3s ease;
}
.lang-toggle svg { flex-shrink: 0; }
.lang-toggle:hover { 
  color: var(--text); 
  border-color: var(--accent);
  background: rgba(239, 68, 68, 0.05);
}

.status-pill .dot { 
  width: 8px; height: 8px; border-radius: 50%; 
  background: var(--muted-2); 
  transition: all 0.3s ease;
}
.status-pill.online .dot { 
  background: var(--green); 
  box-shadow: 0 0 12px var(--green-glow);
}
.status-pill.error .dot { 
  background: var(--live); 
  box-shadow: 0 0 12px var(--live-glow);
}

/* Tabs */
.tabs-bar {
  position: sticky; top: 68px; z-index: 30;
  background: rgba(5, 5, 16, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.tabs { 
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; 
}
.tab {
  flex-shrink: 0; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  background: var(--glass); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: 13px;
  white-space: nowrap; transition: all 0.25s ease;
  letter-spacing: 0.02em;
}
.tab:hover { 
  color: var(--text); 
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}
.tab.active { 
  background: var(--gradient); 
  color: #fff; 
  border-color: transparent;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.tab .tab-count {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.1); color: inherit;
}
.tab.active .tab-count { background: rgba(255, 255, 255, 0.2); }

/* Time filter bar */
.timefilter-bar { 
  border-bottom: 1px solid var(--border); 
  background: rgba(5, 5, 16, 0.6);
}
.timefilter-inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.timefilter-inner::-webkit-scrollbar { display: none; }
.tf-chip {
  flex-shrink: 0; cursor: pointer; user-select: none; white-space: nowrap;
  padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 12px;
  background: var(--glass); border: 1px solid var(--border); color: var(--muted);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}
.tf-chip:hover { 
  color: var(--text); 
  border-color: rgba(239, 68, 68, 0.3);
}
.tf-chip.active { 
  background: rgba(239, 68, 68, 0.1); 
  border-color: var(--accent); 
  color: var(--text);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

/* Meta row */
.meta-row { 
  display: flex; align-items: center; justify-content: space-between; 
  gap: 16px; margin: 32px 0 24px; flex-wrap: wrap; 
}
.label-section {
  font-family: 'Geist', sans-serif; font-size: .65rem; font-weight: 600;
  letter-spacing: .5em; text-transform: uppercase; color: var(--accent-lt);
  display: flex; align-items: center; gap: 1rem;
}
.label-section::before {
  content: ''; display: block; width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.meta-right { display: flex; align-items: center; gap: 14px; }
.count-chip { 
  background: var(--glass); 
  border: 1px solid var(--border); 
  color: var(--accent-lt); 
  font-weight: 700; font-size: 12px; 
  padding: 6px 14px; border-radius: 8px;
  letter-spacing: 0.02em;
}
.updated { font-size: 12px; color: var(--muted-2); }

/* Grid */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-bottom: 60px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.card:hover { 
  transform: translateY(-8px); 
  border-color: var(--border-glow); 
  box-shadow: var(--shadow-glow);
}
.poster { position: relative; aspect-ratio: 16/9; background: var(--bg-2); overflow: hidden; }
.poster img { 
  width: 100%; height: 100%; object-fit: cover; display: block; 
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
}
.card:hover .poster img { transform: scale(1.08); }
.poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
}
.poster-fallback .pf-league { 
  font-size: 11px; color: var(--accent-lt); font-weight: 700; 
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; 
}
.poster-fallback .pf-tag { 
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; 
  font-weight: 700; font-size: 20px; line-height: 1.3; color: var(--text); 
}

.badge {
  position: absolute; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  padding: 6px 12px; border-radius: 8px; 
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.badge.live { 
  background: rgba(255, 77, 106, 0.9); 
  color: #fff;
  box-shadow: 0 0 20px var(--live-glow);
}
.badge.live .blink { 
  width: 7px; height: 7px; border-radius: 50%; background: #fff; 
  animation: blink 1.2s infinite; 
}
.badge.soon { 
  background: rgba(251, 191, 36, 0.9); 
  color: #1a1400;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}
.badge.ended { 
  background: rgba(100, 100, 130, 0.85); 
  color: #fff; 
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.server-count {
  position: absolute; bottom: 12px; right: 12px;
  font-size: 11px; font-weight: 600; color: var(--text);
  background: rgba(5, 5, 16, 0.85); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 8px; 
  backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}
.card-body { 
  padding: 16px 18px 18px; 
  display: flex; flex-direction: column; gap: 10px; flex: 1; 
}
.card-league { 
  font-size: 11px; color: var(--accent-lt); font-weight: 700; 
  text-transform: uppercase; letter-spacing: .6px; 
}
.card-title { 
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; 
  font-weight: 700; font-size: 18px; line-height: 1.3; 
}
.card-foot { 
  margin-top: auto; display: flex; align-items: center; 
  justify-content: space-between; gap: 10px; padding-top: 8px; 
}
.card-time { 
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px;
  letter-spacing: 0.02em;
}
.card-time svg { opacity: .7; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: var(--gradient);
  padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}
.watch-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

/* Empty / loading */
.empty { text-align: center; color: var(--muted-2); padding: 80px 20px; }
.empty svg { opacity: .4; margin-bottom: 16px; color: var(--accent-lt); }
.loading { 
  display: flex; align-items: center; justify-content: center; 
  gap: 12px; color: var(--muted); padding: 70px; 
}
.spinner { 
  width: 20px; height: 20px; 
  border: 2.5px solid var(--border); 
  border-top-color: var(--accent); 
  border-radius: 50%; 
  animation: spin .8s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border); 
  padding: 32px 0 48px; 
  color: var(--muted); 
  margin-top: 16px; 
}
.site-footer p { margin: 4px 0; font-size: 13px; }
.site-footer strong { color: var(--accent-lt); }
.support-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
  border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 10px;
  padding: 12px 20px;
  background: var(--glass);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}
.support-link svg { color: var(--accent-lt); flex-shrink: 0; }
.support-link:hover { 
  border-color: var(--accent); 
  color: var(--text); 
  background: rgba(239, 68, 68, 0.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

/* Player modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 16, 0.92); 
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade 0.2s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.player-box {
  width: 100%; max-width: 1400px; 
  background: var(--surface);
  border: 1px solid var(--border); 
  border-radius: var(--radius);
  overflow: hidden; 
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.25s ease;
  display: flex; flex-direction: column; max-height: 94vh;
  backdrop-filter: blur(20px);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.player-head { 
  display: flex; align-items: center; justify-content: space-between; 
  gap: 16px; padding: 16px 20px; 
  border-bottom: 1px solid var(--border); 
}
.ph-league { 
  font-size: 11px; color: var(--accent-lt); font-weight: 700; 
  text-transform: uppercase; letter-spacing: .6px; 
}
.ph-title { 
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; 
  font-weight: 700; font-size: 20px; line-height: 1.3; 
}
.icon-btn { 
  background: var(--glass); border: 1px solid var(--border); 
  color: var(--text); width: 40px; height: 40px; border-radius: 10px; 
  cursor: pointer; display: grid; place-items: center; 
  transition: all 0.3s ease; flex-shrink: 0; 
}
.icon-btn:hover { 
  background: rgba(239, 68, 68, 0.1); 
  border-color: var(--accent); 
  color: var(--accent-lt);
}
.player-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.frame-hint { 
  position: absolute; inset: 0; display: grid; place-items: center; 
  text-align: center; padding: 24px; color: var(--muted); font-size: 14px; 
  pointer-events: none; 
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
}
.server-bar { 
  display: flex; align-items: flex-start; gap: 14px; 
  padding: 16px 20px; border-top: 1px solid var(--border); overflow-y: auto; 
}
.server-label { 
  font-size: 12px; color: var(--muted); font-weight: 600; 
  padding-top: 6px; flex-shrink: 0; 
  letter-spacing: 0.02em;
}
.server-list { display: flex; flex-wrap: wrap; gap: 8px; }
.server-chip {
  cursor: pointer; font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
  background: var(--glass); border: 1px solid var(--border); color: var(--muted);
  transition: all 0.3s ease; white-space: nowrap;
  letter-spacing: 0.02em;
}
.server-chip:hover { 
  color: var(--text); 
  border-color: var(--accent);
  background: rgba(239, 68, 68, 0.05);
}
.server-chip.active { 
  background: var(--gradient); 
  color: #fff; 
  border-color: transparent;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Player content (video + side panel) */
.player-content { display: flex; align-items: stretch; min-height: 0; flex: 1; }
.player-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-panel {
  width: 360px; flex-shrink: 0; display: flex; flex-direction: column;
  border-left: 1px solid var(--border); background: var(--bg-2);
  min-height: 0;
}
.side-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.side-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.side-tab {
  cursor: pointer; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); white-space: nowrap;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}
.side-tab:hover { color: var(--text); }
.side-tab.active { 
  background: rgba(239, 68, 68, 0.1); 
  border-color: var(--accent); 
  color: var(--text);
}
.viewer-count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px;
  letter-spacing: 0.02em;
}
.vc-dot { 
  width: 7px; height: 7px; border-radius: 50%; 
  background: var(--green); 
  box-shadow: 0 0 10px var(--green-glow);
  animation: pulseDot 1.6s ease-in-out infinite; 
}

.side-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.side-body.hidden { display: none; }

.identity { 
  padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; 
}
.identity.hidden { display: none; }
.id-row { display: flex; gap: 8px; }
.id-row input {
  flex: 1; background: var(--glass); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; min-width: 0;
  transition: all 0.3s ease;
}
.id-row input:focus { 
  border-color: var(--accent);
  background: rgba(239, 68, 68, 0.05);
}
.id-save {
  background: var(--gradient);
  border: none; color: #fff;
  font-weight: 700; font-size: 12px; padding: 10px 16px; border-radius: 8px; cursor: pointer;
  font-family: inherit; transition: all 0.3s ease;
  letter-spacing: 0.02em;
}
.id-save:hover { 
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.id-hint { margin: 8px 0 0; font-size: 11px; color: var(--muted-2); }

.messages { 
  flex: 1; overflow-y: auto; padding: 14px 16px; 
  display: flex; flex-direction: column; gap: 10px; 
}
.msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg-you .msg-name { color: var(--accent-lt); }
.msg-name { font-weight: 700; color: var(--accent); margin-right: 6px; }
.msg-time { font-size: 10px; color: var(--muted-2); margin-left: 6px; }
.msg-sys { 
  font-size: 11px; color: var(--muted-2); font-style: italic; 
  text-align: center; padding: 4px 0; 
}

.composer { 
  display: flex; gap: 8px; padding: 14px 16px; 
  border-top: 1px solid var(--border); flex-shrink: 0; 
}
.composer input {
  flex: 1; background: var(--glass); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; min-width: 0;
  transition: all 0.3s ease;
}
.composer input:focus:not(:disabled) { 
  border-color: var(--accent);
  background: rgba(239, 68, 68, 0.05);
}
.composer input:disabled, .composer button:disabled { opacity: .5; cursor: not-allowed; }
.composer button {
  display: grid; place-items: center; padding: 0; width: 40px; flex-shrink: 0;
  background: var(--gradient);
  border: none; color: #fff;
  border-radius: 8px; cursor: pointer; font-family: inherit;
  transition: all 0.3s ease;
}
.composer button:hover:not(:disabled) { 
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.composer button svg { color: #fff; }

.about-card { padding: 20px; }
.about-card h3 { 
  margin: 0 0 16px; 
  font-family: 'Bricolage Grotesque', sans-serif; 
  font-weight: 700; font-size: 16px; 
}
.about-card dl { 
  display: grid; grid-template-columns: max-content 1fr; 
  gap: 8px 16px; margin: 0; font-size: 13px; 
}
.about-card dt { color: var(--muted-2); }
.about-card dd { margin: 0; color: var(--text); }
.about-tip { 
  margin: 16px 0 0; padding: 12px 14px; 
  border: 1px solid var(--border); border-radius: 10px; 
  font-size: 12px; color: var(--muted); 
  background: var(--glass); 
}

/* Live toggle tab */
.tab-live .live-dot { 
  width: 7px; height: 7px; border-radius: 50%; 
  background: var(--live); 
  box-shadow: 0 0 10px var(--live-glow);
  animation: pulseDot 1.6s ease-in-out infinite; 
}
.tab-live.active { 
  background: var(--live); 
  color: #fff; 
  border-color: transparent;
  box-shadow: 0 0 20px var(--live-glow);
}
.tab-live.active .live-dot { background: #fff; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* Favorite button on cards */
.card { position: relative; }
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; cursor: pointer;
  background: rgba(5, 5, 16, 0.7); border: 1px solid var(--border);
  color: var(--muted); backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.fav-btn:hover { 
  color: var(--accent-lt); 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.1);
}
.fav-btn.active { 
  color: var(--accent-lt); 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.15);
}

/* Player header actions */
.ph-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ph-action {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; background: var(--glass);
  transition: all 0.3s ease; white-space: nowrap;
  letter-spacing: 0.02em;
}
.ph-action svg { color: var(--accent-lt); flex-shrink: 0; }
.ph-action:hover { 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.05);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}
#reportServer svg { color: #fbbf24; }
#reportServer:hover { 
  border-color: #fbbf24; 
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

/* Theater / fullscreen mode */
body.theater .player-box { 
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; 
  border-radius: 0; border: none; 
}
body.theater .player-frame { flex: 1; aspect-ratio: auto; }
body.theater .modal-overlay { padding: 0; }

/* Loading skeleton */
.skeleton-grid { 
  display: grid; gap: 20px; 
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
}
.skel-card { 
  background: var(--surface); border: 1px solid var(--border); 
  border-radius: var(--radius); overflow: hidden; 
}
.skel-poster { aspect-ratio: 16/9; background: var(--surface-2); }
.skel-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.skel-line { 
  height: 12px; border-radius: 6px; 
  background: linear-gradient(90deg, var(--surface-2), rgba(239, 68, 68, 0.05), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skel-line.sm { width: 40%; height: 10px; }
.skel-line.lg { width: 80%; height: 16px; }
@keyframes shimmer { 
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Countdown / reminder overlay */
.soon-overlay { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soon-label { 
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase; 
  color: var(--muted); 
}
.soon-count { 
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; 
  font-weight: 800; font-size: 36px; 
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.soon-kick { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.soon-remind {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #fff;
  border: none; border-radius: 10px; padding: 12px 20px;
  background: var(--gradient);
  transition: all 0.3s ease; pointer-events: auto;
  letter-spacing: 0.02em;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
.soon-remind svg { color: #fff; }
.soon-remind:hover { 
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}
.soon-watch { 
  background: none; border: none; color: var(--muted-2); 
  font-size: 12px; cursor: pointer; text-decoration: underline; 
  pointer-events: auto; margin-top: 4px; 
  transition: color 0.3s ease;
}
.soon-watch:hover { color: var(--text); }

/* Responsive */
@media (max-width: 720px) {
  .header-inner { height: auto; flex-wrap: wrap; padding: 14px 0; gap: 12px; }
  .search-box { order: 3; max-width: none; flex-basis: 100%; }
  .brand { flex: 1; }
  .tabs-bar { top: 120px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
  .card-title { font-size: 16px; }
  .poster-fallback .pf-tag { font-size: 16px; }
  .server-bar { flex-direction: column; gap: 10px; }
  .header-store span { display: none; }
  .header-store { padding: 10px 12px; }
  .header-support span { display: none; }
  .header-support { padding: 8px 12px; }
  .ph-action span { display: none; }
  .ph-action { padding: 8px 10px; }
  .ph-actions { gap: 6px; }
  .player-content { flex-direction: column; }
  .side-panel { 
    width: 100%; border-left: none; 
    border-top: 1px solid var(--border); 
    height: 320px; flex-shrink: 0; 
  }
}

/* Telegram join popup */
.tg-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 5, 16, 0.85); 
  backdrop-filter: blur(12px);
  animation: fade 0.2s ease;
}
.tg-overlay.closing { animation: fade 0.2s ease reverse; }
.tg-modal {
  position: relative; width: 100%; max-width: 440px; text-align: center;
  background: var(--surface);
  border: 1px solid var(--border); 
  border-radius: var(--radius);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5); 
  padding: 36px 32px 30px; 
  animation: slideUp 0.25s ease;
  backdrop-filter: blur(20px);
}
.tg-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); cursor: pointer; transition: all 0.3s ease;
}
.tg-close:hover { 
  color: var(--text); 
  border-color: var(--accent); 
  background: rgba(239, 68, 68, 0.1);
}
.tg-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}
.tg-icon svg { color: #fff; }
.tg-title { 
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; 
  font-weight: 800; font-size: 22px; margin-bottom: 10px; 
}
.tg-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.tg-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px; color: #fff;
  background: var(--gradient);
  border: none; border-radius: 10px; padding: 14px 28px;
  cursor: pointer; transition: all 0.3s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}
.tg-cta:hover { 
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.6);
}
.tg-cta svg { flex-shrink: 0; }
.tg-later {
  display: block; margin: 16px auto 0; background: none; border: none;
  color: var(--muted-2); font-size: 13px; cursor: pointer; 
  transition: color 0.3s ease;
}
.tg-later:hover { color: var(--text); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
  background: rgba(239, 68, 68, 0.2); 
  border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { 
  background: rgba(239, 68, 68, 0.4); 
}

/* Selection color */
::selection {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}
