/* ======================================
   CurrentPulse - Main Stylesheet
   Clean, Professional, Exam-Focused
   ====================================== */

/* CSS Custom Properties */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f5;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --border-color: #e2e4e8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --navbar-height: 64px;
}

/* Dark theme */
[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1b26;
  --bg-card: #1e1f2e;
  --bg-hover: #2a2b3d;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: #2e2f3e;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: #1e293b;
  --success: #22c55e;
  --success-bg: #0a2318;
  --warning: #f59e0b;
  --warning-bg: #1c1508;
  --danger: #ef4444;
  --danger-bg: #1f0a0a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

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

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

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

img { max-width: 100%; height: auto; }

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  height: var(--navbar-height);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}
.logo:hover { color: var(--text-primary); }
.logo-icon {
  background: var(--accent);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.logo-text { letter-spacing: -0.5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-btn-outline {
  border: 1px solid var(--border-color) !important;
}
.nav-btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
}
.nav-btn-primary:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: var(--bg-hover);
}
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.2s;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 14px; }
  .theme-toggle { align-self: flex-start; margin-top: 8px; }
}

/* ---- MAIN CONTENT ---- */
.main-content {
  flex: 1;
}

/* ---- HERO ---- */
.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  max-width: 680px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

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

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .hero-stats { gap: 24px; }
  .stat-number { font-size: 22px; }
}

/* ---- SECTIONS ---- */
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--bg-secondary);
}
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.section-header .section-title { margin-bottom: 0; }

.page-section {
  padding: 40px 0 64px;
}
.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 16px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1fb855;
  color: #fff;
}

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---- FEATURES GRID ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---- ARTICLES GRID ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  color: var(--text-primary);
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--text-primary);
}
.article-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}
.article-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.article-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

/* ---- ENCYCLOPEDIA GRID ---- */
.encyclopedia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.encyclopedia-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  color: var(--text-primary);
}
.encyclopedia-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--text-primary);
}
.encyclopedia-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 6px;
}
.encyclopedia-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.encyclopedia-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.preview-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--warning);
  border: 1px solid var(--warning);
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 8px;
}

/* ---- AFFAIRS LIST ---- */
.affairs-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.affair-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.15s;
}
.affair-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.affair-item.locked {
  opacity: 0.6;
}
.affair-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  min-width: 100px;
}
.affair-title {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}
.affair-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.lock-icon {
  font-size: 14px;
}

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-chip {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- ARTICLE DETAIL ---- */
.affair-detail-card, .article-full {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
}
.affair-detail-header h2, .article-full-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 16px;
}
.affair-detail-content, .article-full-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content-markdown strong {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumb-link {
  display: inline-block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb-link:hover {
  color: var(--accent);
}

/* ---- MCQ SECTION ---- */
.mcq-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.mcq-section h2, .mcq-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.mcq-item {
  margin-bottom: 20px;
}
.mcq-question {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 500;
}
.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mcq-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  font-family: var(--font-family);
}
.mcq-option:hover {
  background: var(--bg-hover);
}
.option-letter {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.mcq-option.correct {
  border-color: var(--success);
  background: var(--success-bg);
}
.mcq-option.correct .option-letter {
  background: var(--success);
  color: #fff;
}
.mcq-option.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.mcq-option.wrong .option-letter {
  background: var(--danger);
  color: #fff;
}

/* ---- DESCRIPTIVE SECTION ---- */
.descriptive-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
}
.descriptive-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}
.descriptive-question {
  font-size: 15px;
  font-style: italic;
  color: var(--text-secondary);
}

