/* ===================================================== */
/* 1️⃣ RESET & GLOBAL BASE */
/* ===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

:root,
html,
body {
  background: radial-gradient(circle at top, #1a1440, #05040d);
}

html {
  height: 100%;
}

body {
  min-height: 100svh;
  color: #f2f4ff;
  padding: 22px;
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  overscroll-behavior-y: none;
}

/* ===================================================== */
/* 2️⃣ HEADER */
/* ===================================================== */

.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7aa2ff;
}

.header p {
  margin-top: 6px;
  font-size: 14px;
  color: #b6c0ff;
}

/* ===================================================== */
/* 3️⃣ RESULTS CONTAINER */
/* ===================================================== */

.results {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ===================================================== */
/* 4️⃣ RESULT CARD (TRUE 16:9) */
/* ===================================================== */

.result-card {
  display: block;
  background: linear-gradient(
    135deg,
    rgba(35,40,90,0.9),
    rgba(5,5,20,0.9)
  );
  border-radius: 18px;
  margin-bottom: 18px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(140,160,255,0.25);
}

/* 🔥 TRUE 16:9 POSTER */
.card-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  background: #000;
}

/* CONTENT BELOW POSTER */
.card-content {
  padding: 14px 16px 16px;
}

.title {
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 600;
  color: #f1f3ff;
  margin-bottom: 6px;
}

.date {
  font-size: 12px;
  color: #a4afff;
}

/* ===================================================== */
/* 5️⃣ UX LOCKS */
/* ===================================================== */

.header,
.results,
.result-card {
  user-select: none;
}

input,
textarea {
  user-select: text;
}

/* ===================================================== */
/* 6️⃣ BACK TO TOP */
/* ===================================================== */

#backToTop {
  position: fixed;
  bottom: 90px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7aa2ff, #b36bff);
  color: #050818;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
  z-index: 9999;
}

/* ===================================================== */
/* 7️⃣ FOOTER */
/* ===================================================== */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 12px 12px;
  background: rgba(10,12,40,0.95);
  backdrop-filter: blur(6px);
  z-index: 999;
}

.footer-inner {
  max-width: 960px;
  margin: auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 13px;
  color: #9aa7ff;
  text-decoration: none;
}

.footer-links a:hover {
  color: #7aa2ff;
}

.footer-copy {
  font-size: 12px;
  color: #7f8cff;
}

/* ===================================================== */
/* 8️⃣ TELEGRAM POPUP */
/* ===================================================== */

.tg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.tg-popup {
  background: rgba(10,10,30,0.95);
  border-radius: 18px;
  padding: 22px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.tg-popup h3 {
  color: #7aa2ff;
  font-size: 18px;
  margin-bottom: 8px;
}

.tg-popup p {
  font-size: 13px;
  color: #c6ccff;
  margin-bottom: 18px;
}

.tg-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tg-join,
.tg-already {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.tg-join {
  background: linear-gradient(135deg, #7aa2ff, #b36bff);
  color: #050818;
  text-decoration: none;
}

.tg-already {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #ccc;
}

.tg-already:hover {
  border-color: #7aa2ff;
  color: #7aa2ff;
}

/* ================= ADMIN ACTION BUTTONS ================= */

.admin-actions {
  display: flex;
  gap: 12px;
  padding: 0 12px 14px;
}

.admin-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #f1f3ff;
  transition: all 0.2s ease;
}

.admin-actions button:first-child:hover {
  border-color: #7aa2ff;
  color: #7aa2ff;
  background: rgba(122,162,255,0.1);
}

.admin-actions button:last-child:hover {
  border-color: #ff4b4b;
  color: #ff4b4b;
  background: rgba(255,75,75,0.08);
}

/* ================= ADMIN LOGIN (OLD STYLE KEPT) ================= */

.admin-login-card {
  max-width: 420px;
  margin: 60px auto 0;
}

.admin-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #f1f3ff;
  margin-bottom: 18px;
}

.admin-input {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  outline: none;
}

.admin-input::placeholder {
  color: #a4afff;
}

.admin-login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #7aa2ff, #b36bff);
  color: #050818;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.admin-login-btn:active {
  transform: scale(0.98);
}

