@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(1200px 700px at 10% 0%, #4c1d95, transparent 60%),
              radial-gradient(900px 500px at 90% 20%, #991b1b, transparent 60%),
              #0b0d12;
  color: #f3f4f6;
}

/* ===== LAYOUT ===== */
.container {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  background: rgba(0,0,0,.45);
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
 background: linear-gradient(135deg, #450a0a, #991b1b);
}

.nav a {
  display: block;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 10px;
  color: #cbd5f5;
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}

/* ===== MAIN ===== */
.main {
  flex: 1;
  padding: 24px 32px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  font-size: 14px;
  opacity: .85;
}

/* ===== CARDS ===== */
.card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.h1 { font-size: 26px; font-weight: 800; }
.h2 { font-size: 18px; font-weight: 700; }

.p {
  opacity: .75;
  margin-top: 6px;
}

/* ===== GRID (geral) ===== */
.grid {
  display: grid;
  gap: 16px;
}

/* usado em outras telas */
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* mantém para telas/admin que usam grid-2 */
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== PROGRESS ===== */
.progress {
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}
.progress div {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #7c3aed);
}

/* ===== BUTTONS (gerais) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.btn.red {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

/* ===== COURSE PAGE ===== */
.course-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

@media (max-width: 980px){
  .course-layout{ grid-template-columns: 1fr; }
}

/* ===== VIDEO ===== */
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.30);
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

/* ===== BADGES ===== */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color:#e5e7eb;
}
.badge.ok{
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.25);
  color: #bbf7d0;
}
.badge.lock{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.22);
  color:#fecaca;
}

/* ===== FIX SELECT (dropdown legível) ===== */
select{
  background: rgba(255,255,255,.10) !important;
  color: #f3f4f6 !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  outline: none !important;
}
option{
  background: #0b0d12 !important;
  color: #f3f4f6 !important;
}
option:checked,
option:hover{
  background: rgba(255,255,255,.10) !important;
}

/* ===== BOTÕES PREMIUM NA AULA ===== */
.lesson-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:24px;
  flex-wrap:wrap;
}

.lesson-footer a,
.lesson-footer button{
  min-height:48px;
  padding:0 22px;
  border-radius:14px;
  font-weight:700;
  font-size:15px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  border:none;
  transition:all .25s ease;
  text-decoration:none;
  white-space:nowrap;
}

.btn-prev{
  background:rgba(255,255,255,0.05);
  color:#cbd5f5;
  border:1px solid rgba(255,255,255,0.08);
}
.btn-prev:hover{
  background:rgba(255,255,255,0.10);
  transform:translateX(-2px);
}

.btn-complete{
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#041b0d;
  box-shadow:0 10px 30px rgba(34,197,94,.35);
  border: 1px solid rgba(255,255,255,.06);
}
.btn-complete:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:0 16px 40px rgba(34,197,94,.45);
}

.btn-next{
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  color:#fff;
  box-shadow:0 12px 35px rgba(124,58,237,.45);
  border: 1px solid rgba(255,255,255,.06);
}
.btn-next:hover{
  transform:translateX(2px) scale(1.03);
  box-shadow:0 18px 45px rgba(236,72,153,.55);
}

.disabled{
  opacity:.35;
  pointer-events:none;
  filter:grayscale(1);
}

/* =========================================================
   MEUS CURSOS — GRID NETFLIX (EXCLUSIVO)
   (seu courses.php já usa <div class="grid-courses">)
========================================================= */
.grid-courses{
  display:grid;
  gap:16px;
  align-items:stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1400px){
  .grid-courses{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px){
  .grid-courses{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .grid-courses{ grid-template-columns: 1fr; }
}

/* ===== Courses (cards) ===== */
.course-card{
  overflow:hidden;
  width:100%;
  display:flex;
  flex-direction:column;
  height:100%;
}

.course-cover{
  position:relative;
  width:100%;
  height:140px;
  border-radius:14px;
  margin-bottom:12px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.10);
}

.course-cover.has-cover{
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.course-cover-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.60));
  border-radius:14px;
}

