:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(22, 31, 49, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #06b6d4;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at 15% 15%, #1e1b4b 0%, var(--bg-main) 60%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-danger-sm:hover {
  background: var(--danger);
  color: #fff;
}

/* Layout container */
.container {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15 ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

/* Quiz items & cards */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.quiz-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quiz-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.quiz-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Options for Quiz */
.option-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-label:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
}

.option-label input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* Review & Results Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th, .data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-card-border);
}

.data-table th {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--bg-card-border);
  background: rgba(15, 23, 42, 0.5);
}
