/* =========================================
   VARIABLES & RESET
========================================= */
:root {
  --aqua: #4cc9f0;
  --aqua-soft: rgba(76, 201, 240, 0.30);
  --aqua-glow: rgba(76, 201, 240, 0.65);
  --red: #e8001c;
  --red-dark: #b0001a;
  --red-glow: rgba(232, 0, 28, 0.70);
  --gold: #f5c842;
  --bg: #080a0d;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.09);
  --text: #f0f2f5;
  --text-muted: #8a9bb0;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --radius: 14px;
  --transition: 0.22s ease;
}

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

/* =========================================
   PAGE
========================================= */
body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Particle canvas */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

/* =========================================
   HEADER
========================================= */
.site-header {
  position: relative;
  z-index: 10;
  padding: 12px 28px;
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.header-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1;
}
.header-logo-text span { color: var(--aqua); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-divider {
  color: rgba(255,255,255,0.35);
  font-size: 14px;
}
.btn-login {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  padding: 4px 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-login:hover { color: #fff; }

h1#pageTitle {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-align: center;
  padding: 22px 16px 10px;
  line-height: 1.2;
}



/* =========================================
   MAIN CONTENT
========================================= */
.main-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 10px;
}

/* =========================================
   PLAYER WRAP & CONTAINER
========================================= */
.player-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 6px auto 0;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 1px var(--aqua-soft),
    0 0 50px rgba(76,201,240,0.12),
    0 20px 60px rgba(0,0,0,0.7);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.player-container:hover {
  box-shadow:
    0 0 0 1px var(--aqua),
    0 0 60px rgba(76,201,240,0.22),
    0 20px 60px rgba(0,0,0,0.7);
  transform: translateY(-2px);
}

video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================
   CENTER PLAY OVERLAY
========================================= */
.play-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: rgba(0,0,0,0.25);
  transition: background var(--transition);
}
.play-overlay:hover { background: rgba(0,0,0,0.18); }

.play-ripple {
  position: absolute;
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(232,0,28,0.5);
  animation: ripple 2s ease-out infinite;
}
.play-ripple--delay { animation-delay: 0.9s; }
@keyframes ripple {
  0%   { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.7);  opacity: 0; }
}

.play-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--red-glow), 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  z-index: 2;
}
.play-overlay:hover .play-circle {
  transform: scale(1.1);
  box-shadow: 0 0 45px var(--red-glow), 0 4px 20px rgba(0,0,0,0.5);
}
.play-circle svg { margin-left: 4px; }

/* =========================================
   LOADER
========================================= */
.loader {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loader.active { opacity: 1; visibility: visible; }
.loader.fade-out { opacity: 0; visibility: hidden; }

.loader-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--aqua);
  animation: spin 0.85s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.loader-text {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--aqua);
  animation: textPulse 1.4s ease-in-out infinite;
}
@keyframes textPulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* =========================================
   PLAYER TOP BAR (score/time)
========================================= */
.player-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 30;
  pointer-events: none;
}
.player-container:hover .player-topbar {
  opacity: 1;
  transform: translateY(0);
}
/* Player top-right viewer count */
.player-viewers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 3px 9px;
}
.player-viewers svg { color: var(--aqua); flex-shrink: 0; }
#viewerCount { color: var(--aqua); }

/* =========================================
   BOTTOM CONTROLS
========================================= */
.bottom-controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 40;
}
.player-container:hover .bottom-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.bottom-left, .bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: var(--surface-hover);
}
.icon-btn svg { fill: rgba(255,255,255,0.85); transition: fill 0.15s ease; }
.icon-btn:hover svg { fill: #fff; }
.icon-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* Volume slider */
.vol-slider-wrap {
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
}
.bottom-left:hover .vol-slider-wrap,
.vol-slider-wrap:hover {
  width: 70px;
  opacity: 1;
}
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 66px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--aqua);
  cursor: pointer;
  box-shadow: 0 0 6px var(--aqua-glow);
}
.vol-slider::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--aqua);
  border: none;
  cursor: pointer;
}

/* Live badge */
.live-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
}
.on-air-glow {
  position: absolute;
  inset: -5px -8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 50%, rgba(232,0,28,0.5), transparent 70%);
  filter: blur(5px);
  z-index: -1;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  animation: liveBlink 0.9s infinite;
}
.live-text {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: #fff;
}
@keyframes liveBlink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.2; transform: scale(0.8); }
}

/* =========================================
   QUALITY STRIP
========================================= */
.quality-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.quality-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.quality-tag.hd {
  background: rgba(76,201,240,0.12);
  border-color: rgba(76,201,240,0.3);
  color: var(--aqua);
}
.quality-tag.nobuf {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
}

/* =========================================
   CTA BUTTON
========================================= */
.cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  gap: 8px;
}
.watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 36px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.watch-btn::before { display: none; }
.watch-btn:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.06);
}
.watch-btn:active { transform: scale(0.98); }
.watch-btn-icon { font-size: 14px; opacity: 0.85; }
.watch-btn-arrow { font-size: 16px; opacity: 0.65; }
.watch-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

