/* ============================================================
   Tallinn Beer League CS2 Cup — Design System
   ============================================================ */

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

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f18;
  --bg-card: #13131a;
  --bg-card-hover: #1a1a25;
  --bg-input: #1a1a25;
  --bg-input-focus: #1f1f2e;

  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --accent-glow: rgba(245, 158, 11, 0.3);

  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.15);

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.15);
  --warning: #eab308;
  --warning-soft: rgba(234, 179, 8, 0.15);
  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.15);

  --text: #e5e5e5;
  --text-secondary: #9ca3af;
  --text-dim: #6b7280;
  --text-on-accent: #000;

  --border: #2a2a3a;
  --border-hover: #3a3a4a;
  --border-accent: rgba(245, 158, 11, 0.3);

  /* Glass */
  --glass-bg: rgba(19, 19, 26, 0.85);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-accent: 0 4px 20px rgba(245, 158, 11, 0.2);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--text-on-accent); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-accent { color: var(--accent); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-secondary); }
.text-dim { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-3xl) 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  height: var(--nav-height);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text);
}
.nav-logo:hover { color: var(--text); }
.nav-logo .logo-icon { font-size: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: var(--space-lg); }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: var(--space-sm); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  border: none;
  background: none;
}
.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: var(--transition-base);
  border-radius: 2px;
}
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
  z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.2rem;
  color: var(--text-secondary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* --- Estonian Flag Bar --- */
.ee-bar {
  height: 3px;
  background: linear-gradient(90deg, #0072CE 33.33%, #000 33.33%, #000 66.66%, #fff 66.66%);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  color: var(--text-on-accent);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover:not(:disabled) {
  background: var(--blue-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--accent); }

.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: #dc2626; color: #fff; }

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-xl { padding: 18px 40px; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.5px; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-md); }

/* Button with shimmer */
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}
.card:hover {
  border-color: var(--border-hover);
}
.card-interactive:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.card-accent {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

/* --- Forms --- */
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group .required { color: var(--error); }
.form-group .hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-dim); }
.form-input.error { border-color: var(--error); }
.form-input.success { border-color: var(--success); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-check label { margin-bottom: 0; cursor: pointer; }

.form-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-input { border-color: var(--error); }

/* --- Stepper (Multi-step form) --- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-xl);
  padding: 0 var(--space-md);
}
.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.stepper-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--text-dim);
  transition: all var(--transition-base);
  flex-shrink: 0;
}
.stepper-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.stepper-dot.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.stepper-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: none;
}
.stepper-line {
  width: 40px; height: 2px;
  background: var(--border);
  margin: 0 var(--space-xs);
  flex-shrink: 0;
}
.stepper-line.done { background: var(--success); }

@media (min-width: 640px) {
  .stepper-label { display: block; }
  .stepper-line { width: 60px; }
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* --- Tables --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; padding-top: var(--space-lg); }
.tab-content.active { display: block; }

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-lg); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}
.modal-close:hover { border-color: var(--error); color: var(--error); }

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-md));
  right: var(--space-lg);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 300px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  border-left: 3px solid var(--accent);
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-warning { border-left-color: var(--warning); }
.toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; }
.toast-message { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.toast-close {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; font-size: 1rem;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Stats Cards --- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* --- Payment Method Cards --- */
.payment-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}
.payment-option:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.payment-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-soft);
}
.payment-option .payment-badge {
  position: absolute;
  top: -10px;
  right: 16px;
}
.payment-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.payment-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.payment-icon.crypto { background: var(--purple-soft); }
.payment-icon.card { background: var(--blue-soft); }
.payment-icon.revolut { background: var(--accent-soft); }
.payment-icon.bank { background: rgba(255,255,255,0.05); }

/* --- Countdown Timer --- */
.countdown {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}
.countdown-unit {
  text-align: center;
  min-width: 72px;
}
.countdown-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* --- Accordion --- */
.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}
.accordion-trigger:hover { color: var(--accent); }
.accordion-arrow {
  transition: transform var(--transition-base);
  color: var(--text-dim);
}
.accordion-item.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.accordion-item.open .accordion-body { max-height: 500px; }
.accordion-content {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: var(--space-4xl) var(--space-lg);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(245,158,11,0.06), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(59,130,246,0.04), transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero .tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-links { display: flex; gap: var(--space-lg); justify-content: center; margin-bottom: var(--space-md); }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.25); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-float { animation: float 4s ease-in-out infinite; }

/* --- Loading Spinner --- */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: var(--space-md); }
.empty-state h3 { color: var(--text-secondary); margin-bottom: var(--space-sm); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: var(--space-2xl) var(--space-md); }
  .section { padding: var(--space-2xl) 0; }
  .container { padding: 0 var(--space-md); }
  .countdown-value { font-size: 1.8rem; }
  .countdown-unit { min-width: 56px; }
  .stat-value { font-size: 2rem; }
  .toast { min-width: auto; max-width: calc(100vw - 32px); }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .btn-xl { padding: 14px 28px; font-size: 1rem; }
}

/* --- Utilities --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.hidden { display: none !important; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.rounded { border-radius: var(--radius-md); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
