/* ============================================================
   style.css — Red or Blue
   Structure:
   1. Reset
   2. Design Tokens
   3. Base
   4. Background
   5. Layout
   6. Wordmark
   7. Counter
   8. Play Button
   9. Footer
   10. Auth (Card, Form, Inputs, Buttons, Divider)
   11. Game (Buttons, Divider, Hints)
   12. Stats (Bar)
   13. Animations
   14. Responsive
   ============================================================ */


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


/* ─── 2. Design Tokens ───────────────────────────────────── */
:root {
  /* Brand colors */
  --red:  #e84444;
  --blue: #3a6eea;

  /* Background shades */
  --bg-dark-blue: #162d66;
  --bg-mid:       #2d1450;
  --bg-dark-red:  #5a1616;

  /* Text */
  --text: #f0f0f0;

  /* Surface / glass */
  --surface-0:  rgba(255, 255, 255, 0.03);
  --surface-1:  rgba(255, 255, 255, 0.04);
  --surface-2:  rgba(255, 255, 255, 0.06);
  --surface-3:  rgba(255, 255, 255, 0.07);

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.08);
  --border-light:   rgba(255, 255, 255, 0.12);
  --border-medium:  rgba(255, 255, 255, 0.28);
  --border-strong:  rgba(255, 255, 255, 0.35);

  /* Text opacity levels */
  --text-dim-1: rgba(255, 255, 255, 0.15);
  --text-dim-2: rgba(255, 255, 255, 0.20);
  --text-dim-3: rgba(255, 255, 255, 0.25);
  --text-dim-4: rgba(255, 255, 255, 0.35);
  --text-bright: rgba(255, 255, 255, 0.90);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing */
  --footer-height: 40px;

  /* ── Vertical layout offset ──────────────────────────────
     Controls how far above center the content sits.
     0px  = perfectly centered
     10vh = slightly above center (good default for desktop)
     18vh = noticeably higher (better for mobile readability)
     Increase this value if content feels too low on small screens.
  ────────────────────────────────────────────────────────── */
  --layout-offset: 14vh;
}


/* ─── 3. Base ────────────────────────────────────────────── */
html, body {
  min-height: 100vh;
}

body {
  font-family: var(--font-mono);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* No justify-content: center — padding-top alone controls the
     vertical position so --layout-offset works at any value.
     justify-content: center would cap the effect once padding
     fills the available space. */
  padding-top: var(--layout-offset);
  padding-bottom: var(--footer-height);
  min-height: 100vh;
  overflow: hidden;
}


/* ─── 4. Background ──────────────────────────────────────── */
.bg-split {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to right,
    var(--bg-dark-blue) 0%,
    var(--bg-dark-blue) 25%,
    var(--bg-mid)       50%,
    var(--bg-dark-red)  75%,
    var(--bg-dark-red)  100%
  );
}


/* ─── 5. Layout ──────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 700px;
  padding: 0 2rem;
}

/* ─── Shared Action Button Base ───────────────────────────── */
.action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #fff;
  background: var(--surface-1);
  border: 1px solid var(--border-light);

  /* gleiche pill-form wie play button */
  border-radius: 999px;

  padding: 14px 34px;

  cursor: pointer;
  text-decoration: none;
  user-select: none;

  transition:
    background 0.25s,
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.15s;

  outline: none;
  overflow: hidden;
}

/* Hover overlay */
.action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ─── Primary Button ─────────────────────────────────────── */
.action-btn.primary::before {
  background: linear-gradient(
    90deg,
    rgba(232, 68, 68, 0.15),
    rgba(58, 110, 234, 0.15)
  );
}

