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

:root {
  /* Colors */
  --bg-dark: #0a0e1a;
  --bg-darker: #05070d;
  --bg-card: rgba(17, 24, 39, 0.6);
  --bg-card-hover: rgba(31, 41, 55, 0.7);
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-gold: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #8b5cf6;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --gradient-purple: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  --gradient-pink: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
  --gradient-green: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --gradient-rainbow: linear-gradient(135deg, #06b6d4 0%, #3b82f6 30%, #8b5cf6 60%, #ec4899 100%);
  --gradient-sunset: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  
  /* Shadows & Glass */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(20px);
  --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.4);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.4);
  --glow-pink: 0 0 20px rgba(236, 72, 153, 0.4);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 1. LAYOUT & RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 36px;
}

.hero-meta {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(10, 14, 26, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid rgba(6, 182, 212, 0.1);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), width var(--transition-normal);
  box-shadow: 20px 0 60px -30px rgba(0, 0, 0, 0.7);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.4) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(236, 72, 153, 0.2) 100%);
  opacity: 0.7;
}

/* Collapsed sidebar state */
body.sidebar-collapsed .sidebar {
  transform: translateX(-260px);
  pointer-events: none;
}

body.sidebar-collapsed .main-content {
  margin-left: 0;
  width: 100%;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
  position: relative;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.4), transparent);
}

.sidebar-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-rainbow);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
  animation: textRainbow 10s ease infinite;
}

.sidebar-header .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.6);
  padding: 0 20px;
  margin-bottom: 10px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  margin: 2px 12px;
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  border-left: 0;
  transition: all var(--transition-normal);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  background: transparent;
}

.nav-item:hover {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
  transform: translateX(2px);
  color: #e0f2fe;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.2) 0%, rgba(139, 92, 246, 0.12) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow:
    0 4px 16px rgba(6, 182, 212, 0.15),
    inset 0 0 0 1px rgba(6, 182, 212, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 3px;
  background: var(--gradient-primary);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.nav-item .nav-icon {
  margin-right: 12px;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 0 transparent);
  transition: filter var(--transition-normal), transform var(--transition-fast);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.6));
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 36px 48px 64px;
  /* Use full width available next to the fixed sidebar */
  max-width: none;
  width: calc(100% - 260px);
  min-height: 100vh;
}

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
}

.hamburger {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* hamburger bar styles */
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin: 4px 0;
}

/* Sidebar toggle button in header */
.sidebar-header {
  position: relative;
}

.sidebar-header .sidebar-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 36px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

/* Floating circular toggle */
.sidebar-toggle.floating {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6,182,212,0.95), rgba(59,130,246,0.95));
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px rgba(6,182,212,0.18);
  font-size: 20px;
  z-index: 260;
  backdrop-filter: blur(6px);
}

/* Hide any sidebar toggle controls on mobile — sidebar always collapsed on small screens */
@media (max-width: 768px) {
  .sidebar-toggle, .sidebar-toggle.floating {
    display: none !important;
  }
  .mobile-header {
    display: flex;
  }
  .main-content {
    padding-top: 72px;
  }
  /* Mobile sidebar behavior */
  .sidebar {
    transform: translateX(-260px);
    transition: transform var(--transition-normal);
    z-index: 320;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }
  /* Overlay styling for mobile */
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 310;
    opacity: 0;
    transition: opacity var(--transition-normal);
  }
  .overlay.show {
    display: block;
    opacity: 1;
  }
}

/* Ensure mobile open state overrides collapsed body rules */
body.sidebar-collapsed .sidebar.open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

/* Make sure nav items are clickable and can scroll */
.sidebar .nav-item {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  touch-action: manipulation;
}

/* Strong global override: ensure any .open state brings the sidebar fully into view */
.sidebar.open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
  z-index: 340 !important;
}

/* When the sidebar is collapsed on desktop, show the floating toggle at bottom-right */
@media (min-width: 769px) {
  body.sidebar-collapsed .sidebar-toggle.floating {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    top: auto !important;
    z-index: 240 !important;
    display: inline-flex !important;
  }
}

/* Hide the header toggle when sidebar is collapsed — rely on floating toggle */
body.sidebar-collapsed .sidebar-header .sidebar-toggle {
  display: none !important;
}

/* 2. HERO / SECTION HEADERS */
.hero-section {
  padding: 56px 48px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 55%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.5) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(6, 182, 212, 0.08) inset;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-rainbow);
  background-size: 300% 100%;
  animation: heroShimmer 6s linear infinite;
  z-index: 2;
}

@keyframes heroShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+') repeat;
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
}

.hero-section > * {
  position: relative;
  z-index: 3;
}