/* ================= LIVE / UPCOMING BADGE ================= */

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 5;
}

.badge-live {
  background: linear-gradient(135deg, #ff4d6d, #ff0033);
  color: #fff;
  animation: pulse 1.2s infinite;
}

.badge-upcoming {
  background: rgba(255,255,255,0.85);
  color: #000;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.player-wrapper video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
}
/* ================= ADMIN FORMS – PREMIUM LOOK ================= */

.admin-form-card {
  background: linear-gradient(
    135deg,
    rgba(30,35,85,0.95),
    rgba(8,8,25,0.95)
  );
  border-radius: 20px;
  padding: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(140,160,255,0.25),
    0 18px 40px rgba(0,0,0,0.6);
}

/* Form title */
.admin-form-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f3ff;
  text-align: center;
}

/* Inputs + Select */
.admin-form-card input,
.admin-form-card select {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.03)
  );
  border: 1px solid rgba(140,160,255,0.25);
  color: #ffffff;

  outline: none;
  transition: all 0.2s ease;
}

/* Placeholder */
.admin-form-card input::placeholder {
  color: #a4afff;
}

/* Focus state */
.admin-form-card input:focus,
.admin-form-card select:focus {
  border-color: #7aa2ff;
  box-shadow:
    0 0 0 2px rgba(122,162,255,0.25),
    0 0 18px rgba(122,162,255,0.35);
}

/* Select arrow color fix */
.admin-form-card select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #a4afff 50%),
    linear-gradient(135deg, #a4afff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* Add Match Button */
.admin-add-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;

  background: linear-gradient(135deg, #7aa2ff, #b36bff);
  color: #050818;
  border: none;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

.admin-add-btn:active {
  transform: scale(0.98);
}
/* =====================================================
   FORCE CENTER ADMIN LOGIN (FIX)
===================================================== */

#loginBox {
  margin: auto;
}

body {
  min-height: 100vh;
}

/* When only login is visible, center it perfectly */
body:has(#loginBox:not([style*="display: none"])) {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* =====================================================
   PAGE LOADER
===================================================== */

#pageLoader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #1a1440, #05040d);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

#pageLoader p {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 1px;
  color: #b6c0ff;
}

/* Neon ring spinner */
.loader-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(122,162,255,0.25);
  border-top-color: #7aa2ff;
  border-right-color: #b36bff;
  animation: spin 0.9s linear infinite;
  box-shadow:
    0 0 18px rgba(122,162,255,0.6),
    inset 0 0 12px rgba(179,107,255,0.6);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ================= SHAKA PLAYER FIX ================= */

/* Allow interaction inside Shaka player */
.shaka-video-container,
.shaka-video-container *,
.player-wrapper,
.player-wrapper * {
  pointer-events: auto !important;
  user-select: none !important;
}

/* Prevent text selection highlight */
video {
  user-select: none;
}
/* ================= SHAKA PLAYER FINAL FIX ================= */

/* Allow full interaction inside player */
.player-wrapper,
.player-wrapper *,
.shaka-video-container,
.shaka-video-container * {
  pointer-events: auto !important;
  user-select: none !important;
}

/* Prevent box/text selection */
.shaka-video-container {
  cursor: default !important;
}

video {
  user-select: none;
}
/* ================= WATCH-1 (PLYR) FIX ================= */

/* Stop box selection */
.result-card {
  cursor: default !important;
  user-select: none !important;
}

/* Allow video interaction only */
.player-wrapper,
.player-wrapper *,
video,
video * {
  pointer-events: auto !important;
  user-select: none !important;
}

/* Prevent mobile highlight */
video {
  -webkit-tap-highlight-color: transparent;
}
.header h1 {
  color: #7aa2ff;
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 12px #7aa2ff;
  }
  40% {
    opacity: 0.85;
    text-shadow: none;
  }
  60% {
    opacity: 1;
    text-shadow: 0 0 20px #b36bff;
  }
}