.action-btn.primary:hover {
  border-color: var(--border-medium);
  background: var(--surface-3);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.action-btn.primary:active {
  transform: scale(0.97);
  box-shadow: none;
}

.action-btn.primary:hover::before {
  opacity: 1;
}

/* ─── Danger Button ─────────────────────────────────────── */
.action-btn.danger {
  color: var(--red);
  border-color: rgba(232, 68, 68, 0.35);
}

.action-btn.danger::before {
  background: linear-gradient(
    90deg,
    rgba(232, 68, 68, 0.25),
    rgba(232, 68, 68, 0.05)
  );
}

.action-btn.danger:hover {
  background: rgba(232, 68, 68, 0.08);
  border-color: rgba(232, 68, 68, 0.6);
  box-shadow: 0 0 40px rgba(232, 68, 68, 0.25);
  transform: translateY(-2px);
}

.action-btn.danger:active {
  transform: scale(0.97);
  box-shadow: none;
}

.action-btn.danger:hover::before {
  opacity: 1;
}

/* ─── 6. Wordmark ────────────────────────────────────────── */
.wordmark {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 640px;
  padding: 0 2rem;
  user-select: none;
  opacity: 0;
  animation: slideDown 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.wordmark .red {
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 88px);
  letter-spacing: 0.04em;
  color: var(--red);
  text-align: right;
  padding-right: 0.2em;
}

.wordmark .or {
  font-family: var(--font-display);
  font-size: clamp(18px, 4vw, 28px);
  letter-spacing: 0.25em;
  color: var(--text-dim-1);
  text-align: center;
  white-space: nowrap;
}

.wordmark .blue {
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 88px);
  letter-spacing: 0.04em;
  color: var(--blue);
  text-align: left;
  padding-left: 0.2em;
}

.tagline {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim-4);
  margin-top: 10px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.55s forwards;
}


/* ─── 7. Counter ─────────────────────────────────────────── */
.counter-wrap {
  margin-top: 16px;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.7s forwards;
  margin-top: 2vh;
}

.counter-number {
  font-family: var(--font-display);
  font-size: clamp(48px, 11vw, 72px);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--text-bright);
}

.counter-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim-2);
  margin-top: 8px;
}


/* ─── 8. Play Button ─────────────────────────────────────── */
.play-wrap {
  margin-top: 48px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.9s forwards;
}

.play-btn {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 22px 90px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.15s;
  outline: none;
  overflow: hidden;
}

/* Gradient overlay on hover */
.play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(232, 68, 68, 0.15), rgba(58, 110, 234, 0.15));
  opacity: 0;
  transition: opacity 0.3s;
}

.play-btn:hover {
  border-color: var(--border-medium);
  background: var(--surface-3);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.play-btn:hover::before { opacity: 1; }
.play-btn:active         { transform: scale(0.97); box-shadow: none; }
.play-btn span           { position: relative; z-index: 1; }

/* Left accent line (red) */
.play-btn::after {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--red), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.play-btn:hover::after { opacity: 1; }

/* Right accent line (blue) */
.accent-right {
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.play-btn:hover .accent-right { opacity: 1; }


/* ─── 9. Footer ──────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  padding: 10px 0;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;

  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;

  color: var(--text-dim-4);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer a:hover {
  opacity: 1;
  color: var(--text-bright);
}

.footer .dot {
  opacity: 0.3;
}


/* ─── 10. Auth ───────────────────────────────────────────── */

/* Card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.8s ease forwards;
}

/* Typography */
.auth-title {
  font-family: var(--font-display);
  font-size: 48px;
  text-align: center;
  letter-spacing: 0.08em;
}

.auth-subtitle {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim-4);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inputs */
.auth-form input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  /* Fix: placeholder color not inherited in all browsers */
  -webkit-text-fill-color: var(--text);
}

.auth-form input::placeholder {
  color: var(--text-dim-4);
  -webkit-text-fill-color: var(--text-dim-4);
}

.auth-form input:focus {
  border-color: var(--border-strong);
}

/* Buttons — shared base */
.auth-btn {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 14px;
  transition: background 0.25s;
}

/* Primary */
.auth-btn.primary {
  background: var(--surface-2);
  color: var(--text);
}

.auth-btn.primary:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* Google */
.auth-btn.google {
  background: rgba(58, 110, 234, 0.12);
  color: var(--text);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn.google:hover {
  background: rgba(58, 110, 234, 0.20);
}

.google-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.95;
}

.auth-btn.google {
  border: 1px solid rgba(58, 110, 234, 0.25);
}

.auth-btn.google:hover {
  border-color: rgba(58, 110, 234, 0.4);
}


/* ─── 11. Game ───────────────────────────────────────────── */

.game-context {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim-4);
}

.choice-wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 4vh;
}