.hero-section h1 {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: var(--gradient-rainbow);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    slideInUp 0.8s ease backwards,
    textRainbow 8s ease infinite;
}

@keyframes textRainbow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-section .hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  animation: slideInUp 0.8s ease 0.2s backwards;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: fadeIn 1s ease 0.4s backwards;
}

.hero-badge {
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  color: var(--text-main);
}

.section {
  display: block;
  scroll-margin-top: 90px;
  margin-bottom: 48px;
}

.section.active {
  display: block;
}

.section-header {
  margin-bottom: 28px;
  position: relative;
  padding-left: 0;
}

.section-header h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  z-index: 2;
  padding: 12px 0 12px 24px;
  letter-spacing: -0.02em;
  display: inline-block;
  border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.06) 60%, transparent 100%);
  box-shadow:
    inset 3px 0 0 0 var(--accent-cyan),
    0 0 30px rgba(6, 182, 212, 0.06);
}

.section-header h2::after {
  content: '';
  display: block;
  margin-top: 10px;
  height: 3px;
  width: 80px;
  border-radius: 3px;
  background: var(--gradient-rainbow);
  background-size: 200% 100%;
  animation: textRainbow 6s ease infinite;
}

.section-number {
  position: absolute;
  top: -38px;
  left: -14px;
  font-size: 5.5rem;
  font-weight: 900;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* 3. CARDS */
.card {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 14px 40px -15px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(6, 182, 212, 0.03) inset;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(6, 182, 212, 0.25) 20%,
    rgba(59, 130, 246, 0.25) 50%,
    rgba(139, 92, 246, 0.2) 80%,
    transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  box-shadow:
    0 20px 60px -15px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(6, 182, 212, 0.04),
    0 0 0 1px rgba(6, 182, 212, 0.08) inset;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Disabled answer toggle visual */
.answer-toggle[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* Disabled textarea styling for clarity */
.textarea-field[disabled], textarea[disabled] {
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  border: 1px dashed rgba(255,255,255,0.04);
  opacity: 0.9;
  cursor: not-allowed;
}

/* Star rating styles */
.star-rating {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.star-rating .star {
  font-size: 30px;
  color: rgba(148, 163, 184, 0.3);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1), text-shadow 0.2s ease, filter 0.2s ease;
  user-select: none;
}

.star-rating .star:hover,
.star-rating .star.hover,
.star-rating .star.active {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fbbf24;
  transform: translateY(-3px) scale(1.1);
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.45));
}

.star-rating .star.disabled {
  cursor: default;
}

.rating-message {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 600;
}

.card:hover {
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  border-color: var(--border-light);
  transform: none;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.12) 100%);
  border-radius: 13px;
  font-size: 1.35rem;
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow:
    0 4px 14px rgba(6, 182, 212, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover .card-icon {
  transform: scale(1.06) rotate(-2deg);
  box-shadow:
    0 8px 22px rgba(6, 182, 212, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.highlight-card {
  border-image: var(--gradient-primary) 1;
  border-width: 1px;
  border-style: solid;
  border-radius: 0; /* Fallback for border-image */
  position: relative;
  background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
              var(--gradient-primary) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(59, 130, 246, 0.05));
  pointer-events: none;
}

.quote-card {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-main);
  padding: 32px 40px;
  border-left: 4px solid var(--accent-gold);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 6rem;
  color: rgba(245, 158, 11, 0.1);
  font-family: serif;
  line-height: 1;
}

/* 4. TABLES */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.1);
}

/* 5. EXAMPLES */
.example-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.example-good, .example-bad {
  position: relative;
  padding-top: 40px;
}

.example-good {
  border-left: 4px solid var(--success);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.example-bad {
  border-left: 4px solid var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.example-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 12px;
  border-radius: 0 0 12px 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

.example-good .example-label {
  background: var(--success);
}

.example-bad .example-label {
  background: var(--danger);
}

pre, code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
  color: #e5e7eb;
  font-size: 0.9rem;
  line-height: 1.5;
}

code:not(pre code) {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: none;
}

/* 6. COMPARISON */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.comparison-before {
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.02) 0%, transparent 100%);
  padding:20px;
}

.comparison-after {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.02) 0%, transparent 100%);
  padding:20px;
}

.comparison-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  border: 1px solid;
}

.comparison-before .comparison-label {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
}

.comparison-after .comparison-label {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.1);
}

/* 7. CHECKLISTS */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist-category {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 10px;
  letter-spacing: 0.05em;
}

.checklist-category:first-child {
  margin-top: 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  padding: 13px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(6, 182, 212, 0.025) 100%);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.checklist-item::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.08), transparent);
  transition: width 0.3s ease;
}

