:root {
  --primary: #1D4ED8;
  --primary-light: #3B82F6;
  --primary-dark: #1E40AF;
  --teal: #0D9488;
  --teal-light: #14B8A6;
  --bg-dark: #0F172A;
  --bg-card: #1E293B;
  --bg-code: #0D1117;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --border: #334155;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  background-image: 
    radial-gradient(ellipse at top left, rgba(29, 78, 216, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(13, 148, 136, 0.1) 0%, transparent 50%);
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.reset-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Hedgehog */
.hedgehog-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hedgehog-mascot {
  font-size: 1.5rem;
}

.hedgehog-mascot.bounce {
  animation: bounce 0.5s ease infinite;
}

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

.hedgehog-speech {
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar */
.sidebar-wrapper {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.5);
}

.sidebar {
  position: sticky;
  top: 80px;
  padding: 1.5rem;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-item.current {
  background: var(--primary);
  color: white;
}

.sidebar-item.completed {
  color: var(--success);
}

.sidebar-step-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}

.sidebar-item.completed .sidebar-step-num {
  background: var(--success);
  color: white;
}

.sidebar-item.current .sidebar-step-num {
  background: white;
  color: var(--primary);
}

.sidebar-help {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sidebar-help h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sidebar-help a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.sidebar-help a:hover {
  color: var(--primary-light);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-x: hidden;
}

/* Progress Section */
.progress-section {
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-weight: 600;
}

.progress-percent {
  color: var(--teal-light);
  font-weight: 500;
}

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

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

.milestones {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.milestone.completed {
  color: var(--success);
}

.milestone-dot {
  width: 8px;
  height: 8px;
  background: var(--border);
  border-radius: 50%;
}

.milestone.completed .milestone-dot {
  background: var(--success);
}

/* Framework Selector */
.framework-selector {
  margin-bottom: 2rem;
}

.selector-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.framework-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.framework-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.framework-pill:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}

.framework-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.framework-icon {
  font-size: 1rem;
}

/* Step Cards */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.step-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(29, 78, 216, 0.15);
}

.step-card.completed {
  border-color: var(--success);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-badge {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.step-badge.done {
  background: var(--success);
}

.step-title-area {
  flex: 1;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.step-icon {
  font-size: 1.5rem;
}

.time-estimate {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

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

/* Code Block */
.code-section {
  margin-bottom: 1.5rem;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.code-language {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.copy-button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-button:hover {
  background: var(--primary-light);
}

.copy-button.copied {
  background: var(--success);
}

.code-content {
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Tasks */
.tasks-section {
  margin-bottom: 1rem;
}

.tasks-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-dark);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.task-item:hover {
  background: rgba(15, 23, 42, 0.8);
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
  font-size: 0.75rem;
  animation: checkmark 0.3s ease;
}

@keyframes checkmark {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.task-label {
  flex: 1;
  font-size: 0.9rem;
}

.task-item.completed .task-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.875rem;
}

/* Callouts */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.callout-icon {
  flex-shrink: 0;
}

.callout-tip {
  background: rgba(29, 78, 216, 0.15);
  border: 1px solid rgba(29, 78, 216, 0.3);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.callout-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.callout-fun {
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.3);
}

/* Completion Banner */
.completion-banner {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  animation: glow 2s ease infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 30px rgba(29, 78, 216, 0.3); }
  to { box-shadow: 0 0 50px rgba(13, 148, 136, 0.4); }
}

.completion-banner h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.completion-banner p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.share-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s;
}

.share-button:hover {
  transform: scale(1.05);
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.nav-button {
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-button:hover {
  border-color: var(--primary);
  background: rgba(29, 78, 216, 0.1);
}

.nav-button.next {
  background: var(--primary);
  border-color: var(--primary);
}

.nav-button.next:hover {
  background: var(--primary-light);
}

/* Footer */
.app-footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-divider {
  color: var(--border);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .sidebar-wrapper {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 200;
    transition: left 0.3s ease;
    background: var(--bg-dark);
  }
  
  .sidebar-wrapper.open {
    left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hedgehog-speech {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-title {
    font-size: 1.25rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .framework-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .framework-pill {
    justify-content: center;
    padding: 0.5rem;
  }
  
  .framework-pill span:last-child {
    display: none;
  }
  
  .step-card {
    padding: 1rem;
  }
  
  .milestones {
    font-size: 0.65rem;
  }
  
  .navigation-buttons {
    flex-direction: column;
  }
  
  .code-content {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 0.75rem 1rem;
  }
  
  .framework-pills {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .step-header {
    flex-direction: column;
  }
  
  .step-badge {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}