:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --fg-primary: #f4f4f5;
  --fg-secondary: #a1a1aa;
  --fg-muted: #52525b;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --success: #10b981;
  --danger: #ef4444;
  --border: #27272a;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--fg-primary);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--fg-muted);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--fg-secondary);
}

/* Background Effects */
.bg-grid {
  background-image: 
    linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  background: var(--accent);
  top: -200px;
  right: -200px;
}

.bg-glow-2 {
  background: #3b82f6;
  bottom: -200px;
  left: -200px;
}

/* Glass Effect */
.glass {
  background: rgba(26, 26, 36, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--fg-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--fg-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Input */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--fg-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}
.input::placeholder {
  color: var(--fg-muted);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-collapsed {
  transform: translateX(-100%);
}

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* Menu Item */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg-primary);
}
.menu-item.active {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
}
.badge-primary {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}
.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Page Transitions */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}
.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Video Player */
.video-player {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

/* Roadmap */
.roadmap-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--success));
}

.roadmap-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Stagger Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.5s ease forwards;
}

@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Quiz Styles */
.quiz-option {
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quiz-option:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.05);
}
.quiz-option.selected {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}
.quiz-option.correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}
.quiz-option.wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Certificate */
.certificate {
  background: linear-gradient(135deg, #1a1a24 0%, #0a0a0f 100%);
  border: 2px solid var(--accent);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.certificate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f59e0b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Notes */
.note-card {
  background: rgba(245, 158, 11, 0.05);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Drag Handle */
.drag-handle {
  cursor: grab;
  color: var(--fg-muted);
}
.drag-handle:hover {
  color: var(--fg-secondary);
}

/* Tab */
.tab {
  padding: 0.75rem 1.5rem;
  color: var(--fg-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab:hover {
  color: var(--fg-primary);
}
.tab.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}