.checklist-item:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-color: rgba(6, 182, 212, 0.25);
  transform: translateX(2px);
}

.checklist-item:hover::before {
  width: 40%;
}

.checklist-item input[type=checkbox] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  margin-right: 14px;
  margin-top: 1px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3);
}

.checklist-item input[type=checkbox]:hover {
  border-color: rgba(6, 182, 212, 0.5);
  transform: scale(1.05);
}

.checklist-item input[type=checkbox]:checked {
  background: var(--gradient-primary);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.checklist-item input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist-item.checked {
  opacity: 0.72;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(6, 182, 212, 0.025) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.checklist-item.checked::before {
  width: 60%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent);
}

.checklist-item.checked span {
  text-decoration: line-through;
  text-decoration-color: rgba(16, 185, 129, 0.5);
  color: rgba(243, 244, 246, 0.7);
}

/* 8. CALLOUT BOXES */
.callout {
  padding: 20px 24px;
  border-radius: 12px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  backdrop-filter: var(--glass-blur);
}

.callout-icon {
  font-size: 1.5rem;
  margin-right: 16px;
  margin-top: -2px;
  flex-shrink: 0;
}

.callout p {
  margin: 0;
  color: var(--text-main);
}

.callout-tip {
  border-left: 4px solid var(--accent-blue);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.callout-warning {
  border-left: 4px solid var(--warning);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.callout-important {
  border-left: 4px solid var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.callout-insight {
  border-left: 4px solid var(--info);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.02) 100%);
}

/* 9. TEMPLATE BLOCKS */
.template-block {
  background:
    linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  border-radius: 16px;
  padding: 34px 30px 24px;
  position: relative;
  margin: 28px 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  white-space: pre-wrap;
  color: #cbd5e1;
  line-height: 1.75;
  box-shadow:
    inset 0 0 0 1px rgba(6, 182, 212, 0.05),
    0 12px 40px -15px rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
}

.template-block:hover {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(6, 182, 212, 0.1),
    0 18px 50px -15px rgba(6, 182, 212, 0.25);
  transform: translateY(-1px);
}

.template-label {
  position: absolute;
  top: -11px;
  left: 22px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 1), rgba(15, 23, 42, 1));
  padding: 3px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(6, 182, 212, 0.18) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #e9d5ff;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.copy-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(6, 182, 212, 0.28) 100%);
  border-color: rgba(167, 139, 250, 0.6);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(139, 92, 246, 0.3),
    0 0 14px rgba(6, 182, 212, 0.18);
}

/* 10. LISTS */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.styled-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.do-list, .dont-list {
  list-style: none;
  padding: 0;
}

.do-list li, .dont-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
}

.do-list li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 1.1rem;
}

.dont-list li::before {
  content: '❌';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 1.1rem;
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* 11. BADGES & TAGS */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  backdrop-filter: blur(4px);
}

.badge-primary {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* 12. SKILL CATEGORIES */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  cursor: default;
}

.skill-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 13. BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 14. PROGRESS BAR */
.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 100px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 100px;
  width: 0%; /* Set via inline style or JS */
  transition: width 1s ease-in-out;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressGlow 2s infinite linear;
}

@keyframes progressGlow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 15. ACTIVITY SECTIONS */
.activity-box {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  padding: 28px 26px 26px;
  margin: 24px 0;
  position: relative;
  backdrop-filter: blur(8px);
  box-shadow:
    0 10px 30px -12px rgba(245, 158, 11, 0.12);
  transition: all var(--transition-normal);
}

.activity-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 18px 18px 0 0;
  background: var(--gradient-gold);
  opacity: 0.5;
}

/* Multi-color variants */
.activity-box:nth-child(4n+1) {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.07) 0%, rgba(0, 0, 0, 0.22) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}
.activity-box:nth-child(4n+1)::before { background: var(--gradient-gold); opacity: 0.6; }
.activity-box:nth-child(4n+1):hover { border-color: rgba(245, 158, 11, 0.55); box-shadow: 0 16px 40px -12px rgba(245, 158, 11, 0.25); }
.activity-box:nth-child(4n+1) .activity-number { background: var(--gradient-gold); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4); }

