/* Quantum Siddhar Course — Components */

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 0;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: -4px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a, .nav-links button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.nav-links a:hover, .nav-links button:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-gold {
  background: var(--gradient-gold);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(74, 108, 247, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

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

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card-premium {
  background: var(--gradient-card);
  border: 1px solid rgba(74, 108, 247, 0.2);
  box-shadow: var(--shadow-gold);
}

.card-premium:hover {
  border-color: rgba(74, 108, 247, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(74, 108, 247, 0.2);
}

/* ─── Inputs ─── */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

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

/* ─── Module Card ─── */
.module-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  cursor: pointer;
}

.module-icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-glow);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.module-info { flex: 1; }
.module-info h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
  font-family: var(--font-tamil);
}

.module-info .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.module-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-tamil);
}

.module-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Lesson List ─── */
.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.lesson-item:hover { background: var(--gold-glow); }
.lesson-item:last-child { border-bottom: none; }

.lesson-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
  flex-shrink: 0;
}

.lesson-num.completed {
  background: var(--success);
  color: #fff;
}

.lesson-info { flex: 1; }
.lesson-info h4 {
  font-size: 0.95rem;
  font-family: var(--font-tamil);
  margin-bottom: 2px;
}

.lesson-info .duration {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lesson-lock {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* ─── Pricing Cards ─── */
.pricing-card {
  padding: 36px;
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--gold);
  transform: scale(1.05);
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-gold);
  color: #fff;
  padding: 4px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--gold);
  margin: 16px 0 4px;
}

.pricing-card .price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pricing-card .features {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}

.pricing-card .features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card .features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
}

/* ─── Progress Bar ─── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── Verse Card ─── */
.verse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 16px 0;
  border-left: 3px solid var(--gold);
}

.verse-tamil {
  font-family: var(--font-tamil);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gold);
  margin-bottom: 12px;
  white-space: pre-line;
}

.verse-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.verse-meaning {
  font-family: var(--font-tamil);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-gold {
  background: var(--gold-glow);
  color: var(--gold);
}

.badge-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-lock {
  background: rgba(160, 160, 192, 0.15);
  color: var(--text-muted);
}

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

.toast-success { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.toast-error { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.toast-info { background: rgba(96, 165, 250, 0.15); color: var(--info); }

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

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ─── Theme Toggle ─── */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

/* ─── Loading ─── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .navbar-inner { padding: 0 16px; }
  .logo { font-size: 1.1rem; }
  .nav-links a, .nav-links button { padding: 6px 10px; font-size: 0.8rem; }
  .card { padding: 20px; }
  .pricing-card.featured { transform: scale(1); }
  .module-card { flex-direction: column; }
  .module-icon { width: 48px; height: 48px; font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .nav-links .hide-mobile { display: none; }
  .btn-lg { padding: 14px 28px; font-size: 0.95rem; }
}

/* ─── Light Mode Overrides ─── */
html[data-theme="light"] .navbar {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .btn-gold {
  background: var(--gradient-gold);
  color: #fff;
}

html[data-theme="light"] .card-premium {
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.06), rgba(255, 255, 255, 0.9));
  border-color: rgba(74, 108, 247, 0.25);
}

html[data-theme="light"] .verse-card {
  border-left-color: var(--gold);
  background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
  background-size: 200% 100%;
}

html[data-theme="light"] .pricing-card.featured::before {
  color: #fff;
}
