/* =====================================================
   Hack4Shell CTF — Redesigned Design System
   Fonts: Montserrat (headings) · DM Sans (body) · JetBrains Mono (code)
   Palette: Charcoal-black + Amber-orange accent (zero blue)
   ===================================================== */

/* ===========================================
   0. GOOGLE FONTS IMPORT
   =========================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ===========================================
   1. DESIGN TOKENS
   =========================================== */
:root {
  /* Backgrounds */
  --bg-primary:    #080b10;
  --bg-secondary:  #0d1117;
  --bg-card:       rgba(15, 19, 24, 0.85);
  --bg-card-solid: #0f1318;
  --bg-input:      #0a0d12;
  --bg-elevated:   #141920;

  /* Accent Colors — amber-orange system, no blue */
  --accent-green:     #ff6b2b;   /* primary accent — amber-orange (named green for compat) */
  --accent-green-dim: #e05520;   /* darker orange */
  --accent-cyan:      #e8c547;   /* secondary — warm yellow */
  --accent-purple:    #c084fc;   /* tertiary — soft lavender for variety */

  /* Text Colors */
  --text-primary:   #f0ede8;
  --text-secondary: #9ca3a0;
  --text-muted:     #5a6065;

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.05);
  --border-glow:  rgba(255, 107, 43, 0.25);

  /* Semantic Colors */
  --danger:  #f43f5e;
  --warning: #e8c547;
  --success: #34d399;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(255, 107, 43, 0.12);

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Transitions */
  --transition: 0.22s ease;
}

/* ===========================================
   2. RESET & BASE
   =========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay — raw analog feel instead of generic matrix grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  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.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.4;
}

/* Subtle radial glow at top */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 50vh;
  background: radial-gradient(ellipse, rgba(255, 107, 43, 0.06) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

::selection {
  background-color: rgba(255, 107, 43, 0.25);
  color: var(--accent-green);
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: var(--accent-green); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-cyan); }

/* ===========================================
   3. TYPOGRAPHY
   =========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem;  font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: 2rem;    font-weight: 800; }
h3 { font-size: 1.4rem;  font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1rem;    font-weight: 600; }
h6 { font-size: 0.9rem;  color: var(--text-secondary); font-weight: 500; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1em;
}

/* Text utilities */
.text-green  { color: var(--accent-green) !important; }
.text-cyan   { color: var(--accent-cyan) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning{ color: var(--warning) !important; }
.text-success{ color: var(--success) !important; }
.font-mono   { font-family: var(--font-mono) !important; }

/* ===========================================
   4. NAVBAR
   =========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 60px;
  background: rgba(8, 11, 16, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-icon { font-size: 1.3rem; }

.brand-text {
  color: var(--text-primary);
  font-weight: 900;
}

.brand-accent {
  color: var(--accent-green);
  font-weight: 900;
}

.navbar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
}

.navbar-toggle:hover { color: var(--accent-green); }

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--accent-green);
  background: rgba(255, 107, 43, 0.1);
}

.navbar-auth {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-user {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 107, 43, 0.07);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 43, 0.15);
}

/* ===========================================
   5. BUTTONS
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent-green);
  color: #08080a;
}

.btn-primary:hover {
  background: var(--accent-green-dim);
  box-shadow: 0 0 24px rgba(255, 107, 43, 0.35);
  transform: translateY(-1px);
  color: #08080a;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(255, 107, 43, 0.05);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.35);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning);
  color: #080b10;
}

.btn-warning:hover {
  box-shadow: 0 0 20px rgba(232, 197, 71, 0.35);
  transform: translateY(-1px);
}

.btn-sm  { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg  { padding: 13px 28px; font-size: 0.975rem; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-block { width: 100%; }

/* ===========================================
   6. CARDS
   =========================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  /* Signature: razor left accent line */
  border-left: 2px solid transparent;
}

.card:hover {
  border-color: var(--border-color);
  border-left-color: var(--accent-green);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-body  { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
}

/* ===========================================
   7. CHALLENGE CARDS
   =========================================== */
.challenge-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-left: 2px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.challenge-card:hover {
  border-left-color: var(--accent-green);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.challenge-card.solved {
  border-left-color: var(--success) !important;
  opacity: 0.72;
}

.challenge-card.solved:hover { opacity: 0.88; }

.challenge-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.challenge-card .challenge-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.challenge-card .challenge-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  margin-top: 8px;
  flex: 1;
}

.challenge-card .challenge-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.challenge-card .challenge-points {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-green);
  font-size: 0.9rem;
}