.activity-box:nth-child(4n+2) {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, rgba(0, 0, 0, 0.22) 100%);
  border-color: rgba(139, 92, 246, 0.32);
}
.activity-box:nth-child(4n+2)::before { background: var(--gradient-purple); opacity: 0.55; }
.activity-box:nth-child(4n+2):hover { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 16px 40px -12px rgba(139, 92, 246, 0.28); }
.activity-box:nth-child(4n+2) .activity-number { background: var(--gradient-purple); color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4); }
.activity-box:nth-child(4n+2) .answer-toggle { color: #c4b5fd; }

.activity-box:nth-child(4n+3) {
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.07) 0%, rgba(0, 0, 0, 0.22) 100%);
  border-color: rgba(236, 72, 153, 0.3);
}
.activity-box:nth-child(4n+3)::before { background: var(--gradient-pink); opacity: 0.5; }
.activity-box:nth-child(4n+3):hover { border-color: rgba(236, 72, 153, 0.55); box-shadow: 0 16px 40px -12px rgba(236, 72, 153, 0.25); }
.activity-box:nth-child(4n+3) .activity-number { background: var(--gradient-pink); color: #fff; box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4); }
.activity-box:nth-child(4n+3) .answer-toggle { color: #f9a8d4; }

.activity-box:nth-child(4n+4) {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.07) 0%, rgba(0, 0, 0, 0.22) 100%);
  border-color: rgba(6, 182, 212, 0.32);
}
.activity-box:nth-child(4n+4)::before { background: var(--gradient-primary); opacity: 0.55; }
.activity-box:nth-child(4n+4):hover { border-color: rgba(6, 182, 212, 0.6); box-shadow: 0 16px 40px -12px rgba(6, 182, 212, 0.28); }
.activity-box:nth-child(4n+4) .activity-number { background: var(--gradient-primary); color: #fff; box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4); }
.activity-box:nth-child(4n+4) .answer-toggle { color: #67e8f9; }

.activity-box:hover {
  transform: translateY(-1px);
}

.activity-number {
  position: absolute;
  top: -18px;
  left: 30px;
  background: var(--gradient-gold);
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.textarea-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
  margin: 18px 0 14px;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.textarea-field:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

.textarea-field:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    0 0 0 4px rgba(6, 182, 212, 0.1),
    0 0 24px rgba(6, 182, 212, 0.08);
}

.answer-toggle {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.answer-toggle:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.answer-toggle::after {
  content: '▼';
  font-size: 0.65rem;
  transition: transform var(--transition-fast);
}

.answer-toggle.open::after {
  transform: rotate(180deg);
}

.answer-content {
  display: none;
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 14px;
  border-top: 0;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.answer-content.show {
  display: block;
  animation: fadeIn var(--transition-normal);
}

/* 16. FOOTER */
.footer {
  text-align: center;
  padding: 60px 20px 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
}

/* 17. ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.2); }
  50% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.6); }
  100% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.2); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 18. RESPONSIVE */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

@media (max-width: 1024px) {
  .main-content {
    padding: 30px 40px;
  }
  .hero-section h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .overlay.show {
    display: block;
    opacity: 1;
  }
  
  .main-content {
    margin-left: 0;
    padding: 80px 20px 40px;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .hero-section {
    padding: 50px 20px;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .comparison-container,
  .example-container {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-number {
    font-size: 4rem;
    top: -20px;
  }
}

/* 19. SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 20. TABLE OF CONTENTS */
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  margin: 32px 0;
}

.toc-card {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 26px 24px;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow:
    0 10px 30px -12px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.toc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toc-card::after {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.toc-card:nth-child(4n+1)::before { background: var(--gradient-gold); }
.toc-card:nth-child(4n+1)::after { background: radial-gradient(circle, rgba(245, 158, 11, 0.16), transparent 70%); }
.toc-card:nth-child(4n+1):hover { border-color: rgba(245, 158, 11, 0.4); }

.toc-card:nth-child(4n+2)::before { background: var(--gradient-purple); }
.toc-card:nth-child(4n+2)::after { background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 70%); }
.toc-card:nth-child(4n+2):hover { border-color: rgba(139, 92, 246, 0.45); }

.toc-card:nth-child(4n+3)::before { background: var(--gradient-pink); }
.toc-card:nth-child(4n+3)::after { background: radial-gradient(circle, rgba(236, 72, 153, 0.16), transparent 70%); }
.toc-card:nth-child(4n+3):hover { border-color: rgba(236, 72, 153, 0.4); }

.toc-card:nth-child(4n+4)::before { background: var(--gradient-primary); }
.toc-card:nth-child(4n+4)::after { background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%); }
.toc-card:nth-child(4n+4):hover { border-color: rgba(6, 182, 212, 0.45); }

.toc-card:hover {
  background:
    linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
  transform: translateY(-4px);
  box-shadow:
    0 22px 50px -15px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(6, 182, 212, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.toc-card:hover::before,
.toc-card:hover::after {
  opacity: 1;
}

.toc-number {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  color: #fff;
  margin-right: 22px;
  line-height: 1;
  box-shadow:
    0 6px 16px rgba(6, 182, 212, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toc-number::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.toc-card:hover .toc-number::before {
  left: 130%;
}

.toc-card:nth-child(4n+1) .toc-number {
  background: var(--gradient-gold);
  color: #111827;
  box-shadow:
    0 6px 16px rgba(245, 158, 11, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.toc-card:nth-child(4n+2) .toc-number {
  background: var(--gradient-purple);
  color: #fff;
  box-shadow:
    0 6px 16px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.toc-card:nth-child(4n+3) .toc-number {
  background: var(--gradient-pink);
  color: #fff;
  box-shadow:
    0 6px 16px rgba(236, 72, 153, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.toc-card:nth-child(4n+4) .toc-number {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow:
    0 6px 16px rgba(6, 182, 212, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.toc-card:hover .toc-number {
  transform: scale(1.08) rotate(-2deg);
}

.toc-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  transition: color 0.25s ease;
}

.toc-card:hover .toc-title {
  color: #f8fafc;
}

/* 21. MISC */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.25) 15%, rgba(6, 182, 212, 0.35) 50%, rgba(245, 158, 11, 0.25) 85%, transparent);
  margin: 50px 0;
  border: none;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 8px;
  background: var(--gradient-rainbow);
  border-radius: 999px;
  opacity: 0.5;
  filter: blur(1px);
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 800px;
  line-height: 1.7;
}

.metric-highlight {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  font-weight: 600;
  margin: 0 4px;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: rgba(10, 14, 26, 0.95);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 90;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}


/* ==================== SUBMIT RESPONSE CARD ==================== */
.submit-response-card {
  margin-top: 40px;
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 24px 60px -15px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(6, 182, 212, 0.08) inset;
}

.submit-response-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
  z-index: 1;
}

.submit-response-card::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Header --- */
.submit-response-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 36px 24px;
  position: relative;
  z-index: 2;
}

.submit-response-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow:
    0 10px 30px rgba(6, 182, 212, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transform: rotate(-4deg);
  transition: transform var(--transition-normal);
}

.submit-response-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.submit-response-card:hover .submit-response-icon {
  transform: rotate(0deg) scale(1.05);
}

.submit-response-title {
  flex: 1;
}

.submit-response-title h3 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 6px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.submit-response-title p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Body --- */
.submit-response-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 0 36px 36px;
  position: relative;
  z-index: 2;
}

.submit-response-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --- Form Group & Input Wrapper --- */
.form-group {
  width: 100%;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(148, 163, 184, 0.7);
  pointer-events: none;
  transition: color var(--transition-fast);
  z-index: 2;
}

.input-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

/* --- Floating Label Input --- */
.input-field {
  width: 100%;
  height: 56px;
  padding: 16px 16px 16px 48px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

.input-field::placeholder {
  color: transparent;
}

.input-field:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(6, 182, 212, 0.25);
}

.input-field:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 0 4px rgba(6, 182, 212, 0.12),
    0 0 24px rgba(6, 182, 212, 0.15);
}

.input-field:focus + .floating-label,
.input-field:not(:placeholder-shown) + .floating-label,
.cv-raw:focus ~ .floating-label,
.cv-raw:not(:placeholder-shown) ~ .floating-label {
  top: 0;
  left: 12px;
  transform: translateY(-50%) scale(0.85);
  background: linear-gradient(180deg, rgba(30, 41, 59, 1) 0%, rgba(17, 24, 39, 1) 100%);
  color: var(--accent-cyan);
  padding: 0 8px;
}

.input-field:focus ~ .input-icon,
.input-field:not(:placeholder-shown) ~ .input-icon,
.cv-raw:focus ~ .input-icon,
.cv-raw:not(:placeholder-shown) ~ .input-icon {
  color: var(--accent-cyan);
}

.floating-label {
  position: absolute;
  top: 50%;
  left: 48px;
  transform: translateY(-50%);
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.95rem;
  font-weight: 500;
  pointer-events: none;
  transition: all var(--transition-fast);
  background: transparent;
  z-index: 3;
  white-space: nowrap;
  border-radius: 6px;
}

.req {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}

/* --- CTA Section --- */
.submit-response-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

.btn-submit-response {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 42px;
  border-radius: 14px;
  letter-spacing: 0.01em;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
  box-shadow:
    0 10px 30px -5px rgba(6, 182, 212, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.btn-submit-response::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-submit-response:hover::before {
  left: 100%;
}

.btn-submit-response:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px -8px rgba(6, 182, 212, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 40px rgba(59, 130, 246, 0.25);
}

.btn-submit-response:active {
  transform: translateY(0);
}

.btn-submit-response:disabled {
  opacity: 0.8;
  cursor: progress;
  transform: none;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2.2;
}

.btn-label {
  position: relative;
  z-index: 1;
}

.submit-hint {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.submit-hint::before {
  content: '✉️';
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- Success State --- */
.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  box-shadow:
    0 10px 30px -5px rgba(16, 185, 129, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset !important;
  cursor: default !important;
}

.btn-success::before {
  display: none !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .submit-response-header {
    padding: 28px 24px 20px;
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .submit-response-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .submit-response-icon svg {
    width: 26px;
    height: 26px;
  }

  .submit-response-title h3 {
    font-size: 1.35rem;
  }

  .submit-response-body {
    padding: 0 24px 28px;
    gap: 24px;
  }

  .submit-response-form {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .btn-submit-response {
    width: 100%;
    justify-content: center;
    padding: 15px 32px;
  }
}

@media (max-width: 480px) {
  .submit-response-card {
    border-radius: 18px;
  }

  .submit-response-header {
    padding: 24px 20px 16px;
  }

  .submit-response-body {
    padding: 0 20px 24px;
  }

  .submit-response-title h3 {
    font-size: 1.2rem;
  }

  .submit-response-title p {
    font-size: 0.85rem;
  }

  .input-field {
    height: 52px;
    font-size: 0.9rem;
  }
}

/* ============================================================
   16. CV BUILDER WORKSPACE & BEFORE/AFTER REVEAL GATE
   ============================================================ */

/* ---- CV Builder Card (purple accent to differentiate workspace) ---- */
.cv-builder-card {
  background:
    linear-gradient(180deg, rgba(88, 28, 135, 0.28) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow:
    0 18px 50px -18px rgba(139, 92, 246, 0.35),
    0 0 0 1px rgba(139, 92, 246, 0.06) inset;
}

.cv-builder-card::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.3) 20%,
    rgba(236, 72, 153, 0.3) 50%,
    rgba(6, 182, 212, 0.25) 80%,
    transparent 100%);
  opacity: 0.7;
}

.cv-builder-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow:
    0 24px 70px -20px rgba(139, 92, 246, 0.45),
    0 0 60px rgba(139, 92, 246, 0.08),
    0 0 0 1px rgba(139, 92, 246, 0.12) inset;
}

.cv-builder-card .card-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(236, 72, 153, 0.14) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    0 4px 14px rgba(139, 92, 246, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.cv-builder-card:hover .card-icon {
  box-shadow:
    0 8px 22px rgba(139, 92, 246, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---- CV Builder Intro ---- */
.cv-builder-intro {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10) 0%, rgba(236, 72, 153, 0.06) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.cv-builder-intro p {
  font-size: 0.97rem;
  color: #e9d5ff;
  line-height: 1.7;
  margin-bottom: 20px;
}

.cv-builder-intro p strong {
  color: #f0abfc;
}

/* ---- CV Progress Tracker ---- */
.cv-progress {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 18px;
}

.cv-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cv-progress-label span:first-child {
  font-weight: 600;
  font-size: 0.9rem;
  color: #c4b5fd;
}

.cv-progress-label span:last-child {
  font-weight: 800;
  font-size: 0.95rem;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #a78bfa;
}

.cv-progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cv-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #475569, #64748b);
  border-radius: 100px;
  transition: width 0.45s cubic-bezier(.4, 0, .2, 1), background 0.3s ease;
  position: relative;
}

.cv-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: cvProgressShine 2s infinite linear;
}

@keyframes cvProgressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.cv-progress-hint {
  margin-top: 12px;
  font-size: 0.82rem;
  color: #a78bfa;
  font-weight: 500;
  padding-left: 4px;
  line-height: 1.5;
}

/* ---- CV Builder Field Grid ---- */
.cv-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
}

.cv-field {
  display: flex;
  flex-direction: column;
}

.cv-field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: #ddd6fe;
  margin-bottom: 8px;
  padding-left: 2px;
}

/* ---- CV Raw Input (name field with floating label) ---- */
input.cv-raw {
  width: 100%;
  height: 56px;
  padding: 16px 16px 16px 48px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

input.cv-raw::placeholder {
  color: transparent;
}

input.cv-raw:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(139, 92, 246, 0.3);
}

input.cv-raw:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent-purple);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.14),
    0 0 24px rgba(139, 92, 246, 0.18);
}

/* ---- CV Raw Textarea Variants ---- */
textarea.cv-raw {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.6;
  resize: vertical;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

textarea.cv-raw::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

textarea.cv-raw:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(139, 92, 246, 0.28);
}

textarea.cv-raw:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent-purple);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.13),
    0 0 24px rgba(139, 92, 246, 0.16);
}

textarea.cv-raw.cv-small { min-height: 82px; }
textarea.cv-raw.cv-medium { min-height: 130px; }

/* ---- CV Input Wrapper (name field) ---- */
.cv-input-wrapper {
  position: relative;
}

/* ---- CV Builder CTA Button ---- */
.cv-builder-cta {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.btn-cv-unlock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px 36px;
  border-radius: 14px;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    opacity var(--transition-fast),
    filter var(--transition-fast);
}

.btn-cv-unlock::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-cv-unlock:hover::before {
  left: 100%;
}

.btn-cv-unlock:not(:disabled):hover {
  transform: translateY(-2px);
}

.btn-cv-unlock:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.3);
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
  box-shadow: 0 4px 14px rgba(71, 85, 105, 0.25) !important;
}

.btn-cv-unlock:disabled::before {
  display: none;
}

.btn-cv-unlock .btn-icon {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
}

/* ============================================================
   17. BEFORE / AFTER REVEAL GATE
   ============================================================ */

.cv-reveal-gate {
  position: relative;
}

.cv-gate-locked {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(139, 92, 246, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom, rgba(236, 72, 153, 0.15) 0%, transparent 55%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.96) 100%);
  border: 1px dashed rgba(139, 92, 246, 0.45);
  backdrop-filter: blur(14px);
  box-shadow:
    0 20px 60px -15px rgba(139, 92, 246, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 5;
  transition:
    opacity 0.55s cubic-bezier(.4, 0, .2, 1),
    transform 0.55s cubic-bezier(.4, 0, .2, 1),
    visibility 0.55s step-end;
}

.cv-gate-card {
  max-width: 560px;
  padding: 40px 38px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.cv-gate-icon {
  font-size: 3.4rem;
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(236, 72, 153, 0.18) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  border-radius: 24px;
  box-shadow:
    0 10px 35px rgba(139, 92, 246, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: cvLockPulse 2.8s ease-in-out infinite;
}

@keyframes cvLockPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 35px rgba(139, 92, 246, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
  50% { transform: scale(1.05); box-shadow: 0 14px 48px rgba(139, 92, 246, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
}

.cv-gate-card h4 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #a78bfa;
}

.cv-gate-card p {
  color: #c4b5fd;
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.cv-gate-hint {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(239, 68, 68, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Blurred dim backdrop of the content behind the gate ---- */
.cv-gate-content {
  position: relative;
  filter: blur(12px) grayscale(0.4);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  transform: translateY(6px);
  transition:
    filter 0.7s cubic-bezier(.4, 0, .2, 1),
    opacity 0.7s cubic-bezier(.4, 0, .2, 1),
    transform 0.7s cubic-bezier(.4, 0, .2, 1),
    pointer-events 0.7s step-end,
    user-select 0.7s step-end;
}

/* ---- Unlocked State ---- */
.cv-gate-unlocked .cv-gate-locked {
  opacity: 0;
  transform: scale(0.96) translateY(-10px);
  visibility: hidden;
  pointer-events: none;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  transition:
    opacity 0.5s cubic-bezier(.4, 0, .2, 1),
    transform 0.5s cubic-bezier(.4, 0, .2, 1),
    visibility 0.5s step-end,
    height 0.01s linear 0.5s,
    min-height 0.01s linear 0.5s,
    margin 0.01s linear 0.5s,
    padding 0.01s linear 0.5s,
    border 0.01s linear 0.5s;
}

.cv-gate-unlocked .cv-gate-content {
  filter: blur(0) grayscale(0);
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
  transform: translateY(0);
  transition:
    filter 0.7s cubic-bezier(.4, 0, .2, 1) 0.1s,
    opacity 0.7s cubic-bezier(.4, 0, .2, 1) 0.1s,
    transform 0.7s cubic-bezier(.4, 0, .2, 1) 0.1s;
}

/* ---- Template Block Variants (Before / After) ---- */
.bad-template {
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(15, 23, 42, 0.55) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

.bad-template:hover {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(239, 68, 68, 0.1),
    0 18px 50px -15px rgba(239, 68, 68, 0.25);
}

.good-template {
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.09) 0%, rgba(15, 23, 42, 0.55) 100%);
  border-color: rgba(16, 185, 129, 0.32);
}

.good-template:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(16, 185, 129, 0.12),
    0 18px 50px -15px rgba(16, 185, 129, 0.3);
}

/* ============================================================
   18. CV BUILDER — RESPONSIVE STYLES
   ============================================================ */

@media (max-width: 900px) {
  .cv-builder-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .cv-builder-card {
    padding: 22px 18px;
  }

  .cv-builder-intro {
    padding: 18px 18px;
    margin-bottom: 22px;
  }

  .cv-builder-intro p {
    font-size: 0.9rem;
  }

  .cv-progress {
    padding: 14px 14px;
  }

  .cv-gate-card {
    padding: 32px 22px;
  }

  .cv-gate-icon {
    font-size: 2.8rem;
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .cv-gate-card h4 {
    font-size: 1.25rem;
  }

  .cv-gate-card p {
    font-size: 0.9rem;
  }

  .btn-cv-unlock {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  textarea.cv-raw.cv-medium {
    min-height: 110px;
  }

  input.cv-raw {
    height: 52px;
  }
}

@media (max-width: 480px) {
  .cv-gate-card {
    padding: 28px 18px;
  }

  .cv-gate-hint {
    font-size: 0.78rem;
    padding: 8px 14px;
  }

  .cv-field label {
    font-size: 0.82rem;
  }

  textarea.cv-raw {
    font-size: 0.88rem;
    padding: 12px 14px;
  }

  .cv-builder-intro {
    padding: 16px 14px;
  }
}

/* ============================================================
   19. CV BUILDER — BUTTON GROUP, MODAL & PREVIEW STYLING
   ============================================================ */

.cv-builder-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.cv-builder-buttons .btn {
  flex: 1;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.cv-builder-buttons .btn-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
}

.btn-cv-preview {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.14) 100%);
  border: 1.5px solid rgba(6, 182, 212, 0.3) !important;
  color: #a5f3fc;
}

.btn-cv-preview:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28) 0%, rgba(59, 130, 246, 0.22) 100%);
  border-color: rgba(6, 182, 212, 0.55) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.2);
}

.btn-cv-download {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(236, 72, 153, 0.14) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.3) !important;
  color: #ddd6fe;
}

.btn-cv-download:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28) 0%, rgba(236, 72, 153, 0.22) 100%);
  border-color: rgba(139, 92, 246, 0.55) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.2);
}

