/* ============================================================
   RiceCake - Korean Language Learning Platform
   Consolidated Stylesheet
   ============================================================ */

/* =========================
   1. CSS Variables
   ========================= */
:root {
  /* Brand Colors */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #06b6d4;
  --success-color: #10b981;
  --danger-color: #ef4444;
  
  /* Onboarding Accent Colors */
  --accent-pink: #ec4899;
  --accent-pink-light: #fdf2f8;
  --accent-pink-hover: #db2777;
  --accent-indigo: #6366f1;
  --accent-indigo-light: #eef2ff;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fffbeb;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #f5f3ff;
  --accent-green: #10b981;
  --accent-green-light: #d1fae5;
  
  /* Star Rating Colors */
  --star-color: #fbbf24;
  --star-empty-color: #d1d5db;
  
  /* Neutral Colors */
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
}

/* =========================
   2. Base & Layout
   ========================= */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--light-bg);
}

/* Sticky Footer Layout */
.page-wrapper {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "header" "main" "footer";
}

.page-wrapper > header { grid-area: header; }
.page-wrapper > .main-content { grid-area: main; }
.page-wrapper > .footer {
  grid-area: footer;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

/* =========================
   3. Navigation
   ========================= */
.navbar {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Sidebar Navigation (Manage Pages) */
.nav-pills {
  background-color: white;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-pills .nav-link {
  color: var(--text-secondary);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}

.nav-pills .nav-link:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  color: white !important;
}

/* =========================
   4. Buttons
   ========================= */
.btn {
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-onboarding {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #f472b6 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 1rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-onboarding:hover {
  background: linear-gradient(135deg, var(--accent-pink-hover) 0%, var(--accent-pink) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.35);
}

/* =========================
   5. Forms
   ========================= */
.form-control, .form-select {
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

.form-floating > label {
  color: var(--text-secondary);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--primary-color);
}

/* =========================
   6. Cards & Containers
   ========================= */
.card {
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* =========================
   7. Alerts & Messages
   ========================= */
.alert {
  border-radius: 0.5rem;
  border: none;
}

.text-danger {
  color: var(--danger-color) !important;
  font-size: 0.875rem;
}

/* =========================
   8. Dropdowns
   ========================= */
.dropdown-menu {
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: var(--border-color);
}

.dropdown-menu form {
  margin: 0;
}

.dropdown-menu form button {
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.dropdown-menu form button:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

/* =========================
   9. Auth Pages
   ========================= */
.auth-container {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.cf-turnstile {
  display: flex;
  justify-content: center;
}

.cf-turnstile iframe {
  border-radius: 0.5rem;
}

/* =========================
   10. Onboarding Flow
   ========================= */
.onboarding-container {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #fdf2f8 0%, #fae8ff 50%, #f3e8ff 100%);
}

.onboarding-card {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  position: relative;
  margin: auto 0;
}

.onboarding-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-color);
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
}

.onboarding-progress .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-pink), #f472b6);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.step-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.back-button:hover {
  background-color: var(--light-bg);
  color: var(--text-primary);
}

.onboarding-illustration {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  border-radius: 1rem;
}

.illustration-icon {
  font-size: 4rem;
  color: var(--accent-pink);
}

.illustration-icon.level-icon { color: var(--accent-green); }
.illustration-icon.language-icon { color: var(--accent-indigo); }
.illustration-icon.schedule-icon { color: var(--accent-amber); }
.illustration-icon.budget-icon { color: var(--accent-purple); }

.onboarding-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.onboarding-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* =========================
   11. Selection Components
   ========================= */

/* Chip Selection (Multi-select tags) */
.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.option-chip {
  cursor: pointer;
}

.option-chip input {
  display: none;
}

.chip-content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: white;
  transition: all 0.2s;
}

.chip-content:hover {
  border-color: #f9a8d4;
  background: var(--accent-pink-light);
}

.option-chip input:checked + .chip-content {
  border-color: var(--accent-pink);
  background: var(--accent-pink-light);
  color: #be185d;
}

/* Card Selection (Radio/Checkbox cards) */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.option-card input {
  display: none;
}

.option-card:hover {
  border-color: #f9a8d4;
  background: var(--accent-pink-light);
}

.option-card:has(input:checked) {
  border-color: var(--accent-pink);
  background: var(--accent-pink-light);
}

.option-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.option-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.option-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.check-icon {
  font-size: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: 0.5rem;
}

.option-card:has(input:checked) .check-icon {
  opacity: 1;
  color: var(--accent-pink);
}

/* Language Grid Selection */
.language-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.language-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  text-align: center;
}

.language-option input {
  display: none;
}

.language-option:hover {
  border-color: #a5b4fc;
  background: var(--accent-indigo-light);
}

.language-option:has(input:checked) {
  border-color: var(--accent-indigo);
  background: var(--accent-indigo-light);
}

.language-option:has(input:checked) .language-name,
.language-option:has(input:checked) .language-icon-flag {
  color: #4338ca;
}

