@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Vazirmatn:wght@300;400;700;900&display=swap');

/* ============================================================
   PENTAGON theme — CHANGE COLORS HERE.
   The whole site derives from these variables:
   --accent       the yellow. Used ONLY for: key CTAs, active nav
                  link, play button, ticket codes, focus rings,
                  toast highlight. Everything else stays B/W.
   --bg / --card-bg / --border   the blacks and grays.
   ============================================================ */
:root {
  --bg: #060606;
  --bg-elevated: #0c0c0d;
  --card-bg: #101011;
  --accent: #facc15;           /* yellow */
  --accent-bright: #fde047;
  --accent-ink: #1c1703;       /* text on yellow */
  --accent-soft: rgba(250, 204, 21, 0.10);
  --accent-line: rgba(250, 204, 21, 0.35);
  --text: #f5f5f4;
  --muted: #8f8f8b;
  --red: #e05252;
  --green: #4caf7d;
  --blue: #4676c8;
  --border: #1e1e1f;
  --radius: 14px;
  --font-display: 'Archivo Black', 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Vazirmatn', sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
main { flex: 1; }
.container { max-width: 1160px; width: 100%; margin: 0 auto; padding: 28px 22px; }

/* ---------- Header ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(6, 6, 6, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 34px; opacity: 0.95; transition: transform 0.25s; }
.brand:hover .logo { transform: scale(1.06) rotate(-3deg); }

.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-center::-webkit-scrollbar { display: none; }
.nav-center a {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-center a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-center a.active { color: var(--accent); background: rgba(255, 255, 255, 0.05); }
.nav-center a.admin-link { color: var(--accent); opacity: 0.85; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.nav-actions a { font-size: 0.86rem; font-weight: 600; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.nav-actions a:hover { color: var(--text); }
.nav-actions a.btn-red, .nav-actions .btn { color: inherit; }
.nav-actions a.btn-red { color: #000; }

.nav-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  max-width: 220px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.nav-profile:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}
.nav-profile.active {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.06);
}
.nav-profile-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-profile-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: var(--accent-ink);
  flex-shrink: 0;
}
.nav-profile:not(:has(.nav-profile-img)) .nav-profile-fallback { display: flex; }
.nav-profile-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile-first: burger shown by default, pill nav on wide screens */
.nav-burger {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
}
.hide-mobile { display: none !important; }
.nav-center { display: none; }
@media (min-width: 900px) {
  .nav-center { display: flex; }
  .nav-burger { display: none; }
  .hide-mobile { display: inline-flex !important; }
  .nav-actions a.hide-mobile { display: inline !important; }
}

.mobile-menu {
  position: fixed;
  top: 59px;
  left: 0; right: 0;
  z-index: 49;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: rgba(8, 8, 9, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.mobile-menu a:active, .mobile-menu a:hover { background: rgba(255, 255, 255, 0.06); }
.mobile-menu a.admin-link { color: var(--accent); }
.mobile-menu .btn { margin: 6px 0; }

/* ---------- ShinyText ---------- */
.shiny-text {
  color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(120deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
}
@keyframes shine {
  from { background-position: 250% 0; }
  to { background-position: -150% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shiny-text { animation: none; color: var(--text); background: none; }
}

/* ---------- Buttons ---------- */
.btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.small { padding: 7px 14px; font-size: 0.8rem; }

.btn-red { background: #f5f5f4; color: #000; }
.btn-red:hover { box-shadow: 0 8px 28px rgba(245, 245, 244, 0.15); }
.btn-gold {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 22px rgba(250, 204, 21, 0.18);
}
.btn-gold:hover { background: var(--accent-bright); box-shadow: 0 10px 30px rgba(250, 204, 21, 0.28); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); }
.btn-green { background: var(--green); color: #04150b; }
.btn-danger { background: var(--red); color: #fff; }
.btn-primary { background: var(--blue); color: #fff; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  transition: border-color 0.25s;
  overflow: hidden;
}
.card:hover { border-color: rgba(255, 255, 255, 0.16); }
.card.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.05), transparent 55%);
}
.card.spot:hover::before { opacity: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 44px 0 8px; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.3px; }

/* ---------- Forms ---------- */
input, select, textarea {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.045);
}
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* ---------- Typography ---------- */
.page-title { font-size: 2rem; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.page-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.muted { color: var(--muted); }

code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.9em;
}

/* ---------- Badges ---------- */
.badge { padding: 4px 11px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }
.badge.green { background: rgba(76, 175, 125, 0.12); color: var(--green); }
.badge.red { background: rgba(224, 82, 82, 0.12); color: var(--red); }
.badge.blue { background: rgba(70, 118, 200, 0.12); color: #7ea4e0; }
.badge.gold { background: var(--accent-soft); color: var(--accent); }

/* ---------- Copyable codes / QR ---------- */
.code-row { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; flex-wrap: wrap; }
.code-label { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); flex-basis: 100%; }
.ticket-code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--accent);
  user-select: all;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: inherit;
  transition: 0.2s;
}
.copy-btn:hover { border-color: rgba(255, 255, 255, 0.4); }
.qr-box { background: #fff; border-radius: 12px; padding: 12px; width: fit-content; margin: 16px 0 4px; }

/* ---------- Stats ---------- */
.stat-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat { background: var(--card-bg); border: 1px solid var(--border); padding: 18px; border-radius: var(--radius); flex: 1; min-width: 130px; text-align: center; }
.stat .num { font-size: 1.7rem; font-weight: 900; }
.stat .lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(16, 16, 17, 0.94);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.accent { border-left-color: var(--accent); }
.toast.leaving { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* Legacy flash kept for no-JS fallback (hidden when JS runs) */
.flash { display: none; }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.9rem; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- Split text ---------- */
[data-split] .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(4deg);
  filter: blur(6px);
  animation: ch-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 55ms + 150ms);
}
@keyframes ch-in { to { opacity: 1; transform: none; filter: blur(0); } }

.blur-in { opacity: 0; filter: blur(10px); animation: blur-in 1.1s ease forwards; }
.blur-in.late { animation-delay: 0.8s; }
@keyframes blur-in { to { opacity: 1; filter: blur(0); } }

/* ---------- Mega footer ---------- */
.mega-footer {
  position: relative;
  overflow: hidden;
  padding: 10vh 0 0;
  margin-top: 60px;
  user-select: none;
  pointer-events: none;
}
.mega-text {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(64px, 16.5vw, 300px);
  line-height: 0.78;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0));
  -webkit-background-clip: text;
  background-clip: text;
  transform: translateY(40%);
  opacity: 0;
  transition: transform 0.1s linear, opacity 0.1s linear;
  will-change: transform, opacity;
  margin-bottom: -0.08em;
}

