@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-1: #070b16;
  --bg-2: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-2: rgba(17, 24, 39, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #ef4444;
  --accent-2: #8b5cf6;
  --good: #10b981;
  --warn: #f59e0b;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  min-height: 100vh;
  overflow-x: hidden;
}
body.night {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.15), transparent 30%),
    radial-gradient(circle at top right, rgba(168,85,247,.14), transparent 25%),
    linear-gradient(180deg, #030712, #0b1120);
}
body.day {
  background:
    radial-gradient(circle at top left, rgba(239,68,68,.14), transparent 30%),
    radial-gradient(circle at top right, rgba(245,158,11,.10), transparent 25%),
    linear-gradient(180deg, #111827, #0b1020);
}

.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.mobile-shell {
  max-width: 980px;
}

.glass, .panel {
  background: linear-gradient(180deg, rgba(17,24,39,.88), rgba(15,23,42,.78));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-orb::before,
.hero-orb::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(48px);
  z-index: 0;
}
.hero-orb::before {
  width: 180px;
  height: 180px;
  background: rgba(239,68,68,.20);
  top: -36px;
  left: -44px;
}
.hero-orb::after {
  width: 160px;
  height: 160px;
  background: rgba(139,92,246,.18);
  bottom: -48px;
  right: -18px;
}

.brand-title {
  letter-spacing: .12em;
  text-transform: uppercase;
}

.room-card, .player-card {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.room-card:hover, .player-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.3);
}
.room-card {
  background: linear-gradient(180deg, rgba(17,24,39,.84), rgba(15,23,42,.95));
}
.player-card {
  background: linear-gradient(180deg, rgba(31,41,55,.78), rgba(17,24,39,.94));
}

.soft-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.pill {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 9999px;
}

.input-dark {
  background: rgba(2,6,23,.72);
  border: 1px solid rgba(148,163,184,.18);
  color: #fff;
  width: 100%;
  min-height: 48px;
}
.input-dark::placeholder {
  color: #94a3b8;
}
.input-dark:focus {
  outline: none;
  border-color: rgba(239,68,68,.7);
  box-shadow: 0 0 0 4px rgba(239,68,68,.12);
}

.btn-primary {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 12px 30px rgba(220,38,38,.25);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}

.badge-status {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.chat-scroll::-webkit-scrollbar { width: 8px; }
.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.28);
  border-radius: 9999px;
}

.tap-safe {
  min-height: 48px;
}

.safe-bottom {
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.mobile-action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 30;
}

@media (max-width: 640px) {
  .glass, .panel {
    box-shadow: 0 10px 30px rgba(0,0,0,.28);
  }

  .hero-orb::before {
    width: 120px;
    height: 120px;
    top: -24px;
    left: -22px;
    filter: blur(34px);
  }

  .hero-orb::after {
    width: 110px;
    height: 110px;
    bottom: -28px;
    right: -14px;
    filter: blur(30px);
  }

  .soft-grid {
    background-size: 18px 18px;
  }

  .room-card, .player-card {
    box-shadow: 0 10px 24px rgba(0,0,0,.24);
  }

  .player-card:hover, .room-card:hover {
    transform: none;
  }

  .chat-scroll {
    scroll-padding-bottom: 16px;
  }
}


@media (max-width: 640px) {
  .player-card { min-height: 132px !important; padding: 12px 8px !important; }
}
