/* andreroriz.com — Design System Global */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=DM+Sans:wght@300;400;500;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --azul: #1a4fd6;
  --azul-escuro: #0f2d6b;
  --verde: #10b981;
  --roxo: #7c3aed;
  --laranja: #f59e0b;
  --vermelho: #dc2626;
  --cinza-escuro: #111827;
  --cinza-medio: #374151;
  --cinza-claro: #f3f6fd;
  --borda: #e2e8f0;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.14);
  --font-title: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cinza-escuro);
  background: #fff;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  line-height: 1.25;
}

a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--azul-escuro); }

.btn-primary {
  background: var(--azul);
  border-color: var(--azul);
}
.btn-primary:hover {
  background: var(--azul-escuro);
  border-color: var(--azul-escuro);
}
.btn-success {
  background: var(--verde);
  border-color: var(--verde);
}

.badge-basico        { background: #dcfce7; color: #059669; }
.badge-intermediario { background: #dbeafe; color: #2563eb; }
.badge-avancado      { background: #faf5ff; color: #7c3aed; }
.badge-expert        { background: #fff7ed; color: #ea580c; }

.nivel-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.course-card {
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.course-card .cover {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--azul-escuro), var(--azul));
  object-fit: cover;
  width: 100%;
}
.course-card .body { padding: 1rem; flex: 1; }

.stars { color: #f59e0b; }

.hero-section {
  background: linear-gradient(135deg, var(--azul-escuro) 0%, #1a3a8a 50%, var(--azul) 100%);
  color: #fff;
  padding: 4rem 0;
}

.site-footer {
  background: var(--cinza-escuro);
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
}

[data-theme="dark"] {
  --cinza-escuro: #f3f4f6;
  --cinza-claro: #111827;
}
[data-theme="dark"] body {
  background: #0b1220;
  color: #e5e7eb;
}

code, pre {
  font-family: var(--font-mono);
}

/* Área do aluno */
.aluno-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  min-height: calc(100vh - 120px);
}
.aluno-sidebar {
  background: var(--cinza-claro);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 1rem;
}
.aluno-sidebar .nav-link {
  color: var(--cinza-medio);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}
.aluno-sidebar .nav-link:hover,
.aluno-sidebar .nav-link.active {
  background: #fff;
  color: var(--azul);
  box-shadow: var(--shadow);
}
.stat-card {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--azul-escuro);
}
.progress-course {
  height: 8px;
  border-radius: 999px;
  background: var(--borda);
}
.progress-course .bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--azul), var(--verde));
  transition: width 0.3s;
}

/* Player de curso — 3 colunas */
.course-player {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 0;
  min-height: calc(100vh - 72px);
  background: #fff;
}
.course-player .player-sidebar {
  border-right: 1px solid var(--borda);
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  background: var(--cinza-claro);
}
.course-player .player-main {
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  padding: 1.5rem;
}
.course-player .player-notes {
  border-left: 1px solid var(--borda);
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  padding: 1rem;
  background: #fafbfc;
}
.chapter-list .chapter-item {
  display: block;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--borda);
  color: inherit;
  font-size: 0.9rem;
}
.chapter-list .chapter-item:hover { background: #fff; }
.chapter-list .chapter-item.active {
  background: #fff;
  border-left: 3px solid var(--azul);
  font-weight: 600;
}
.chapter-list .chapter-item.done::before {
  content: '✓ ';
  color: var(--verde);
}
.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
}
.chat-bubble.aluno { align-self: flex-end; background: var(--azul); color: #fff; }
.chat-bubble.ia,
.chat-bubble.admin { align-self: flex-start; background: var(--cinza-claro); }

@media (max-width: 992px) {
  .aluno-layout { grid-template-columns: 1fr; }
  .aluno-sidebar { position: static; }
  .course-player { grid-template-columns: 1fr; }
  .course-player .player-sidebar,
  .course-player .player-notes { max-height: none; }
}
