/* SkillPilot - Dark theme with amber accents */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: #15151f;
  --text-primary: #f5f5f7;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --success: #10b981;
  --error: #ef4444;
  --border: #2a2a35;
  --font-display: 'Space Mono', monospace;
  --font-body: 'General Sans', -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Navigation */
.nav, .dash-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--bg-primary);
  background: var(--accent);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-user {
  display: flex;
  gap: 16px;
  align-items: center;
}

#user-name {
  color: var(--text-secondary);
}

.plan-badge {
  font-family: var(--font-display);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.pro {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 80px 40px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.highlight {
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
}

.cta-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* Demo Card */
.hero-demo {
  max-width: 600px;
  margin: 0 auto;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.demo-header {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-tertiary);
}

.demo-dot:first-child { background: #ff5f57; }
.demo-dot:nth-child(2) { background: #febc2e; }
.demo-dot:nth-child(3) { background: #28c840; }

.demo-content {
  padding: 24px;
}

.demo-email {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.demo-label {
  color: var(--text-muted);
}

.demo-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.flow-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 50%;
}

.flow-text {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.flow-arrow {
  width: 30px;
  height: 2px;
  background: var(--border);
  position: relative;
}

.flow-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--border);
}

/* Features Section */
.features {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.features h2, .pricing h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Pricing Section */
.pricing {
  padding: 80px 40px;
  background: var(--bg-secondary);
}

.pricing-cards {
  display: flex;
  justify-content: center;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  min-width: 280px;
  flex: 1;
  max-width: 360px;
  transition: all var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  position: relative;
}

.pricing-badge {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.pricing-featured .pricing-badge {
  color: var(--accent);
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 24px;
}

.pricing-amount span {
  font-size: 16px;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Footer */
.footer {
  padding: 60px 40px;
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-lg {
  max-width: 700px;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* Auth Forms */
.auth-form h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Dashboard */
.dash-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.dash-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dash-sub {
  color: var(--text-secondary);
  font-size: 14px;
}

.dash-sub code {
  font-family: var(--font-display);
  background: var(--accent-glow);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.upgrade-note {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.tab {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.list-item:hover {
  border-color: var(--border);
  background: var(--bg-secondary);
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.list-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.list-item-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.status-badge {
  font-family: var(--font-display);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.processed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-badge.pending {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Pattern Card */
.pattern-count {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 12px;
}

.pattern-questions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pattern-questions li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.pattern-questions li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
}

.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.module-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.module-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.module-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.module-card-topic {
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Module Viewer */
#module-viewer h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.module-summary {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.module-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.module-body h1, .module-body h2, .module-body h3 {
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.module-body h2 { font-size: 20px; }
.module-body h3 { font-size: 16px; }

.module-body p {
  margin-bottom: 16px;
}

.module-body ul, .module-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.module-body li {
  margin-bottom: 8px;
}

.module-body code {
  font-family: var(--font-display);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.module-keypoints {
  margin-top: 24px;
  padding: 20px;
  background: var(--accent-glow);
  border-radius: var(--radius);
}

.module-keypoints h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.module-keypoints ul {
  list-style: none;
}

.module-keypoints li {
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.module-keypoints li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px !important;
  color: var(--text-muted) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .nav, .dash-nav {
    padding: 16px 20px;
  }

  .hero {
    padding: 40px 20px 60px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .features, .pricing {
    padding: 60px 20px;
  }

  .dash-content {
    padding: 20px;
  }

  .modal-content {
    padding: 24px;
  }

  .flow-arrow {
    display: none;
  }

  .demo-flow {
    flex-direction: column;
    gap: 24px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page {
  animation: fadeIn 0.3s ease;
}