.cta-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* =========================================
   TRUST BAR
========================================= */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 18px auto 0;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  flex-wrap: wrap;
  row-gap: 8px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0 16px;
}
.trust-item svg { color: var(--aqua); flex-shrink: 0; }
.trust-divider {
  width: 1px; height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* =========================================
   POPUP OVERLAY (shared)
========================================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.popup-overlay.open { display: flex; }

.popup-box {
  position: relative;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
  animation: popIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.popup-close {
  position: absolute;
  right: 14px; top: 12px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 22px;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}

/* =========================================
   SIGNUP POPUP
========================================= */
.signup-box {
  background: linear-gradient(160deg, #12161d 0%, #0d1117 100%);
  border: 1px solid rgba(255,255,255,0.1);
  width: min(360px, 94vw);
  padding: 32px 28px 24px;
  text-align: center;
  color: var(--text);
}
.popup-close { color: #888; }
.popup-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.signup-header { margin-bottom: 20px; }

/* Signal icon animation */
.signal-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-bottom: 12px;
}
.signal-icon span {
  width: 5px;
  background: var(--red);
  border-radius: 2px;
  animation: signalBar 1.2s ease-in-out infinite;
}
.signal-icon span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.signal-icon span:nth-child(2) { height: 11px; animation-delay: 0.15s; }
.signal-icon span:nth-child(3) { height: 16px; animation-delay: 0.3s; }
.signal-icon span:nth-child(4) { height: 22px; animation-delay: 0.45s; }
@keyframes signalBar {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.signup-box h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 6px;
}
.signup-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.signup-features {
  list-style: none;
  text-align: left;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.signup-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.feat-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(76,201,240,0.15);
  color: var(--aqua);
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.unlock-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--red) 0%, #ff1744 50%, var(--red-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--red-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.unlock-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.unlock-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--red-glow); }
.unlock-btn:active { transform: scale(0.98); }
.unlock-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

.signup-login {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.signup-login a {
  color: var(--aqua);
  text-decoration: none;
  font-weight: 600;
}
.signup-login a:hover { text-decoration: underline; }

.signup-secure {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* =========================================
   LEGAL POPUP BOX
========================================= */
.legal-box {
  background: #fff;
  width: min(520px, 93vw);
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
  padding: 40px 30px 28px;
  color: #111;
}
.legal-box .popup-close { color: #666; }
.legal-box .popup-close:hover { background: rgba(0,0,0,0.08); color: #000; }
.legal-box h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #111;
  margin: 0 0 16px;
  text-align: center;
  letter-spacing: 0.5px;
}
.legal-box p {
  font-size: 14px;
  line-height: 1.75;
  color: #333;
  margin: 0 0 12px;
}
.legal-box ul {
  margin: 6px 0 14px 20px;
  padding: 0;
}
.legal-box ul li {
  font-size: 14px;
  line-height: 1.75;
  color: #333;
}
.legal-note {
  font-size: 12px !important;
  color: #777 !important;
  font-style: italic;
}

/* =========================================
   CONTACT FORM
========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.contact-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 9px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #111;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}
.contact-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,0,28,0.1);
  background: #fff;
}
.contact-textarea { resize: vertical; min-height: 100px; }
.contact-submit { margin: 4px 0 0; }
.contact-confirm {
  color: #16a34a;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  background: rgba(22,163,74,0.08);
  border-radius: 8px;
  border: 1px solid rgba(22,163,74,0.25);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
  width: 100%;
  padding: 16px 0 14px;
  background: rgba(0,0,0,0.5);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  text-align: center;
}
.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 0;
  margin-bottom: 7px;
}
.footer-link {
  color: #606878;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 5px;
  transition: color var(--transition), background var(--transition);
}
.footer-link:hover {
  color: var(--aqua);
  background: rgba(76,201,240,0.07);
}
.footer-sep {
  color: rgba(255,255,255,0.15);
  font-size: 12px;
  user-select: none;
}
.footer-copy {
  font-size: 11px;
  color: #404550;
  letter-spacing: 0.3px;
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 640px) {
  .site-header { padding: 14px 16px 8px; }
  .bottom-controls { display: none !important; }
  .player-container { border-radius: 10px; cursor: pointer; }
  .trust-bar { gap: 0; padding: 10px 12px; }
  .trust-item { padding: 0 10px; font-size: 12px; }
  .trust-divider { height: 22px; }
  .watch-btn { font-size: 18px; padding: 14px 32px; }
  .legal-box { padding: 32px 18px 22px; }
  .signup-box { padding: 28px 20px 20px; }
}
@media (max-width: 400px) {
  .trust-bar { flex-direction: column; gap: 6px; }
  .trust-divider { width: 40px; height: 1px; }
  .trust-item { padding: 0; }
}
