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

:root {
  /* Premium Dark Mode Palette */
  --bg-color: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-glass: rgba(30, 41, 59, 0.7);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --primary: #3b82f6; /* UP colors */
  --primary-glow: rgba(59, 130, 246, 0.5);
  
  --secondary: #ef4444; /* DOWN colors */
  --secondary-glow: rgba(239, 68, 68, 0.5);
  
  --special: #8b5cf6;
  --special-glow: rgba(139, 92, 246, 0.5);
  
  --border: rgba(255, 255, 255, 0.1);

  /* Crystal Glass System Tokens */
  --crystal-bg: rgba(15, 23, 42, 0.82);
  --crystal-blur: blur(20px);
  --crystal-border: 1px solid rgba(255, 255, 255, 0.1);
  --crystal-radius: 24px;
  --crystal-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  
  /* Shared Colors (Pop Palette) */
  --pop-blue: #60a5fa;
  --pop-red: #f87171;
  --pop-green: #4ade80;
  --pop-orange: #fb923c;
  --pop-yellow: #facc15;
  --pop-purple: #c084fc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(239, 68, 68, 0.15) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  padding: 24px;
}

/* Crystal Glass Panel (Unified) */
.crystal-panel {
  background: var(--crystal-bg);
  backdrop-filter: var(--crystal-blur);
  -webkit-backdrop-filter: var(--crystal-blur);
  border: var(--crystal-border);
  border-radius: var(--crystal-radius);
  box-shadow: var(--crystal-shadow);
}

/* Unified Back Navigation Button */
.nav-back-unified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #cbd5e1;
  font-family: 'Inter', 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  z-index: 9999;
}

.nav-back-unified:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateX(-2px);
}

.nav-back-unified svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.4);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #60a5fa;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-primary:hover {
  box-shadow: 0 10px 20px -5px var(--primary-glow);
}

/* Card Styling for Game UI */
.card-item {
  width: 80px;
  height: 120px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  border: 2px solid transparent;
  user-select: none;
}

.card-item:hover {
  transform: translateY(-5px) scale(1.05);
}

/* Base layouts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

.header {
  text-align: center;
  padding: 2rem 0;
}

.header h1 {
  font-size: 2.5rem;
  background: linear-gradient(to right, #60a5fa, #f87171);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

/* Regulation Cards */
.reg-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.reg-card {
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.reg-card:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.reg-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.reg-card ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.reg-card ul li {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reg-card ul li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
}

.reg-card.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 20px var(--primary-glow);
}