.course-cover-title{
  position:absolute;
  left:14px;
  bottom:12px;
  right:14px;
  font-weight:800;
  font-size:16px;
  color:#fff;
  text-shadow: 0 6px 18px rgba(0,0,0,.45);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.course-body{ padding: 0 4px; flex:1; }

.course-title{
  font-weight:900;
  font-size:18px;
  margin-bottom:6px;
}

.course-meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  opacity:.95;
}

.course-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-start;
}

/* Responsivo capa */
@media (max-width: 900px){
  .course-cover{ height:160px; }
}

/* =========================================================
   ACCORDION PREMIUM (MÓDULOS) — mais bonito
========================================================= */
.accordion{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.acc-item{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
}

.acc-head{
  width:100%;
  border:0;
  outline:0;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;

  padding:14px 14px;
  background: rgba(255,255,255,.03);

  transition: background .2s ease;
}

.acc-head:hover{
  background: rgba(255,255,255,.06);
}

.acc-head > div:first-child{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.acc-head > div:first-child{
  font-weight:800;
  letter-spacing:.2px;
}

.acc-head small{
  display:inline-flex;
  align-items:center;
  gap:8px;
  opacity:.75;
  font-size:12px;
}

.acc-head small::before{
  content:"📚";
  opacity:.9;
}

.acc-toggle{
  width:36px;
  height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:18px;
  line-height:1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color:#fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.acc-body{
  display:none;
  padding: 12px 12px 14px 12px;
  background: rgba(0,0,0,.12);
  border-top: 1px solid rgba(255,255,255,.06);
}

.acc-item.open .acc-body{
  display:block;
}

.lesson-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:12px 12px;
  margin-top:10px;

  border-radius:12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);

  color:#e5e7eb;
  text-decoration:none;

  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.lesson-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
}

.lesson-link.active{
  background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(239,68,68,.12));
  border-color: rgba(124,58,237,.35);
}

.lesson-link > div:first-child{
  min-width:0;
}

.lesson-link > div:last-child{
  opacity:.75;
  font-size:14px;
}

@media (max-width: 560px){
  .acc-head{ padding:14px 12px; }
  .acc-toggle{ width:34px; height:34px; border-radius:11px; }
  .lesson-link{ padding:12px 10px; }
}

/* =========================================================
   MENU MOBILE (estilo OrganizaPay) — ÚNICO
   (seu header.php já tem: mobile-menu-btn, mobile-overlay, sidebar#sidebar)
========================================================= */
.mobile-menu-btn{
  display:none;
}

/* Desktop normal: mantém */
.mobile-overlay{ display:none; }

@media (max-width: 860px){
  /* Botão hamburguer fixo (bem profissional) */
  .mobile-menu-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    position:fixed;
    top:16px;
    left:16px;
    z-index:1100;

    width:44px;
    height:44px;
    border-radius:12px;
    border:none;

    background:linear-gradient(135deg,#7c3aed,#ec4899);
    color:#fff;
    font-size:22px;
    cursor:pointer;
    box-shadow:0 10px 30px rgba(124,58,237,.45);
  }

  /* Overlay */
  .mobile-overlay{
    display:block;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,.55);
    z-index:1050;
    opacity:0;
    pointer-events:none;
    transition: opacity .25s ease;
  }
  .mobile-overlay.show{
    opacity:1;
    pointer-events:auto;
  }

  /* Sidebar vira drawer */
  .sidebar{
    position:fixed;
    top:0;
    left:-280px;
    height:100vh;
    width:260px;
    z-index:1080;
    transition:left .25s ease;
    box-shadow:0 20px 60px rgba(0,0,0,.45);
  }
  .sidebar.open{ left:0; }

  /* Espaço para o botão fixo */
  .main{
    padding:86px 16px 18px;
  }
}