/* ---- ENCYCLOPEDIA DETAIL ---- */
.encyclopedia-full {
  max-width: 800px;
}
.encyclopedia-full-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 24px;
}
.encyclopedia-section {
  margin-bottom: 28px;
}
.encyclopedia-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.pyq-item {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.pyq-question {
  margin-bottom: 8px;
}
.pyq-answer {
  color: var(--success);
  font-weight: 500;
  margin-top: 8px;
}
.pyq-reveal { margin-top: 4px; }

.related-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.related-topic-link {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.related-topic-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- PAYWALL ---- */
.paywall-section {
  padding: 100px 0;
}
.paywall-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.paywall-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.paywall-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.paywall-text {
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.paywall-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.paywall-overlay {
  position: relative;
  margin-top: 24px;
  padding: 48px 24px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-card) 30%);
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.paywall-message h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.paywall-message p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ---- AUTH ---- */
.auth-section {
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 14px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- FORMS ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}
.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}
.alert-info {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.alert a {
  font-weight: 600;
  text-decoration: underline;
}

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success {
  background: var(--success-bg);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-default {
  background: var(--bg-secondary);
  color: var(--text-muted);
}

/* ---- DASHBOARD ---- */
.dashboard-section {
  padding: 32px 0 64px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.dashboard-header h1 {
  font-size: 24px;
  font-weight: 700;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab:hover {
  color: var(--text-primary);
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- SUBSCRIBE ---- */
.subscribe-section {
  padding: 48px 0 80px;
}
.subscribe-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.subscribe-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}
.subscribe-price {
  text-align: center;
  margin-bottom: 24px;
}
.price-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
}
.price-period {
  font-size: 18px;
  color: var(--text-muted);
}
.subscribe-benefits {
  margin-bottom: 32px;
}
.subscribe-benefits h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.subscribe-benefits ul {
  list-style: none;
  padding: 0;
}
.subscribe-benefits li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.subscribe-benefits li::before {
  content: "\2713 ";
  color: var(--success);
  font-weight: 700;
  margin-right: 8px;
}
.payment-steps {
  margin-bottom: 24px;
}
.payment-steps h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}
.step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.step-number {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.step-content { flex: 1; }
.step-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.upi-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.upi-display code {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.subscribe-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ---- SUBSCRIPTION INFO ---- */
.subscription-info {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  font-weight: 600;
  font-size: 14px;
}
.info-value {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
}
.pricing-card {
  position: relative;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
}
.pricing-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.pricing-card .price {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 20px;
}
.pricing-card .price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
  text-align: left;
}
.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.pricing-features li::before {
  content: "\2713 ";
  color: var(--success);
  font-weight: 700;
  margin-right: 8px;
}
.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ---- EXAMS ---- */
.exams-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.exam-badge {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- ENCYCLOPEDIA LIST ---- */
.encyclopedia-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.encyclopedia-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.15s;
}
.encyclopedia-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.encyclopedia-topic {
  font-weight: 500;
}

/* ---- ADMIN ---- */
.admin-section {
  padding: 32px 0 64px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
}
.admin-stat-card .stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.admin-stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-section-block {
  margin-bottom: 32px;
}
.admin-section-block h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th, .admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}
.admin-table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
.admin-actions {
  display: flex;
  gap: 6px;
}

/* ---- ERROR ---- */
.error-section {
  padding: 120px 0;
}
.error-card {
  max-width: 480px;
  margin: 0 auto;
}
.error-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}
.error-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.footer-section p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-section ul {
  list-style: none;
}
.footer-section li {
  padding: 3px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-section li a {
  color: var(--text-muted);
}
.footer-section li a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ---- MCQ START ---- */
.mcq-start {
  text-align: center;
  padding: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}
.mcq-start p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ---- PREMIUM LOCK ---- */
.premium-lock { position: relative; margin: 20px 0; }
.premium-lock-blur { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.5; }
.premium-lock-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; background: var(--bg-primary); padding: 30px 40px; border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 2; border: 2px solid var(--primary); }
.premium-lock-overlay h3 { margin: 10px 0 8px; color: var(--text-primary); }
.premium-lock-overlay p { color: var(--text-secondary); margin-bottom: 16px; }
.premium-lock-icon { font-size: 2.5rem; }
.premium-lock-inline { background: var(--bg-secondary); padding: 16px 20px; border-radius: 10px; color: var(--text-secondary); border-left: 4px solid var(--primary); }
.premium-lock-inline a { color: var(--primary); font-weight: 600; }

/* ---- QUIZ ---- */
.quiz-header { margin-bottom: 24px; }
.quiz-container { max-width: 700px; }
.quiz-progress { height: 6px; background: var(--bg-secondary); border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s ease; }
.quiz-score-bar { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--text-secondary); font-size: 0.9rem; }
.quiz-question { margin-bottom: 20px; }
.quiz-q-text { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-primary); }
.quiz-q-source { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }
.quiz-result { text-align: center; padding: 40px 20px; }
.quiz-result-card { background: var(--bg-secondary); padding: 40px; border-radius: 16px; }
.quiz-result-score { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: 16px 0; }
.quiz-result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.mcq-option.correct { background: #22c55e !important; color: white !important; border-color: #22c55e !important; }
.mcq-option.correct .option-letter { background: white; color: #22c55e; }
.mcq-option.wrong { background: #ef4444 !important; color: white !important; border-color: #ef4444 !important; }
.mcq-option.wrong .option-letter { background: white; color: #ef4444; }

/* ---- SOCIAL SHARE ---- */
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; text-decoration: none; color: white; font-size: 0.85rem; font-weight: 600; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.85; }
.share-btn-wa { background: #25D366; }
.share-btn-tg { background: #0088cc; }
.share-btn-tw { background: #1DA1F2; }
.share-btn-copy { background: var(--text-secondary); cursor: pointer; border: none; color: white; font-family: inherit; }

/* ---- CHALLENGE ---- */
.challenge-header { margin-bottom: 24px; }
.challenge-subtitle { color: var(--text-secondary); font-size: 1.1rem; }
.challenge-start { padding: 20px 0; }

/* ---- DASHBOARD STATS ---- */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.stat-card { background: var(--bg-secondary); padding: 20px; border-radius: 12px; text-align: center; border: 1px solid var(--border-color); }
.stat-card-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-card-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }
.premium-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.action-card { display: flex; flex-direction: column; align-items: center; padding: 20px 16px; border-radius: 14px; background: linear-gradient(135deg, #4F6EF7, #6d8cff); color: white; text-decoration: none; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.action-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,110,247,0.3); }
.action-icon { font-size: 2rem; margin-bottom: 8px; }
.action-title { font-weight: 700; font-size: 1rem; }
.action-desc { font-size: 0.8rem; opacity: 0.9; margin-top: 4px; }
.premium-features-list { display: grid; gap: 8px; margin-top: 12px; }
.pf-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-secondary); border-radius: 10px; font-size: 0.95rem; color: var(--text-primary); }
.pf-icon { font-size: 1.2rem; }