/* ---------- Get App modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 20px;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 38px 34px 30px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-backdrop.open .modal-card { transform: none; }
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-icon { width: 92px; height: 92px; border-radius: 24px; margin-bottom: 18px; border: 1px solid var(--border); }
.modal-card h3 { margin: 0 0 8px; font-weight: 900; font-size: 1.25rem; }
.modal-card p { margin: 0 0 22px; font-size: 0.88rem; }
.modal-card .full-width { width: 100%; }
.install-steps { text-align: left; margin-top: 6px; }
.install-steps .step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 0.88rem; }
.install-steps .step:last-child { border-bottom: none; }
.install-steps .step span {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  font-size: 0.75rem;
}
.install-steps .step strong { color: var(--text); }

[dir="rtl"] { direction: rtl; }
[dir="ltr"] { direction: ltr; }

@media (max-width: 900px) {
  .nav-center { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 20px 15px; }
  .nav { padding: 12px 14px; }
  .page-title { font-size: 1.5rem; }
  .p-info { width: 100px; }
  .p-station { width: 120px; }
  .p-vol { width: 90px; }
  .toasts { left: 14px; right: 14px; }
  .toast { max-width: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, [data-split] .ch, .blur-in { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; transition: none !important; }
  .mega-text { transform: none !important; opacity: 1 !important; }
}