.cv-builder-buttons .btn-cv-unlock {
  flex: 1.3;
  min-width: 240px;
}

/* ---- CV Preview Modal Overlay ---- */
.cv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(.4, 0, .2, 1),
    visibility 0.35s step-end;
}

.cv-modal-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.35s cubic-bezier(.4, 0, .2, 1),
    visibility 0.01s step-start;
}

.cv-modal {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top left, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(6, 182, 212, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
}

.cv-modal-open .cv-modal {
  transform: translateY(0) scale(1);
}

.cv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, transparent 100%);
  flex-shrink: 0;
}

.cv-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-cyan);
}

.cv-modal-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.18) 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 12px;
  font-size: 1.25rem;
}

.cv-modal-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cv-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: rotate(90deg);
}

.cv-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 12px;
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 32px);
}

.cv-modal-body::-webkit-scrollbar {
  width: 10px;
}

.cv-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.cv-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.4));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.cv-modal-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 28px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
  flex-shrink: 0;
}

.cv-modal-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.cv-modal-footer .btn-icon {
  font-size: 1rem;
}

/* ---- CV Preview Output (formatted inside modal) ---- */
.cv-preview-output {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 32px 36px;
  color: #e2e8f0;
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
}

.cv-preview-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(6, 182, 212, 0.35);
  text-align: left;
}

