/* ==========================================================
   SkillVerse Design System & Stylesheet
   Modern Dark Glassmorphism, Micro-interactions, Futuristic AI UI
   ========================================================== */

:root {
  /* Color Palette */
  --bg-primary: #090c15;
  --bg-secondary: #0f1524;
  --bg-card: rgba(18, 25, 42, 0.75);
  --bg-card-hover: rgba(26, 36, 60, 0.85);
  --bg-glass: rgba(15, 21, 36, 0.65);
  --bg-input: #121829;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: #6366f1;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --shadow-cyan-glow: 0 0 25px rgba(6, 182, 212, 0.25);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.dark-theme {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Ambient Glow Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  top: -10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.glow-2 {
  top: 40%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

.glow-3 {
  bottom: 5%;
  left: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* ================= Navbar ================= */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(9, 12, 21, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: var(--transition-smooth);
}

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

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

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: transform var(--transition-fast);
}

.brand-logo:hover .logo-icon {
  transform: rotate(5deg) scale(1.06);
}

.logo-icon.small {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

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

.logo-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

/* Nav Search */
.nav-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.nav-search-wrapper input {
  width: 100%;
  padding: 0.65rem 2.8rem 0.65rem 2.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition-fast);
}

.nav-search-wrapper input:focus {
  border-color: var(--accent-primary);
  background: rgba(18, 24, 41, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-shortcut {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  pointer-events: none;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
}

.action-icon-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.cart-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.6);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-pill:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #090c15;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ================= Hero Section ================= */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 4.5rem 1.5rem 3rem 1.5rem;
  text-align: center;
}

.hero-container {
  max-width: 980px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--accent-cyan); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.7;
}

.hero-metrics {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.2rem 2.2rem;
  gap: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 38px;
  background: var(--border-subtle);
}

.view-switcher-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.switcher-btn:hover {
  color: #fff;
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.switcher-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* ================= Main Content Container ================= */
.content-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.section-wrapper {
  animation: fadeIn 0.4s ease-in-out;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.35rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-light);
}

.filter-pill.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent-primary);
  color: #fff;
}

/* ================= Skills Grid & Cards ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.15);
}

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

.skill-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.skill-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.badge-marketing {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

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

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

.rating-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
}

.skill-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.skill-description {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.skill-features {
  list-style: none;
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-features li {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-features li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.skill-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-subtle);
}

.skill-price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.price-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.price-free {
  color: var(--accent-emerald);
}

.btn-download-direct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-download-direct:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  color: #fff;
  transform: translateY(-1px);
}

.card-action-btns {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

.btn-primary {
  background: var(--accent-primary);
  border: none;
  color: #fff;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

/* ================= Courses Grid & Cards ================= */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.8rem;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.15);
}

.course-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  background: #12182b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 12, 21, 0.1) 0%, rgba(9, 12, 21, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.5);
  transform: scale(0.9);
  transition: transform var(--transition-fast);
}

.course-card:hover .play-circle {
  transform: scale(1.1);
}

.course-duration {
  position: absolute;
  bottom: 0.8rem;
  right: 0.8rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.course-lesson-count {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.course-info {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-level-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.course-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.course-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 1.2rem;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.9rem;
}

.course-instructor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.instructor-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 700;
}

.course-progress-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ================= Modals ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f1526;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  padding: 2rem;
  transform: translateY(20px);
  transition: transform var(--transition-smooth);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-card-large {
  max-width: 960px;
  padding: 0;
  overflow: hidden;
}

.modal-card-sm {
  max-width: 480px;
  padding: 2.2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* Skill Detail inside Modal */
.modal-skill-header {
  margin-bottom: 1.5rem;
}

.modal-skill-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-code-preview {
  background: #090c15;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #cbd5e1;
  max-height: 240px;
  overflow-y: auto;
  margin: 1.2rem 0;
  white-space: pre-wrap;
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

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

.modal-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

/* ================= Player Modal Layout ================= */
.player-modal-layout {
  display: flex;
  flex-direction: column;
}

.video-screen-mock {
  width: 100%;
  height: 380px;
  background: #070911;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.simulated-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  width: 35%;
  height: 100%;
  background: var(--accent-gradient);
}

.player-details {
  padding: 1.75rem;
}

.player-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.player-notes {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.player-resources {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.resources-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.resource-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-decoration: none;
  padding: 0.35rem 0;
}

.resource-download-item:hover {
  text-decoration: underline;
}

/* ================= Cart Drawer ================= */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.7);
  backdrop-filter: blur(4px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #0f1527;
  border-left: 1px solid var(--border-light);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 260;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
}

.cart-header-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.drawer-close-btn:hover {
  color: #fff;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 250px;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cart-item-tag {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  transition: var(--transition-fast);
}

.cart-item-remove:hover {
  color: #ef4444;
}

.cart-empty-message {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.cart-footer {
  padding: 1.4rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 16, 28, 0.8);
}

.coupon-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.coupon-box input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  text-transform: uppercase;
}

.coupon-box input:focus {
  border-color: var(--accent-primary);
}

.coupon-box button {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.coupon-box button:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.coupon-feedback {
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
  min-height: 18px;
}

.coupon-feedback.success {
  color: var(--accent-emerald);
}

.coupon-feedback.error {
  color: #ef4444;
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.discount-line {
  color: var(--accent-emerald);
  font-weight: 600;
}

.grand-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.checkout-btn {
  width: 100%;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  transition: var(--transition-fast);
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.6);
}

/* ================= Success Modal ================= */
.text-center {
  text-align: center;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-emerald);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem auto;
}

.success-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}

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

.download-pack-list {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-file-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: var(--transition-fast);
}

.download-file-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.full-width {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
}

/* ================= Toast Notification ================= */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #151d33;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

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

/* ================= Footer ================= */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 16, 0.9);
  padding: 4rem 1.5rem 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-column h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-column a, .footer-column span {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-column a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ================= Responsive Adjustments ================= */
@media (max-width: 900px) {
  .nav-search-wrapper {
    display: none;
  }
  .hero-metrics {
    gap: 1.2rem;
    padding: 1rem 1.5rem;
  }
  .skills-grid, .courses-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-container {
    padding: 0.75rem 1rem;
  }
  .logo-text, .user-name {
    display: none;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-metrics {
    flex-direction: column;
    gap: 0.8rem;
  }
  .metric-divider {
    width: 60px;
    height: 1px;
  }
  .cart-drawer {
    max-width: 100%;
  }
}
