/* ==========================================================================
   Axiom Tech Forge - Modern White, Emerald Green & Gold Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Cinzel:wght@600;700;800&display=swap');

:root {
  /* Core Colors */
  --bg-primary: #FAFBF9;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F2F7F4;
  --bg-dark: #0A1C16;
  
  /* Green Shades */
  --green-primary: #0D5C46;
  --green-hover: #084031;
  --green-light: #E6F3EF;
  --green-mint: #137A5D;
  --green-accent: #199B77;
  
  /* Gold Metallic & Foil Shades */
  --gold-primary: #C5A059;
  --gold-metallic: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
  --gold-soft: #F7F1E1;
  --gold-border: #D4AF37;
  --gold-hover: #AA7C11;
  --gold-text: #966F1E;

  /* Neutral Text & Grays */
  --text-heading: #0F2820;
  --text-body: #334A42;
  --text-muted: #6B8278;
  --border-color: #E2ECE7;
  --border-gold: rgba(212, 175, 55, 0.4);

  /* Feedback Colors */
  --success-bg: #E8F8F2;
  --success-text: #0B6849;
  --error-bg: #FDF2F2;
  --error-text: #9B1C1C;

  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(13, 92, 70, 0.05);
  --shadow-md: 0 8px 24px rgba(13, 92, 70, 0.08);
  --shadow-lg: 0 16px 40px rgba(13, 92, 70, 0.12);
  --shadow-gold: 0 8px 25px rgba(197, 160, 89, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-heading);
  line-height: 1.25;
}

button {
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   Header & Navbar Component
   ========================================================================== */

.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--green-primary);
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.nav-item {
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  background: transparent;
}

.nav-item:hover {
  color: var(--green-primary);
  background-color: rgba(13, 92, 70, 0.05);
}

.nav-item.active {
  background-color: var(--green-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 92, 70, 0.25);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--green-light);
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(13, 92, 70, 0.15);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-metallic);
  color: var(--green-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.user-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--green-primary);
}

.btn-logout {
  background: var(--bg-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.btn-logout:hover {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: rgba(155, 28, 28, 0.2);
}

/* Main Container Layout */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
  display: block;
}

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

/* ==========================================================================
   AUTHENTICATION SCREEN (Login & Register)
   ========================================================================== */

.auth-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 10% 20%, rgba(13, 92, 70, 0.04) 0%, rgba(197, 160, 89, 0.05) 90%);
}

.auth-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  position: relative;
}

.auth-header-bg {
  background: linear-gradient(135deg, var(--green-hover) 0%, var(--green-primary) 100%);
  padding: 2.2rem 2rem 2.8rem;
  text-align: center;
  color: #FFFFFF;
  position: relative;
}

.auth-header-bg::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 14px;
  background: var(--bg-surface);
  clip-path: ellipse(50% 60% at 50% 100%);
}

.auth-logo-circle {
  width: 76px;
  height: 76px;
  background: #FFFFFF;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border: 3px solid #D4AF37;
  padding: 4px;
}

.auth-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.auth-title {
  color: #FFFFFF;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--green-primary);
  border-bottom-color: var(--gold-border);
}

.auth-form-container {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition);
  background: var(--bg-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--green-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(13, 92, 70, 0.1);
}

.btn-auth-submit {
  width: 100%;
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-mint) 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  margin-top: 0.5rem;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, var(--green-hover) 0%, var(--green-primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.auth-alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-alert.error {
  display: block;
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid rgba(155, 28, 28, 0.2);
}

.auth-alert.success {
  display: block;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(11, 104, 73, 0.2);
}

/* ==========================================================================
   HOME DASHBOARD VIEW
   ========================================================================== */

.hero-banner {
  background: linear-gradient(135deg, var(--green-hover) 0%, var(--green-primary) 60%, var(--green-mint) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-gold);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid var(--gold-border);
  color: #FFF2C6;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero-title {
  color: #FFFFFF;
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-gold {
  background: var(--gold-metallic);
  color: #2D2005;
  font-weight: 800;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Stats Section Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-primary);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--green-light);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card.gold .stat-icon {
  background: var(--gold-soft);
  color: var(--gold-text);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Home Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title-wrap h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
}

.section-title-wrap p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Platform Features Highlight Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--green-primary);
}

.feature-card.gold-border::before {
  background: var(--gold-border);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   COURSES CATALOG & 5-MODULE LIST VIEW
   ========================================================================== */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.course-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-primary);
}

.course-card-header {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-mint) 100%);
  padding: 2rem 1.5rem 1.5rem;
  color: #FFFFFF;
  position: relative;
}

.course-category-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.3);
  border: 1px solid var(--gold-border);
  color: #FFF5CE;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.course-card-title {
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.course-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.course-meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-body);
  font-weight: 600;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.course-meta-item i {
  color: var(--gold-text);
}

.course-progress-wrap {
  margin-bottom: 1.25rem;
}

.progress-label-flex {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-heading);
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-primary) 0%, var(--gold-border) 100%);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.5s ease;
}