.cv-preview-section {
  margin-bottom: 22px;
}

.cv-preview-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  font-family: var(--font-sans);
}

.cv-preview-value {
  font-size: 0.98rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.cv-preview-empty {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
  font-style: italic;
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

.cv-preview-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  font-family: var(--font-sans);
  font-style: italic;
}

/* ---- CV Preview / Download Modal Responsive ---- */
@media (max-width: 768px) {
  .cv-builder-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cv-builder-buttons .btn,
  .cv-builder-buttons .btn-cv-unlock {
    flex: unset;
    width: 100%;
    min-width: unset;
  }

  .cv-modal {
    max-height: 95vh;
    border-radius: 18px;
  }

  .cv-modal-header {
    padding: 16px 18px;
  }

  .cv-modal-header h3 {
    font-size: 1.05rem;
  }

  .cv-modal-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    border-radius: 10px;
  }

  .cv-modal-body {
    padding: 18px 18px 6px;
  }

  .cv-preview-output {
    padding: 20px 18px;
  }

  .cv-preview-name {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  .cv-modal-footer {
    padding: 14px 18px 18px;
  }

  .cv-modal-footer .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .cv-preview-label {
    font-size: 0.88rem;
  }

  .cv-preview-value {
    font-size: 0.88rem;
  }

  .cv-modal-footer .btn {
    flex: 1 1 100%;
  }
}
