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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: #2a2a3a;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --text: #e2e8f0;
  --muted: #64748b;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo span { color: var(--accent2); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

/* CONTAINERS */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding: 3rem 0; }

/* HERO */
.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124, 58, 237, 0.15), transparent);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.hero h1 .highlight { color: var(--accent2); }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent2); box-shadow: 0 0 20px var(--accent-glow); text-decoration: none; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

/* BADGES */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-purple { background: rgba(124,58,237,0.2); color: var(--accent2); }
.badge-green { background: rgba(16,185,129,0.2); color: var(--green); }
.badge-yellow { background: rgba(245,158,11,0.2); color: var(--yellow); }
.badge-red { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-gray { background: rgba(100,116,139,0.2); color: var(--muted); }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* TABLES */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--accent2); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

/* SECTION HEADERS */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header h2 { font-size: 1.25rem; font-weight: 700; }
.section-header p { color: var(--muted); font-size: 0.9rem; }

/* ALERTS */
.alert { padding: 0.875rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--green); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }
.alert-info { background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.3); color: var(--accent2); }

/* SEARCH BAR */
.search-bar { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 200px; }
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chip { padding: 0.3rem 0.9rem; border-radius: 20px; border: 1px solid var(--border); background: var(--surface2); font-size: 0.8rem; cursor: pointer; color: var(--muted); transition: all 0.2s; }
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent2); background: rgba(124,58,237,0.1); }

/* RATING STARS */
.stars { color: var(--yellow); letter-spacing: 1px; }

/* PAGINATION */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.pagination button { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 0.4rem 0.875rem; border-radius: var(--radius); cursor: pointer; font-size: 0.85rem; }
.pagination button.active { background: var(--accent); border-color: var(--accent); }
.pagination button:hover:not(.active) { border-color: var(--accent); }

/* LOADING */
.loading { text-align: center; padding: 3rem; color: var(--muted); }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent2); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2rem; max-width: 480px; width: 100%; }
.modal h3 { margin-bottom: 1.25rem; font-size: 1.2rem; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }
.hidden { display: none !important; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 4rem; }
footer a { color: var(--muted); }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .card-grid { grid-template-columns: 1fr; }
}