.language-icon-flag {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-indigo);
}

.language-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Schedule Selection */
.schedule-section {
  margin-bottom: 1.5rem;
}

.schedule-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.day-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.day-option input {
  display: none;
}

.day-option:hover {
  border-color: #fcd34d;
  background: var(--accent-amber-light);
}

.day-option:has(input:checked) {
  border-color: var(--accent-amber);
  background: var(--accent-amber-light);
  color: #b45309;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.time-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  text-align: center;
}

.time-option input {
  display: none;
}

.time-option:hover {
  border-color: #fcd34d;
  background: var(--accent-amber-light);
}

.time-option:has(input:checked) {
  border-color: var(--accent-amber);
  background: var(--accent-amber-light);
}

.time-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.time-range {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Budget Selection */
.budget-list .option-card {
  padding: 1.25rem 1.5rem;
}

.budget-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.budget-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* =========================
   12. Welcome & Complete Cards
   ========================= */
.welcome-card,
.complete-card {
  text-align: center;
}

.welcome-illustration {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-pink);
}

.welcome-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--light-bg);
  border-radius: 0.75rem;
}

.feature-item i {
  color: var(--accent-green);
  font-size: 1.25rem;
}

.feature-item span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.complete-animation {
  margin-bottom: 1.5rem;
}

.success-checkmark {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green) 0%, #34d399 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.4s ease-out;
}

.success-checkmark i {
  font-size: 3rem;
  color: white;
}

