/* ============================================================
   EDUQUEST AP MOCK PLATFORM - MAIN DESIGN SYSTEM (index.css)
   ============================================================ */

:root {
  --bg-main: #0d0d14;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border-card: rgba(255, 255, 255, 0.08);
  --primary-purple: #7c3aed;
  --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --text-bright: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-dim: rgba(255, 255, 255, 0.4);
  --font-heading: 'Syne', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-bright);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Header Bar ───────────────────────────────────────────── */
.hdr {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  background: rgba(13, 13, 20, 0.95);
  backdrop-filter: blur(14px);
  z-index: 100;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-bright);
}

.brand-pill {
  background: var(--primary-gradient);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 8px;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
}

.hdr-btn:hover {
  background: rgba(147, 197, 253, 0.1);
  border-color: #93c5fd;
}

.hdr-btn.admin-btn {
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.3);
}

.hdr-btn.admin-btn:hover {
  background: rgba(252, 211, 77, 0.1);
  border-color: #fcd34d;
}

/* ── Container Layout ─────────────────────────────────────── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.hero-banner {
  margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(79, 70, 229, 0.05) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 20px;
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: center;
}

.hero-stat-val {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #c084fc;
}

.hero-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── MAIN NAVIGATION TABS ─────────────────────────────────── */
.nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.nav-tab {
  padding: 12px 22px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.nav-tab:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.07);
}

.nav-tab.active {
  color: #fff;
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

/* ── SUB-TABS FOR TOPIC TESTS ─────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.5) transparent;
}

.cat-tabs::-webkit-scrollbar {
  height: 4px;
}

.cat-tabs::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.5);
  border-radius: 4px;
}

.cat-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cat-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.subject-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.4) transparent;
}

.subject-tabs::-webkit-scrollbar {
  height: 4px;
}

.subject-tabs::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 4px;
}

.subject-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.subject-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.subject-tab.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(79, 70, 229, 0.3));
  color: #c084fc;
  border-color: #a855f7;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

/* ── TAB PANELS ───────────────────────────────────────────── */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── CARD GRID LAYOUT ─────────────────────────────────────── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge.unlocked {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-badge.locked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.meta-item {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-item strong {
  color: var(--text-bright);
}

.card-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.card-btn.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.card-btn.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.card-btn.btn-unlock {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.card-btn.btn-unlock:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* ── MODAL DIALOG ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  padding: 28px;
  position: relative;
}

.modal-header {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  border-color: #7c3aed;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}