/* Choice buttons — shared */
.choice {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  border: 1px solid var(--text-dim-1);
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}

.choice.red {
  background: rgba(232, 68, 68, 0.08);
  color: var(--red);
}

.choice.red:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(232, 68, 68, 0.25);
}

.choice.blue {
  background: rgba(58, 110, 234, 0.08);
  color: var(--blue);
}

.choice.blue:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(58, 110, 234, 0.25);
}

.or-divider {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--text-dim-1);
}

.game-hint {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim-2);
  margin-top: 4vh;
}

.game-stats {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim-3);
}


.game-description {
  max-width: 520px;
  margin-top: 2vh;
  margin-bottom: 3vh;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim-3);
  letter-spacing: 0.05em;
}

.game-description p {
  margin-bottom: 10px;
}

.blue-text {
  color: var(--blue);
  font-weight: bold;
}

.red-text {
  color: var(--red);
  font-weight: bold;
}

.game-warning {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim-4);
}


/* ─── 12. Stats ──────────────────────────────────────────── */

.stats-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.stats-bar {
  width: 100%;
  max-width: 520px;
  height: 22px;
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--surface-0);
  margin-top: 2vh;
}

/* Segments — shared */
.stats-red,
.stats-blue {
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: width 0.8s ease;
}

.stats-red  { background: var(--red); }
.stats-blue { background: var(--blue); }

.stats-red  .stats-label { width: 100%; text-align: left;  padding-left: 10px; }
.stats-blue .stats-label { width: 100%; text-align: right; padding-right: 10px; }


/* ─── 13. Animations ─────────────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

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


/* ─── 14. Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  .play-btn { padding: 20px 56px; font-size: 26px; }
}

/* ─── 15. Header ─────────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 24px;
  z-index: 1000;

  color: var(--text);

  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid var(--border-subtle);
}

/* Logo */
.topbar .logo {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--text-bright);
  text-transform: uppercase;
  user-select: none;
}

/* Navigation */
.topbar .menu {
  display: flex;
  gap: 18px;
  align-items: center;
}

/* Links */
.topbar .menu a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;

  color: var(--text-dim-4);
  text-decoration: none;

  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
}

.topbar .menu a:hover {
  color: var(--text-bright);
  opacity: 1;
}

/* Optional active state */
.topbar .menu a.active {
  color: var(--text-bright);
  opacity: 1;
}

/* hide protected links by default */
.topbar .menu a[href*="stats"],
.topbar .menu a[href*="profile"] {
  display: none;
}

.wordmark-header {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px; /* optional, falls du spacing brauchst */
  cursor: pointer;
  color: inherit;
}

.wordmark-header:hover {
  opacity: 0.85;
}

/* ─── 16. Profile ───────────────────────────────────────── */

.profile-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim-3);
}

.profile-value {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--text-bright);
}

.profile-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-actions input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: rgba(0,0,0,0.2);
  color: var(--text);
}

.profile-actions button {
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.profile-actions .danger {
  background: rgba(232, 68, 68, 0.2);
  border: 1px solid var(--red);
  color: var(--red);
}

/* ─── 17. Stats Users ───────────────────────────────────── */

.stats-users {
  display: flex;
  justify-content: center; /* statt space-between */
  gap: 80px;
  margin-top: 3vh;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* jede Spalte mittig */
.stats-users-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Titel zentriert */
.stats-users-title {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim-3);
  margin-bottom: 10px;
  text-align: center;
}

/* Liste selbst zentrieren */
.stats-users-col ul {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center; /* DAS ist der wichtige Part */
  gap: 6px;
}

/* einzelne Namen */
.stats-users-col li {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
}

.stats-users-col.red li {
  color: var(--red);
}

.stats-users-col.blue li {
  color: var(--blue);
}

/* ─── Header Wordmark (scaled index logo) ─────────────── */

.wordmark-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  user-select: none;
}

/* Red */
.wordmark-header .red {
  color: var(--red);
  font-size: 18px;
  letter-spacing: 0.06em;
}

/* OR */
.wordmark-header .or {
  color: var(--text-dim-1);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* Blue */
.wordmark-header .blue {
  color: var(--blue);
  font-size: 18px;
  letter-spacing: 0.06em;
}