@keyframes scaleIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.complete-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.complete-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Summary Card */
.summary-card {
  background: var(--light-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.summary-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-item i {
  font-size: 1.25rem;
  margin-top: 0.1rem;
}

.summary-item > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-value {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* =========================
   13. Preference Sections (Manage Pages)
   ========================= */
.preference-section {
  padding: 1.5rem;
  background: var(--light-bg);
  border-radius: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.section-header h5 {
  font-weight: 600;
  color: var(--text-primary);
}

/* =========================
   14. Utility Classes
   ========================= */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

/* =========================
   15. Responsive Styles
   ========================= */
@media (max-width: 768px) {
  .auth-card {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .navbar-nav .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}

@media (max-width: 576px) {
  .onboarding-card {
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
  }

  .onboarding-title,
  .welcome-title {
    font-size: 1.5rem;
  }

  .language-grid,
  .time-grid {
    grid-template-columns: 1fr;
  }

  .days-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =========================
   16. Home Page - Hero Section
   ========================= */
.hero-section {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  padding: 5rem 0;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-referral-container {
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.hero-main-content {
  margin-top: auto;
  margin-bottom: auto;
}

.hero-referral-banner {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 2px solid var(--accent-amber);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}

.hero-referral-banner h5 {
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.hero-referral-benefits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-referral-benefits i {
  color: var(--accent-amber);
}

.hero-referral-separator {
  opacity: 0.4;
  margin: 0 0.25rem;
}

.hero-referral-link {
  color: var(--accent-amber);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}

.hero-referral-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero-referral-benefits {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .hero-referral-separator {
    display: none;
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  color: white;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-cta .btn-onboarding {
  background: white;
  color: var(--primary-color);
}

.hero-cta .btn-onboarding:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-cta .btn-outline-light {
  border-width: 2px;
}

.hero-cta .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.hero-highlights {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

.highlight-item i {
  font-size: 1.1rem;
  color: #fbbf24;
}

/* Hero Illustration */
.hero-illustration {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: absolute;
}

.main-card {
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
}

.card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink) 0%, #f472b6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-avatar i {
  font-size: 2rem;
  color: white;
}

.card-greeting {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.card-text.korean-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.floating-card {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
  animation: float 3s ease-in-out infinite;
}

.floating-card i {
  font-size: 1.25rem;
}

.card-1 {
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.card-1 i { color: var(--accent-pink); }

.card-2 {
  bottom: 25%;
  left: 5%;
  animation-delay: 1s;
}

.card-2 i { color: var(--accent-indigo); }

.card-3 {
  bottom: 10%;
  right: 15%;
  animation-delay: 2s;
}

.card-3 i { color: var(--accent-amber); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =========================
   17. Home Page - How It Works
   ========================= */
.hiw-section {
  padding: 6rem 0;
  background: white;
}

.hiw-section-teacher {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
}

.hiw-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.hiw-step {
  flex: 1;
  text-align: center;
  padding: 0 1.25rem;
  position: relative;
}

.hiw-step-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  margin: 0 auto 1rem;
}

.hiw-step-number-teacher {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

.hiw-step-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hiw-step:hover .hiw-step-icon {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
}

.hiw-step-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.hiw-step-icon-teacher {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.hiw-step-icon-teacher i {
  color: #059669;
}

.hiw-step:hover .hiw-step-icon-teacher {
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.15);
}

.hiw-step-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hiw-step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.hiw-step-connector {
  display: flex;
  align-items: center;
  padding-top: 3.25rem;
  flex-shrink: 0;
}

.hiw-step-connector i {
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0.4;
}

.hiw-step-connector-teacher i {
  color: #059669;
}

@media (max-width: 767.98px) {
  .hiw-steps {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .hiw-step {
    max-width: 320px;
  }

  .hiw-step-connector {
    padding-top: 0;
    transform: rotate(90deg);
  }
}

/* =========================
   17b. Home Page - Platform Features
   ========================= */
.how-it-works-section {
  padding: 6rem 0;
  background: white;
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.step-card {
  background: var(--light-bg);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  height: 100%;
  transition: all 0.3s;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.step-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.step-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* =========================
   18. Home Page - Features Section
   ========================= */
.features-section {
  padding: 6rem 0;
  background: var(--light-bg);
}

.features-content {
  max-width: 500px;
}

.features-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-pink-light);
  color: var(--accent-pink);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.features-badge.teacher-badge {
  background: var(--accent-indigo-light);
  color: var(--accent-indigo);
}

.features-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item-home {
  display: flex;
  gap: 1rem;
}

.feature-icon-home {
  width: 50px;
  height: 50px;
  background: var(--accent-pink-light);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon-home i {
  font-size: 1.5rem;
  color: var(--accent-pink);
}

.feature-icon-home.teacher-icon {
  background: var(--accent-indigo-light);
}

.feature-icon-home.teacher-icon i {
  color: var(--accent-indigo);
}

.feature-text h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-text p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.features-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
}

.feature-showcase {
  background: linear-gradient(135deg, var(--accent-pink-light) 0%, #fce7f3 100%);
  border-radius: 2rem;
  padding: 3rem;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.feature-showcase i {
  font-size: 5rem;
  color: var(--accent-pink);
  margin-bottom: 1.5rem;
  display: block;
}

.feature-showcase.teacher-showcase {
  background: linear-gradient(135deg, var(--accent-indigo-light) 0%, #e0e7ff 100%);
}

.feature-showcase.teacher-showcase i {
  color: var(--accent-indigo);
}

.showcase-content h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.showcase-content p {
  color: var(--text-secondary);
  margin: 0;
}

/* =========================
   19. Home Page - Teacher CTA Section
   ========================= */
.teacher-cta-section {
  padding: 6rem 0;
  background: white;
}

.btn-teacher {
  background: linear-gradient(135deg, var(--accent-indigo) 0%, #818cf8 100%);
  border: none;
  color: white;
  font-weight: 600;
}

.btn-teacher:hover {
  background: linear-gradient(135deg, #4f46e5 0%, var(--accent-indigo) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

/* =========================
   19b. Home Page - Referral Section
   ========================= */
.referral-section {
  padding: 4rem 0;
  background: white;
}

.referral-banner {
  background: linear-gradient(135deg, var(--accent-amber-light) 0%, #fef3c7 50%, #fde68a 100%);
  border-radius: 2rem;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.referral-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.referral-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: white;
  color: var(--accent-amber);
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.referral-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.referral-desc {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  max-width: 520px;
}

.referral-rewards {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.referral-learn-more {
  color: var(--accent-amber);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}

.referral-learn-more:hover {
  text-decoration: underline;
}

.referral-reward-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.referral-reward-item i {
  font-size: 1.25rem;
  color: var(--accent-amber);
}

.referral-cta-btn {
  background: white;
  color: var(--text-primary);
  font-weight: 600;
  border: 2px solid rgba(0, 0, 0, 0.06);
  padding: 0.75rem 2rem;
}

.referral-cta-btn:hover {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* =========================
   20. Home Page - Final CTA Section
   ========================= */
.final-cta-section {
  padding: 6rem 0;
  background: var(--light-bg);
}

.cta-card {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  border-radius: 2rem;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  color: white;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-light {
  background: white;
  color: var(--primary-color);
  font-weight: 600;
}

.cta-buttons .btn-light:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.cta-buttons .btn-outline-light {
  border-width: 2px;
  font-weight: 600;
}

/* =========================
   21. Home Page - Responsive
   ========================= */
@media (max-width: 992px) {
  .hero-section {
    padding: 4rem 0;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-illustration {
    margin-top: 3rem;
    height: 300px;
  }

  .main-card {
    padding: 1.5rem;
  }

  .card-text.korean-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-highlights {
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-title {
    font-size: 1.75rem;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  .cta-subtitle {
    font-size: 1rem;
  }

  .hero-illustration {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-highlights {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }
}

/* =========================
   Reviews Section
   ========================= */
.review-summary {
  padding: 1.5rem;
  background-color: var(--light-bg);
  border-radius: 0.5rem;
}

.average-rating {
  text-align: center;
}

.review-item {
  padding: 1rem 0;
}

.review-item:last-child {
  border-bottom: none !important;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input .star-label {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--star-empty-color);
  transition: color 0.2s;
}

.rating-input input[type="radio"]:checked ~ .star-label,
.rating-input .star-label:hover,
.rating-input .star-label:hover ~ .star-label {
  color: var(--star-color);
}

.review-form {
  background-color: var(--light-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

