@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  --brand-400: #38bdf8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --accent-400: #34d399;
  --accent-500: #10b981;
  --dark-900: #0a0a0c;
  --dark-800: #13131a;
  --dark-700: #1c1c27;
  --dark-600: #252533;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--dark-900);
  color: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: white;
  box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: #94a3b8;
}

.btn-ghost:hover {
  color: white;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: white;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background-color: var(--dark-900);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(52, 211, 153, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(167, 139, 250, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: rgba(14, 165, 233, 0.12);
  border-radius: 50%;
  filter: blur(120px);
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--brand-400);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-400);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.15rem;
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #64748b;
}

.hero-trust span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-visual {
  position: relative;
}

.hero-image {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

.hero-image img {
  width: 100%;
  height: auto;
}

.hero-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  right: 20px;
  background: rgba(19, 19, 26, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.25rem;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.progress-fill {
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
  border-radius: 999px;
}

/* Stats */
.stats {
  padding: 4rem 0;
  background: var(--dark-800);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-400), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Section base */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Trilhas grid */
.trilhas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.trilha-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.trilha-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 60px -20px rgba(14, 165, 233, 0.2);
}

.trilha-image {
  height: 180px;
  overflow: hidden;
}

.trilha-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trilha-card:hover .trilha-image img {
  transform: scale(1.05);
}

.trilha-content {
  padding: 1.5rem;
}

.trilha-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.trilha-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trilha-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.trilha-content p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.trilha-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

/* Login / Register */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--dark-900);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(52, 211, 153, 0.1) 0px, transparent 50%);
}

.auth-box {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2.5rem;
}

.auth-box .logo {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-box h1 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-box .subtitle {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-500);
}

.form-group input::placeholder {
  color: #64748b;
}

.form-group select option {
  background: var(--dark-800);
  color: white;
}

.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--accent-400);
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: #f87171;
}

.alert-info {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--brand-400);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--brand-400);
  font-weight: 500;
}

/* Dashboard */
.dashboard {
  padding-top: 96px;
  min-height: 100vh;
  background: var(--dark-900);
}

.dashboard-header {
  background: var(--dark-800);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dashboard-header p {
  color: #94a3b8;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  height: fit-content;
}

.sidebar-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 1rem;
}

.sidebar-trilhas {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-trilhas li {
  margin-bottom: 0.25rem;
}

.sidebar-trilhas a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #94a3b8;
  transition: all 0.2s;
}

.sidebar-trilhas a:hover,
.sidebar-trilhas a.active {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-trilhas .trilha-progress {
  margin-left: auto;
  font-size: 0.75rem;
  color: #64748b;
}

/* Content area */
.content-area {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
}

.trilha-hero {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(52, 211, 153, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trilha-hero h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.trilha-hero p {
  color: #94a3b8;
  max-width: 600px;
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.module-list {
  padding: 1.5rem;
}

.module {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.module-header h4 {
  font-size: 1rem;
  margin: 0;
}

.module-header .module-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  transition: all 0.2s;
}

.video-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.video-item.active {
  background: rgba(14, 165, 233, 0.1);
  color: white;
}

.video-item.played .video-status {
  color: var(--accent-400);
}

.video-status {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-status svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-info {
  flex: 1;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.video-duration {
  font-size: 0.8rem;
  color: #64748b;
}

/* Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.admin-table th {
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.status-badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-400);
}

.status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.status-inactive {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--dark-900);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}

.footer a {
  color: var(--brand-400);
}

/* Locked overlay */
.locked-message {
  text-align: center;
  padding: 4rem 2rem;
}

.locked-message svg {
  width: 64px;
  height: 64px;
  stroke: var(--brand-400);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 1.5rem;
}

.locked-message h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.locked-message p {
  color: #94a3b8;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .trilhas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: 2;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .trilhas-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