.btn-start-course {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--green-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-start-course:hover {
  background: var(--green-hover);
  box-shadow: 0 4px 15px rgba(13, 92, 70, 0.3);
}

  .btn-pay-to-unlock {
    width: 100%;
    padding: 0.95rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #d4af37 0%, #f7d56f 100%);
    color: #2B2105;
    font-weight: 800;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 1px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.22);
  }

  .btn-pay-to-unlock:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(212, 175, 55, 0.32);
  }

  background: #F8FAF9;
  opacity: 0.7;
  border-color: #E2ECE7;
}

.module-item-card.passed {
  border-color: #059669;
  background: #F0FDF4;
}

.module-item-card.active-available {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-sm);
  background: #FFFFFF;
}

.module-item-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.module-number-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.module-item-card.locked .module-number-badge {
  background: #E5E7EB;
  color: #9CA3AF;
}

.module-item-card.passed .module-number-badge {
  background: var(--gold-metallic);
  color: #2D2005;
}

.module-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.module-item-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.btn-module-action {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-module-action.start {
  background: var(--green-primary);
  color: #FFFFFF;
}

.btn-module-action.start:hover {
  background: var(--green-hover);
}

.btn-module-action.locked {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}

.btn-module-action.passed {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid var(--gold-border);
}

/* ==========================================================================
   QUIZ SOLVING INTERFACE & MODAL
   ========================================================================== */

.quiz-container-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 28, 22, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.quiz-container-modal.active {
  display: flex;
}

.quiz-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-gold);
  overflow: hidden;
}

.quiz-header {
  background: var(--green-primary);
  color: #FFFFFF;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-header-title h3 {
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 700;
}

.quiz-header-title p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.btn-close-quiz {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.btn-close-quiz:hover {
  background: rgba(255, 255, 255, 0.3);
}

.quiz-progress-strip {
  background: var(--bg-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 700;
}

.quiz-step-counter {
  color: var(--green-primary);
}

.quiz-timer {
  color: var(--gold-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quiz-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.question-text-box {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.option-item {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-item:hover {
  border-color: var(--green-primary);
  background: var(--green-light);
}

.option-item.selected {
  border-color: var(--green-primary);
  background: var(--green-light);
  font-weight: 700;
  color: var(--green-primary);
}

.option-item.correct {
  border-color: #059669 !important;
  background: #ECFDF5 !important;
  color: #047857 !important;
}

.option-item.wrong {
  border-color: #DC2626 !important;
  background: #FEF2F2 !important;
  color: #B91C1C !important;
}

.explanation-card {
  display: none;
  background: #FFFDF5;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.explanation-card.active {
  display: block;
}

.explanation-title {
  font-weight: 700;
  color: var(--gold-text);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.explanation-text {
  font-size: 0.88rem;
  color: var(--text-body);
}

.quiz-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-quiz-nav {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-prev {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.btn-prev:hover {
  background: var(--border-color);
  color: var(--text-heading);
}

.btn-next {
  background: var(--green-primary);
  color: #FFFFFF;
}

.btn-next:hover {
  background: var(--green-hover);
}

.btn-submit-quiz {
  background: var(--gold-metallic);
  color: #2D2005;
  font-weight: 800;
  box-shadow: var(--shadow-gold);
}

.btn-submit-quiz:hover {
  transform: translateY(-2px);
}

/* Quiz Result Dialog */
.result-box-content {
  text-align: center;
  padding: 2rem 1.5rem;
}

.result-badge-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  box-shadow: var(--shadow-md);
}

.result-badge-icon.pass {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 3px solid var(--gold-border);
}

.result-badge-icon.fail {
  background: var(--error-bg);
  color: var(--error-text);
  border: 3px solid rgba(155, 28, 28, 0.2);
}

.result-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.result-score-tag {
  display: inline-block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--green-primary);
  margin: 0.5rem 0 1rem;
}

.result-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ==========================================================================
   CERTIFICATES VIEW & GENERATOR
   ========================================================================== */

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.certificate-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gold-metallic);
}

.certificate-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cert-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--gold-border);
}

.cert-course-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-heading);
}

.cert-issue-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-id-tag {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--green-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.cert-card-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-view-cert {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--green-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-view-cert:hover {
  background: var(--green-hover);
}

.btn-download-cert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gold-metallic);
  color: #2B2105;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-download-cert:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Empty State Styling */
.empty-cert-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
  grid-column: 1 / -1;
}

.empty-cert-icon {
  font-size: 3.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-cert-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.empty-cert-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   CERTIFICATE DISPLAY MODAL (EXACT CANVAS RENDERER)
   ========================================================================== */

.cert-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 28, 22, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.cert-modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-gold);
}

.cert-modal-header {
  background: var(--green-primary);
  color: #FFFFFF;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cert-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.cert-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #EAEFEB;
}

/* Canvas Display styling */
#certificateCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
  background: #FFFFFF;
}

.cert-modal-footer {
  padding: 1.25rem 1.75rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-banner {
    padding: 2rem 1.5rem;
  }

  .courses-grid, .certificates-grid {
    grid-template-columns: 1fr;
  }
}