.challenge-card .challenge-solves {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.challenge-card .challenge-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* ===========================================
   8. BADGES
   =========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-display);
  gap: 4px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Difficulty */
.badge-sanity { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.badge-easy   { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.badge-medium { background: rgba(232, 197, 71, 0.12);  color: #e8c547; }
.badge-hard   { background: rgba(244, 63, 94, 0.12);   color: #f43f5e; }
.badge-insane { background: rgba(220, 38, 38, 0.12);   color: #dc2626; }

/* Category */
.badge-web      { background: rgba(255, 107, 43, 0.12); color: #ff6b2b; }
.badge-crypto   { background: rgba(192, 132, 252, 0.12);color: #c084fc; }
.badge-forensics{ background: rgba(232, 197, 71, 0.12); color: #e8c547; }
.badge-osint    { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.badge-reverse  { background: rgba(244, 63, 94, 0.12);  color: #f43f5e; }
.badge-misc     { background: rgba(100, 116, 139, 0.12);color: #94a3b8; }
.badge-pwn      { background: rgba(255, 107, 43, 0.15); color: #ff8a5c; }

/* ===========================================
   9. FORMS
   =========================================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
  box-sizing: border-box;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { min-height: 100px; resize: vertical; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a6065' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-hint  { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }
.form-info  { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; }

/* Input wrapper (password toggle) */
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 44px; }
.input-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.input-toggle-password:hover { color: var(--text-secondary); }

/* Password strength */
.password-strength { margin-top: 8px; }
.strength-bar { height: 3px; background: var(--bg-elevated); border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease, background 0.3s ease; }
.strength-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* Form actions */
.form-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.form-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.form-link:hover { color: var(--accent-green); }
.form-actions { margin-top: 4px; }

/* ===========================================
   10. MODAL
   =========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-green);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(16px);
  transition: 0.28s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3,
.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(90deg);
}

.modal-body   { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
}

/* Modal content helpers */
.modal-meta   { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-points {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.modal-description { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 16px; }
.modal-url    { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.modal-hint-section { margin-bottom: 14px; }
.modal-hint-content {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-input);
  border-left: 2px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.modal-info-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.modal-info-item { display: flex; align-items: center; gap: 5px; }

.modal-flag-section { margin-top: 8px; }
.flag-input-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flag-input-wrapper { position: relative; flex: 1; min-width: 200px; }
.flag-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.flag-input-wrapper .form-input { padding-left: 36px; font-family: var(--font-mono); font-size: 0.85rem; }

.modal-solved {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 14px;
  background: rgba(52, 211, 153, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* ===========================================
   11. TABLES
   =========================================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.data-table .rank-1 { color: #ffd700; font-weight: 800; font-family: var(--font-display); }
.data-table .rank-2 { color: #c0c0c0; font-weight: 700; font-family: var(--font-display); }
.data-table .rank-3 { color: #cd7f32; font-weight: 700; font-family: var(--font-display); }

/* ===========================================
   12. TOAST NOTIFICATIONS
   =========================================== */
.toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-left: 3px solid;
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow-card);
  transform: translateX(120%);
  transition: 0.3s ease;
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
}

.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--accent-green); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon   { color: var(--danger); }
.toast.info .toast-icon    { color: var(--accent-green); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.toast-close {
  cursor: pointer;
  opacity: 0.5;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}
.toast-close:hover { opacity: 1; color: var(--text-primary); }

/* ===========================================
   13. HERO SECTION
   =========================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }

.section {
  position: relative;
  padding: 96px 20px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(15, 19, 24, 0.9) 0%, rgba(8, 11, 16, 0.95) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-header {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-badge,
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 107, 43, 0.2);
  border-radius: 3px;
  background: rgba(255, 107, 43, 0.06);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}

.section-subtitle {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
}

/* Hero background decoration */
.hero-bg-effects { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255,107,43,0.03) 59px, rgba(255,107,43,0.03) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,107,43,0.03) 59px, rgba(255,107,43,0.03) 60px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.hero-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -100px;
  background: var(--accent-green);
}
.hero-glow-2 {
  width: 400px;
  height: 400px;
  bottom: -80px;
  right: -80px;
  background: var(--accent-cyan);
}

.hero-content {
  width: min(920px, 100%);
  margin: 0 auto;
  padding-top: 48px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-title .highlight {
  color: var(--accent-green);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
  border-radius: 2px;
  animation: pulseWidth 3s ease-in-out infinite;
}

@keyframes pulseWidth {
  0%, 100% { width: 100%; opacity: 1; }
  50%       { width: 55%; opacity: 0.5; }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  font-family: var(--font-mono);
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 56px;
  justify-content: center;
}

.hero-stat-card {
  min-height: 160px;
  padding: 22px 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-green);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: var(--transition);
}

.hero-stat-card:hover {
  background: rgba(255, 107, 43, 0.04);
  border-color: var(--border-color);
  border-left-color: var(--accent-cyan);
}

.hero-stat-card .stat-icon {
  margin-bottom: 12px;
  color: var(--accent-green);
  font-size: 1.1rem;
}

.stat-number {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.stat-suffix {
  min-height: 1.2em;
  margin-top: 4px;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--accent-green);
  font-weight: 800;
  font-family: var(--font-display);
}

.hero-stat-card .stat-label {
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
}

/* Category / Feature grids */
.category-grid,
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  align-items: stretch;
}

.category-grid > *,
.features-grid > * {
  flex: 0 1 calc(33.333% - 11px);
  max-width: calc(33.333% - 11px);
}

.category-card,
.feature-card {
  height: 100%;
  width: 100%;
}

.category-card .card-body,
.feature-card .card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-icon,
.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 43, 0.07);
  border: 1px solid rgba(255, 107, 43, 0.15);
  font-size: 1.4rem;
  color: var(--accent-green);
}

.category-name,
.feature-title { margin-bottom: 8px; font-size: 1.1rem; }
.category-desc,
.feature-desc  { margin-bottom: 0; color: var(--text-secondary); line-height: 1.7; flex: 1; }
.category-count { margin-top: 20px; }

/* CTA Banner */
.cta-banner { padding: 80px 20px; }
.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 43, 0.15);
  background:
    radial-gradient(circle at top right, rgba(255, 107, 43, 0.1), transparent 40%),
    linear-gradient(135deg, rgba(15, 19, 24, 0.95), rgba(8, 11, 16, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cta-text     { flex: 1; }
.cta-title    { margin-bottom: 8px; }
.cta-subtitle { margin-bottom: 0; max-width: 600px; }
.cta-actions  { display: flex; align-items: center; justify-content: center; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(8, 11, 16, 0.95);
}

.footer-container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-social {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social:hover {
  color: var(--accent-green);
  border-color: rgba(255, 107, 43, 0.3);
}

/* ===========================================
   14. STATS
   =========================================== */
.stat-card  { text-align: center; padding: 18px; }

.stat-value {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--accent-green);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 600;
}

/* ===========================================
   15. FILTER BAR
   =========================================== */
.filter-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 0;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tabs::-webkit-scrollbar { height: 0; }

.filter-tab {
  padding: 7px 15px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.filter-tab:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.filter-tab.active {
  background: rgba(255, 107, 43, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.filter-controls {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.search-box {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.search-box input,
.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.search-box input:focus,
.search-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.1);
}

.search-box input::placeholder,
.search-input::placeholder { color: var(--text-muted); }

.search-box i,
.search-box .search-icon,
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

/* ===========================================
   16. AUTH PAGE
   =========================================== */
.auth-page { min-height: 100vh; }

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-green);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Terminal-style auth header */
.auth-header {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-dots { display: flex; gap: 5px; flex-shrink: 0; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red    { background: #f43f5e; }
.dot-yellow { background: #e8c547; }
.dot-green  { background: #34d399; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  background: none;
}

.auth-tab:hover  { color: var(--text-secondary); }
.auth-tab.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

.auth-form { padding: 24px; }

.auth-message {
  margin: 0 24px 24px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border-left: 3px solid;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  margin: 16px 0;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ===========================================
   17. PROFILE
   =========================================== */
.profile-header {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 28px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-green);
  margin-bottom: 22px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: #080b10;
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.profile-info .profile-email {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 2px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.profile-stat  { text-align: center; }
.profile-stat .stat-value { font-size: 1.4rem; }
.profile-stat .stat-label { font-size: 0.7rem; }

.profile-edit-section { margin-bottom: 22px; }

/* ===========================================
   18. PODIUM (Scoreboard)
   =========================================== */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin: 36px 0;
  min-height: 270px;
}

.podium-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 170px;
  transition: var(--transition);
}

.podium-item:hover { transform: translateY(-4px); }

.podium-item.first {
  order: 2;
  min-height: 250px;
  border-color: rgba(255, 215, 0, 0.25);
  border-left: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.08);
}

.podium-item.second {
  order: 1;
  min-height: 210px;
  border-color: rgba(192, 192, 192, 0.2);
  border-left: 2px solid rgba(192, 192, 192, 0.4);
}

.podium-item.third {
  order: 3;
  min-height: 190px;
  border-color: rgba(205, 127, 50, 0.2);
  border-left: 2px solid rgba(205, 127, 50, 0.4);
}

.podium-rank { font-size: 1.8rem; font-weight: 900; font-family: var(--font-display); }
.podium-rank.gold   { color: #ffd700; }
.podium-rank.silver { color: #c0c0c0; }
.podium-rank.bronze { color: #cd7f32; }

.podium-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin: 10px 0 4px;
  color: var(--text-primary);
}

.podium-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.podium-score {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Podium loading/misc */
.podium-loading,
.table-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.auto-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* ===========================================
   19. ADMIN LAYOUT
   =========================================== */
.admin-layout {
  display: flex;
  gap: 22px;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 230px;
  background: var(--bg-card-solid);
  padding: 18px;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.admin-sidebar h3 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 0 12px;
}

.admin-nav { display: flex; flex-direction: column; gap: 3px; }

.admin-nav-item {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.875rem;
  font-family: var(--font-body);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.admin-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.admin-nav-item.active {
  background: rgba(255, 107, 43, 0.08);
  color: var(--accent-green);
  border-left: 2px solid var(--accent-green);
  padding-left: 12px;
}

.admin-content { flex: 1; padding: 22px; overflow-y: auto; }

/* ===========================================
   20. PAGE LAYOUT
   =========================================== */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 24px 40px;
}

.page-header { margin-bottom: 24px; }
.page-header-content { margin-bottom: 20px; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Flex Utilities */
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }

/* Gap */
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* Margin */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Text */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

/* Display */
.hidden { display: none !important; }
.block  { display: block; }
.inline { display: inline; }
.w-full { width: 100%; }

/* ===========================================
   21. LOADING SKELETON
   =========================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card-solid) 25%,
    rgba(255, 255, 255, 0.04) 50%,
    var(--bg-card-solid) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 3px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line    { height: 14px; border-radius: 3px; margin-bottom: 8px; width: 100%; }
.skeleton-text    { height: 14px; border-radius: 3px; margin-bottom: 8px; width: 100%; }
.skeleton-text:last-child { width: 65%; }
.skeleton-title   { height: 22px; width: 55%; border-radius: 3px; margin-bottom: 10px; }
.skeleton-card    { height: 190px; border-radius: var(--radius-lg); }
.skeleton-avatar  { width: 44px; height: 44px; border-radius: var(--radius-md); }
.skeleton-badge   { height: 20px; width: 55px; border-radius: 3px; }

/* ===========================================
   22. ANIMATIONS
   =========================================== */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp  { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown{ from { transform: translateY(-18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

@keyframes glitch {
  0%  { text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--danger); }
  20% { text-shadow: -2px 0 var(--accent-cyan), 2px 0 var(--danger); }
  40% { text-shadow: 2px 2px var(--accent-cyan), -2px -2px var(--danger); }
  60% { text-shadow: -2px 2px var(--accent-cyan), 2px -2px var(--danger); }
  80% { text-shadow: 2px -2px var(--accent-cyan), -2px 2px var(--danger); }
  100%{ text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--danger); }
}

.animate-fade      { animation: fadeIn 0.45s ease forwards; }
.animate-slide-up  { animation: slideUp 0.45s ease forwards; }
.animate-slide-down{ animation: slideDown 0.45s ease forwards; }
.animate-pulse     { animation: pulse 2s ease-in-out infinite; }

/* Stagger for grid children */
.grid-2 > *:nth-child(1), .grid-3 > *:nth-child(1), .grid-4 > *:nth-child(1) { animation: slideUp 0.45s ease forwards; animation-delay: 0.05s; opacity: 0; }
.grid-2 > *:nth-child(2), .grid-3 > *:nth-child(2), .grid-4 > *:nth-child(2) { animation: slideUp 0.45s ease forwards; animation-delay: 0.10s; opacity: 0; }
.grid-2 > *:nth-child(3), .grid-3 > *:nth-child(3), .grid-4 > *:nth-child(3) { animation: slideUp 0.45s ease forwards; animation-delay: 0.15s; opacity: 0; }
.grid-2 > *:nth-child(4), .grid-3 > *:nth-child(4), .grid-4 > *:nth-child(4) { animation: slideUp 0.45s ease forwards; animation-delay: 0.20s; opacity: 0; }
.grid-2 > *:nth-child(5), .grid-3 > *:nth-child(5), .grid-4 > *:nth-child(5) { animation: slideUp 0.45s ease forwards; animation-delay: 0.25s; opacity: 0; }
.grid-2 > *:nth-child(6), .grid-3 > *:nth-child(6), .grid-4 > *:nth-child(6) { animation: slideUp 0.45s ease forwards; animation-delay: 0.30s; opacity: 0; }
.grid-3 > *:nth-child(7), .grid-4 > *:nth-child(7) { animation: slideUp 0.45s ease forwards; animation-delay: 0.35s; opacity: 0; }
.grid-3 > *:nth-child(8), .grid-4 > *:nth-child(8) { animation: slideUp 0.45s ease forwards; animation-delay: 0.40s; opacity: 0; }
.grid-4 > *:nth-child(9)  { animation: slideUp 0.45s ease forwards; animation-delay: 0.45s; opacity: 0; }
.grid-4 > *:nth-child(10) { animation: slideUp 0.45s ease forwards; animation-delay: 0.50s; opacity: 0; }
.grid-4 > *:nth-child(11) { animation: slideUp 0.45s ease forwards; animation-delay: 0.55s; opacity: 0; }
.grid-4 > *:nth-child(12) { animation: slideUp 0.45s ease forwards; animation-delay: 0.60s; opacity: 0; }

/* ===========================================
   23. SCROLLBAR
   =========================================== */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 43, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 107, 43, 0.38); }

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 43, 0.2) var(--bg-primary);
}

/* ===========================================
   24. GLITCH TEXT
   =========================================== */
.glitch {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glitch::before {
  animation: glitchClip1 4s infinite linear;
  text-shadow: 2px 0 var(--accent-cyan);
  clip-path: inset(0 0 65% 0);
}

.glitch::after {
  animation: glitchClip2 4s infinite linear reverse;
  text-shadow: -2px 0 var(--danger);
  clip-path: inset(65% 0 0 0);
}

@keyframes glitchClip1 {
  0%   { clip-path: inset(0 0 85% 0);   transform: translate(2px, -1px); }
  10%  { clip-path: inset(15% 0 60% 0);  transform: translate(-2px, 1px); }
  20%  { clip-path: inset(40% 0 30% 0);  transform: translate(1px, 2px); }
  30%  { clip-path: inset(60% 0 10% 0);  transform: translate(-1px, -2px); }
  40%  { clip-path: inset(20% 0 55% 0);  transform: translate(2px, 1px); }
  50%  { clip-path: inset(70% 0 5% 0);   transform: translate(-2px, -1px); }
  60%  { clip-path: inset(5% 0 70% 0);   transform: translate(1px, -1px); }
  70%  { clip-path: inset(45% 0 25% 0);  transform: translate(-1px, 2px); }
  80%  { clip-path: inset(80% 0 0 0);    transform: translate(2px, -2px); }
  90%  { clip-path: inset(10% 0 50% 0);  transform: translate(-2px, 1px); }
  100% { clip-path: inset(0 0 85% 0);    transform: translate(2px, -1px); }
}

@keyframes glitchClip2 {
  0%   { clip-path: inset(65% 0 0 0);    transform: translate(-2px, 1px); }
  10%  { clip-path: inset(30% 0 30% 0);  transform: translate(2px, -1px); }
  20%  { clip-path: inset(0 0 60% 0);    transform: translate(-1px, -2px); }
  30%  { clip-path: inset(50% 0 10% 0);  transform: translate(1px, 2px); }
  40%  { clip-path: inset(10% 0 45% 0);  transform: translate(-2px, -1px); }
  50%  { clip-path: inset(55% 0 15% 0);  transform: translate(2px, 1px); }
  60%  { clip-path: inset(25% 0 40% 0);  transform: translate(-1px, 1px); }
  70%  { clip-path: inset(70% 0 0 0);    transform: translate(1px, -2px); }
  80%  { clip-path: inset(5% 0 75% 0);   transform: translate(-2px, 2px); }
  90%  { clip-path: inset(40% 0 20% 0);  transform: translate(2px, -1px); }
  100% { clip-path: inset(65% 0 0 0);    transform: translate(-2px, 1px); }
}

/* ===========================================
   25. TERMINAL / CODE BLOCKS
   =========================================== */
.terminal-block {
  background: #060910;
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-green);
  overflow-x: auto;
  position: relative;
}

.terminal-block::before {
  content: '$ ';
  color: var(--text-muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: rgba(255, 107, 43, 0.07);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent-green);
}

pre {
  background: #060910;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-primary);
}

/* ===========================================
   26. EMPTY STATE
   =========================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i,
.empty-state .empty-icon,
.empty-state-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  opacity: 0.35;
  display: block;
  color: var(--accent-green);
}

.empty-state h3,
.empty-state-title {
  font-family: var(--font-display);
  color: var(--text-secondary);
  margin-bottom: 7px;
  font-size: 1.1rem;
}

.empty-state p,
.empty-state-text {
  max-width: 380px;
  margin: 0 auto 16px;
  font-size: 0.875rem;
}

/* ===========================================
   27. PROGRESS BAR
   =========================================== */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ===========================================
   28. SPINNER
   =========================================== */
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

/* ===========================================
   29. CHALLENGE MODAL EXTRAS
   =========================================== */
.challenge-card.skeleton-card { pointer-events: none; }

/* ===========================================
   30. RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .category-grid > *,
  .features-grid > * {
    flex-basis: calc(50% - 8px);
    max-width: calc(50% - 8px);
  }

  .podium-item { width: 150px; }
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(8, 11, 16, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .navbar-menu.active,
  .navbar-menu.open { display: flex; }

  .navbar-links { flex-direction: column; width: 100%; gap: 3px; }

  .nav-link { padding: 11px 14px; width: 100%; display: block; }

  .navbar-auth {
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .category-grid > *,
  .features-grid > * { flex-basis: 100%; max-width: 100%; }

  .admin-sidebar { display: none; }
  .admin-layout  { flex-direction: column; }

  .page-container { padding-top: 74px; }

  .hero-content { padding-top: 28px; }
  .hero-title   { letter-spacing: -0.02em; }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
    width: min(340px, 100%);
    margin-inline: auto;
  }

  .hero-stat-card { min-height: unset; }

  .section { padding: 64px 20px; }

  .cta-content,
  .footer-container,
  .footer-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions,
  .footer-right { width: 100%; justify-content: flex-start; }

  .podium {
    flex-direction: column;
    align-items: center;
    min-height: auto;
  }

  .podium-item { width: 100%; max-width: 280px; }
  .podium-item.first,
  .podium-item.second,
  .podium-item.third {
    order: unset;
    min-height: auto;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats { justify-content: center; }

  .filter-bar     { flex-direction: column; align-items: stretch; }
  .filter-controls{ flex-direction: column; }
  .search-box     { min-width: 100%; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }

  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 260px; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-stats { width: 100%; }

  .footer-container { padding-inline: 14px; }
  .stat-value { font-size: 1.6rem; }

  .page-container { padding: 70px 14px 24px; }

  .card-body   { padding: 14px; }
  .card-header { padding: 12px 14px; }

  .modal { width: 95%; }
  .modal-header, .modal-body, .modal-footer { padding: 14px; }

  .toast { min-width: auto; max-width: calc(100vw - 32px); }
  .toast-container { right: 10px; left: 10px; }

  .btn    { padding: 9px 14px; font-size: 0.82rem; }
  .btn-lg { padding: 11px 22px; }

  .auth-form { padding: 18px; }
}

/* ===========================================
   31. PRINT
   =========================================== */
@media print {
  body::before, body::after, .navbar, .toast-container { display: none !important; }
  body { background: white; color: black; }
  .page-container { padding-top: 20px; }
}

/* ===========================================
   32. REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}