*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #050816;
  color: #f5f5f5;
}

/* HEADER / NAV */

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
}

.logo span {
  color: #facc15;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
}

nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

.btn-login {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #facc15;
  background: transparent;
  color: #facc15;
  cursor: pointer;
  font-size: 0.9rem;
}

/* HOME */

.page-home main {
  min-height: calc(100vh - 80px);
}

.hero {
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 16px;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 12px;
}

.hero-subtitle {
  max-width: 600px;
  font-size: 1rem;
  color: #d1d5db;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: #facc15;
  color: #111827;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #6b7280;
  color: #e5e7eb;
}

.btn-secondary:hover {
  border-color: #9ca3af;
}

/* FOOTER */

footer {
  text-align: center;
  font-size: 0.75rem;
  padding: 12px 8px 20px;
  color: #9ca3af;
}

/* ÁREA DO ALUNO / AULAS */

.page-student main,
.page-lesson main {
  min-height: calc(100vh - 80px);
}

.student-area {
  max-width: 1080px;
  margin: 20px auto 0;
  padding: 0 16px 24px;
}

.student-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.student-user {
  font-size: 0.9rem;
  color: #d1d5db;
}

.student-progress {
  font-size: 0.85rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
}

.student-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 20px;
}

@media (max-width: 800px) {
  .student-grid {
    grid-template-columns: 1fr;
  }
}

.student-tree,
.student-info {
  background: rgba(15,23,42,0.9);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(148,163,184,0.3);
}

.student-tree h3,
.student-info h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1rem;
}

.tree {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
}

.tree-module {
  margin-bottom: 8px;
  font-weight: 600;
}

.tree-module ul {
  list-style: none;
  padding-left: 16px;
  margin: 4px 0 0 0;
}

.tree-module ul li {
  margin-bottom: 4px;
  font-weight: 400;
}

.tree-module a {
  color: #93c5fd;
  text-decoration: none;
}

.tree-module a:hover {
  text-decoration: underline;
}

.tree-disabled {
  color: #6b7280;
}

/* VÍDEO E CONTROLES */

.video-wrapper {
  margin-top: 12px;
  position: relative;
  background: #020617;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.4);
}

.training-video {
  width: 100%;
  display: block;
  max-height: 70vh;
  background: #000;
}

.watermark {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: rgba(248,250,252,0.9);
  background: rgba(15,23,42,0.4);
  border-radius: 999px;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(2px);
  opacity: 0.6;
  transition: top 0.35s ease, left 0.35s ease;
}

.fullscreen-exit-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  background: rgba(15,23,42,0.85);
  color: #f9fafb;
  cursor: pointer;
  display: none;
}

/* INFO DA AULA */

.lesson-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lesson-title {
  font-size: 1rem;
  font-weight: 600;
}

.lesson-meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  font-size: 0.85rem;
  color: #e5e7eb;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.pill:hover {
  background: rgba(15,23,42,0.7);
}

/* AUTENTICAÇÃO (LOGIN, CADASTRO, RESET) */

.page-auth main {
  min-height: calc(100vh - 80px);
}

.auth-card {
  max-width: 480px;
  margin: 30px auto 0;
  padding: 20px 16px 24px;
  background: rgba(15,23,42,0.92);
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.4);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 12px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  font-size: 0.85rem;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-form input {
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.5);
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #020617;
  color: #e5e7eb;
}

.auth-form input:focus {
  outline: none;
  border-color: #facc15;
}

.auth-links {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

.auth-links a {
  color: #93c5fd;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-note {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 8px;
}

.auth-error {
  background: rgba(239,68,68,0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #fecaca;
  margin-bottom: 8px;
}

.auth-success {
  background: rgba(34,197,94,0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #bbf7d0;
  margin-bottom: 8px;
}

.auth-error-list {
  background: rgba(239,68,68,0.12);
  color: #fecaca;
  font-size: 0.8rem;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 10px 0;
}

.auth-error-list li {
  margin-left: 16px;
}

/* RESPONSIVO */

@media (max-width: 600px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
  }
  
}
/* QUANDO O WRAPPER ESTÁ EM FULLSCREEN NATIVO */
.video-wrapper:fullscreen,
.video-wrapper:-webkit-full-screen {
  max-width: 100% !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000 !important;
}

/* Vídeo ocupa toda a área do wrapper em fullscreen */
.video-wrapper:fullscreen .training-video,
.video-wrapper:-webkit-full-screen .training-video {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important; /* troca para 'cover' se quiser sem faixas, mas aí corta imagem */
}

/* Garante que watermark e botão fiquem por cima em fullscreen */
.video-wrapper:fullscreen .watermark,
.video-wrapper:-webkit-full-screen .watermark {
  z-index: 1000 !important;
}

.video-wrapper:fullscreen .fullscreen-exit-btn,
.video-wrapper:-webkit-full-screen .fullscreen-exit-btn {
  z-index: 1001 !important;
}


