@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Barlow+Condensed:wght@300;400;500;600;700&family=Barlow:wght@400;500&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:          #07080f;
  --bg-2:        #0d0f1c;
  --surface:     #111426;
  --surface-2:   #181c32;
  --border:      rgba(255, 255, 255, 0.07);
  --border-glow: rgba(245, 197, 24, 0.25);

  --gold:        #f5c518;
  --gold-dim:    rgba(245, 197, 24, 0.12);
  --gold-mid:    rgba(245, 197, 24, 0.4);
  --blue:        #2563eb;
  --blue-bright: #3b82f6;
  --blue-dim:    rgba(37, 99, 235, 0.15);

  --bronze:      #c9824a;
  --silver:      #94a3b8;
  --platinum:    #f5c518;

  --text:        #e8eaf6;
  --text-muted:  #4b5270;
  --text-dim:    #6b7491;

  --font-display: 'Russo One', sans-serif;
  --font-ui:      'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Background Scene ─────────────────────────────────────── */
.arena-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Perspective grid floor */
.arena-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 55%;
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.18) 1px, transparent 1px);
  background-size: 80px 80px;
  transform-origin: bottom center;
  transform: translateX(-50%) perspective(600px) rotateX(60deg);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 80%);
}

/* Radial glow center-top */
.arena-bg::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center,
    rgba(37, 99, 235, 0.12) 0%,
    rgba(245, 197, 24, 0.05) 40%,
    transparent 70%);
  border-radius: 50%;
}

/* Floating geometric shapes */
.arena-shapes {
  position: absolute;
  inset: 0;
}

.shape {
  position: absolute;
  opacity: 0;
  animation: floatShape linear infinite;
}

.shape--diamond {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0;
  animation: floatDiamond linear infinite;
}

.shape--ring {
  border-radius: 50%;
  border: 1px solid var(--blue-bright);
  opacity: 0;
  animation: floatRing linear infinite;
}

.shape--line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-mid), transparent);
  opacity: 0;
  animation: scanLine linear infinite;
}

@keyframes floatDiamond {
  0%   { opacity: 0; transform: rotate(45deg) translateY(0) scale(0.8); }
  10%  { opacity: 0.35; }
  90%  { opacity: 0.2; }
  100% { opacity: 0; transform: rotate(45deg) translateY(-120px) scale(1.1); }
}

@keyframes floatRing {
  0%   { opacity: 0; transform: scale(0.6); }
  15%  { opacity: 0.2; }
  85%  { opacity: 0.1; }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes scanLine {
  0%   { opacity: 0; transform: translateX(-30px); }
  20%  { opacity: 0.5; }
  80%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateX(30px); }
}

/* Noise/grain overlay */
.arena-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.55;
}

/* ── Layout helpers ───────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Login Page ───────────────────────────────────────────── */
.login {
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px;
  gap: 0;
}

/* Top eyebrow */
.login__eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login__eyebrow::before,
.login__eyebrow::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold-mid);
}

/* Hero title */
.login__hero {
  text-align: center;
  margin-bottom: 28px;
}

.login__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 12vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 80px rgba(245, 197, 24, 0.15);
}

.login__title span {
  display: block;
  color: var(--gold);
  text-shadow:
    0 0 40px rgba(245, 197, 24, 0.6),
    0 0 80px rgba(245, 197, 24, 0.25);
}

.login__tagline {
  font-family: var(--font-ui);
  font-size: clamp(15px, 3vw, 20px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 16px;
}

.login__tagline em {
  font-style: normal;
  color: var(--gold);
}

/* Grade badges */
.grade-badges {
  display: flex;
  gap: 12px;
  margin: 36px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.grade-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: default;
  animation: badgePulse 6s ease-in-out infinite;
}

.grade-badge:nth-child(2) { animation-delay: 2s; }
.grade-badge:nth-child(3) { animation-delay: 4s; }

.grade-badge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.grade-badge:nth-child(1)::before { background: var(--bronze); box-shadow: 0 0 12px var(--bronze); }
.grade-badge:nth-child(2)::before { background: var(--silver); box-shadow: 0 0 12px var(--silver); }
.grade-badge:nth-child(3)::before { background: var(--platinum); box-shadow: 0 0 12px var(--platinum); }

.grade-badge:hover { transform: translateY(-3px); }
.grade-badge:nth-child(1):hover { border-color: var(--bronze); }
.grade-badge:nth-child(2):hover { border-color: var(--silver); }
.grade-badge:nth-child(3):hover { border-color: var(--platinum); }

.grade-badge__rank {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

.grade-badge:nth-child(1) .grade-badge__rank { color: var(--bronze); }
.grade-badge:nth-child(2) .grade-badge__rank { color: var(--silver); }
.grade-badge:nth-child(3) .grade-badge__rank { color: var(--platinum); }

.grade-badge__label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes badgePulse {
  0%, 100% { box-shadow: none; }
  50%       { box-shadow: 0 4px 24px rgba(245, 197, 24, 0.07); }
}

/* Sign-in button */
.login__cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 36px;
  background: var(--text);
  color: #111;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(245, 197, 24, 0);
}

.btn-google:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245, 197, 24, 0.3);
}

.btn-google:active {
  transform: translateY(0);
}

.btn-google__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.login__fine {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Footer strip */
.login__footer {
  margin-top: auto;
  padding-top: 60px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ── Dashboard Page ───────────────────────────────────────── */
.dashboard {
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* User pill at top */
.dash__user-bar {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  z-index: 10;
  animation: slideIn 0.5s ease both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.dash__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold-mid);
  object-fit: cover;
  background: var(--surface-2);
}

.dash__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold);
  background: var(--gold-dim);
}

.dash__user-name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* Main coming-soon card */
.dash__card {
  max-width: 560px;
  width: 100%;
  text-align: center;
  padding: 56px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  animation: cardReveal 0.6s ease both 0.1s;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dash__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--blue), var(--gold));
}

/* Radar / pulse animation */
.dash__radar {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
}

.dash__radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  animation: radarPulse 2.4s ease-out infinite;
  opacity: 0;
}

.dash__radar-ring:nth-child(2) { animation-delay: 0.8s; }
.dash__radar-ring:nth-child(3) { animation-delay: 1.6s; }

.dash__radar-core {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

@keyframes radarPulse {
  0%   { opacity: 0.7; transform: scale(0.6); }
  100% { opacity: 0;   transform: scale(2.4); }
}

/* Coming soon text */
.dash__eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dash__eyebrow::before,
.dash__eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold-mid);
}

.dash__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
  text-shadow: 0 0 60px rgba(245, 197, 24, 0.1);
}

.dash__subtitle {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto 32px;
}

.dash__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.dash__back:hover { color: var(--gold); }

.dash__back::before {
  content: '←';
  font-size: 16px;
}

/* ── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .dash__user-bar {
    top: 16px;
    right: 16px;
    padding: 6px 12px 6px 6px;
  }

  .dash__card {
    padding: 40px 24px;
  }

  .grade-badges {
    gap: 8px;
  }

  .grade-badge {
    padding: 12px 16px;
  }
}
