/* GenAI Training Plan - Course Website Styles */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #10b981;
  --accent: #f59e0b;
  --bg-dark: #1e1e2e;
  --bg-sidebar: #252536;
  --bg-content: #fafafa;
  --text-dark: #1f2937;
  --text-light: #e5e7eb;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --code-bg: #1e1e2e;
  --pain-bg: #fef2f2;
  --pain-border: #fca5a5;
  --build-bg: #ecfdf5;
  --build-border: #6ee7b7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-content);
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: var(--bg-dark);
  color: var(--text-light);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sidebar-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-section {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-link {
  display: block;
  padding: 0.5rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

.nav-link.phase-link {
  font-weight: 600;
  padding-left: 1.5rem;
}

.nav-link.day-link {
  padding-left: 2.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.nav-link.day-link:hover {
  color: white;
}

/* Main Content */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 2rem;
  margin: -3rem -2rem 3rem -2rem;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

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

.hero-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
}

.hero-stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Day Header */
.day-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  margin: -3rem -2rem 2rem -2rem;
  border-radius: 0 0 1rem 1rem;
}

.day-header .day-number {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.day-header h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.day-header .use-case {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Cards */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pain Point Box */
.pain-box {
  background: var(--pain-bg);
  border: 1px solid var(--pain-border);
  border-left: 4px solid #ef4444;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.pain-box-title {
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pain-box ul {
  margin-left: 1.5rem;
  color: #7f1d1d;
}

.pain-box li {
  margin-bottom: 0.5rem;
}

/* Build Box */
.build-box {
  background: var(--build-bg);
  border: 1px solid var(--build-border);
  border-left: 4px solid var(--secondary);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.build-box-title {
  font-weight: 600;
  color: #059669;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Code Blocks */
pre {
  background: var(--code-bg);
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

code {
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875em;
}

p code, li code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--primary-dark);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f9fafb;
  font-weight: 600;
}

tr:hover {
  background: #f9fafb;
}

/* Hour Schedule */
.hour-schedule {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hour-block {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.hour-time {
  font-weight: 700;
  color: var(--primary);
  min-width: 80px;
}

.hour-activity {
  flex: 1;
}

.hour-activity h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
}

.hour-activity p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Phase Overview Grid */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.phase-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.phase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.phase-card-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 600;
}

.phase-card h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.phase-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.phase-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--primary-dark);
}

.nav-btn.secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.nav-btn.secondary:hover {
  background: #f9fafb;
}

/* Concepts List */
.concepts-list {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.concepts-list h4 {
  margin: 0 0 0.75rem 0;
  color: #0369a1;
  font-size: 0.9rem;
}

.concepts-list ul {
  margin: 0;
  padding-left: 1.25rem;
}

.concepts-list li {
  color: #0c4a6e;
}

/* Challenge Box */
.challenge-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.challenge-box h4 {
  margin: 0 0 0.5rem 0;
  color: #92400e;
}

.challenge-box p {
  margin: 0;
  color: #78350f;
}

/* Review Box */
.review-box {
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.review-box h4 {
  margin: 0 0 0.75rem 0;
  color: #5b21b6;
}

.review-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.review-box li {
  color: #4c1d95;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    width: 280px;
    transition: left 0.3s ease;
    z-index: 100;
  }

  .sidebar-open .sidebar {
    left: 0;
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .sidebar-open .mobile-menu-btn span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .sidebar-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  .sidebar-open .mobile-menu-btn span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .layout {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero {
    padding: 2rem 1rem;
    padding-top: 4rem;
    margin: 0;
    border-radius: 0;
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
  }

  .day-header, .phase-header {
    padding: 1.5rem 1rem;
    padding-top: 4rem;
    margin: 0;
    border-radius: 0;
  }

  .day-header h1, .phase-header h1 {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-stat-value {
    font-size: 2rem;
  }

  .content-wrapper {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Typography for mobile */
  h1 {
    font-size: 1.5rem;
    word-wrap: break-word;
  }

  h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
  }

  li {
    font-size: 0.95rem;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-btn {
    text-align: center;
    justify-content: center;
  }

  .phase-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Tables scroll horizontally on mobile */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Code blocks - critical for mobile */
  pre {
    padding: 0.75rem;
    font-size: 0.7rem;
    border-radius: 0.5rem;
    margin-left: -1rem;
    margin-right: -1rem;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
  }

  code {
    font-size: 0.8rem;
    word-break: break-all;
  }

  p code, li code {
    font-size: 0.85em;
    padding: 0.1rem 0.3rem;
  }

  /* Pain row stacks vertically on mobile */
  .pain-row {
    flex-direction: column;
  }

  .pain-concept {
    min-width: auto;
    border-right: none;
    border-bottom: 1px solid var(--pain-border);
  }

  /* Better touch targets */
  .nav-link {
    padding: 0.75rem 1.5rem;
  }

  /* Cards */
  .card, .pain-box, .build-box, .concepts-list, .challenge-box, .review-box {
    padding: 1rem;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.25rem;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .day-header h1, .phase-header h1 {
    font-size: 1.25rem;
  }

  .content-wrapper {
    padding: 1rem 0.75rem;
  }

  pre {
    font-size: 0.7rem;
  }
}

/* Phase Header */
.phase-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  margin: -3rem -2rem 2rem -2rem;
  border-radius: 0 0 1rem 1rem;
}

.phase-header .phase-number {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.phase-header h1 {
  color: white;
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.phase-header .phase-duration {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

/* Intro Section */
.intro-section {
  margin-bottom: 2rem;
}

.intro-section h2 {
  border-bottom: none;
  margin-top: 0;
  color: var(--primary-dark);
}

/* Pain Table */
.pain-points h2 {
  border-bottom: none;
}

.pain-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pain-row {
  display: flex;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.pain-concept {
  min-width: 160px;
  padding: 1rem;
  background: var(--pain-bg);
  font-weight: 600;
  color: #dc2626;
  border-right: 1px solid var(--pain-border);
}

.pain-problem {
  flex: 1;
  padding: 1rem;
  color: var(--text-dark);
}

/* Day Badge */
.day-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
}

/* Daily Schedule Section */
.daily-schedule h2 {
  border-bottom: none;
}

.daily-schedule .phase-grid {
  margin-top: 1.5rem;
}

.daily-schedule .phase-card h3 {
  margin-top: 0.5rem;
}

/* Project Card */
.project-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
}

.project-card:hover {
  border-color: var(--secondary);
}

.project-card .day-badge {
  background: var(--secondary);
}

/* Checklist */
.success-checklist h2 {
  border-bottom: none;
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--secondary);
  border-radius: 0.25rem;
  background: white;
}

/* Print Styles */
@media print {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }
}
