:root {
  --bg: #050508;
  --bg-elevated: #0c0c12;
  --text: #f4f4f8;
  --muted: #9a9ab0;
  --accent: #e50914;
  --accent-soft: #ff4d5a;
  --gold: #c9a227;
  --radius: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: linear-gradient(180deg, rgba(5,5,8,.95), transparent);
  transition: background .3s;
}
.site-header.scrolled { background: rgba(5,5,8,.92); backdrop-filter: blur(12px); }
.logo { font-weight: 700; font-size: 1.35rem; color: var(--accent); text-decoration: none; letter-spacing: .04em; }
.site-header nav { display: flex; gap: 1.25rem; align-items: center; }
.site-header nav a { color: var(--text); text-decoration: none; font-size: .95rem; opacity: .9; }
.site-header nav a:hover { opacity: 1; color: #fff; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #b20710);
  color: #fff;
  box-shadow: 0 8px 32px rgba(229,9,20,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(229,9,20,.45); }
.btn-ghost {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.15);
}
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 8rem 4vw 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(229,9,20,.25), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(15,76,117,.4), transparent),
    linear-gradient(180deg, #0a0a12 0%, var(--bg) 100%);
  animation: heroPulse 12s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  from { opacity: .9; transform: scale(1); }
  to { opacity: 1; transform: scale(1.02); }
}
.hero-content { position: relative; max-width: 720px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--accent-soft); }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.section {
  padding: 5rem 4vw;
  max-width: 1400px;
  margin: 0 auto;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
}
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head a { color: var(--accent-soft); text-decoration: none; }

.rail {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.course-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: transform .25s;
}
.course-card:hover { transform: scale(1.04); }
.course-poster {
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  margin-bottom: .75rem;
}
.muted { color: var(--muted); }

.teacher-grid, .benefits-grid, .testimonial-grid, .pricing-grid, .video-grid {
  display: grid;
  gap: 1.5rem;
}
.teacher-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.benefits-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.benefits-grid div {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
}
.testimonial-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
blockquote {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 0;
  border-left: 3px solid var(--accent);
}
cite { display: block; margin-top: 1rem; color: var(--muted); font-size: .9rem; }

.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.price-card {
  background: var(--bg-elevated);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.price-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(201,162,39,.15);
}
.price { font-size: 2rem; font-weight: 700; color: var(--accent-soft); }
.badge {
  display: inline-block;
  background: rgba(201,162,39,.2);
  color: var(--gold);
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  margin: .5rem 0 1rem;
}

.faq details {
  background: var(--bg-elevated);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: .75rem;
}
.faq summary { cursor: pointer; font-weight: 600; }

.cta-final { text-align: center; }
.cta-final .btn-ghost { margin-left: 1rem; }

.site-footer {
  padding: 3rem 4vw;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.06);
}

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: none;
}

/* App / Feed Netflix */
.page-app { background: var(--bg); padding-top: 5rem; }
.feed-row { margin-bottom: 2.5rem; padding: 0 4vw; }
.feed-row h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.feed-scroller { display: flex; gap: 1rem; overflow-x: auto; }

.player-wrap {
  max-width: 960px;
  margin: 2rem auto;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.player-wrap video { width: 100%; height: 100%; }

.form-card {
  max-width: 420px;
  margin: 6rem auto;
  padding: 2rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}
.form-card input {
  width: 100%;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.3);
  color: var(--text);
  font-family: inherit;
}

@media (max-width: 768px) {
  .site-header nav a:not(.btn-primary):not(.btn-ghost) { display: none; }
  .hero { padding-top: 6rem; }
}

/* ═══════════════════════════════════════════
   Plataforma de vídeo (app logado)
   ═══════════════════════════════════════════ */
.page-platform {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
}

.platform-shell {
  display: flex;
  min-height: 100vh;
}

.platform-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: linear-gradient(180deg, #0a0a10 0%, #08080c 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--text);
}

.sidebar-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b0000);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(229,9,20,.35);
}

.sidebar-logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .03em;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: .35rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem .75rem;
}

.sidebar-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding: .75rem .75rem .35rem;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  color: rgba(244,244,248,.75);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  margin-bottom: 2px;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .85;
}

.sidebar-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.sidebar-link.active {
  background: rgba(229,9,20,.15);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: .75rem;
  padding: .5rem;
  border-radius: 10px;
  transition: background .2s;
}

.sidebar-profile:hover { background: rgba(255,255,255,.05); }

.sidebar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a3a, #1a1a28);
  border: 2px solid rgba(229,9,20,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--accent-soft);
  flex-shrink: 0;
}

.sidebar-profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-profile-info strong {
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-info small {
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .65rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-family: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.sidebar-logout svg { width: 18px; height: 18px; }

.sidebar-logout:hover {
  background: rgba(229,9,20,.12);
  border-color: rgba(229,9,20,.3);
  color: var(--accent-soft);
}

.platform-main {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: rgba(5,5,8,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.topbar-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .35rem;
}

.topbar-eyebrow {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin-bottom: .15rem;
}

.topbar-heading {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.topbar-site-link {
  margin-left: auto;
  font-size: .85rem;
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  transition: color .2s, border-color .2s;
}

.topbar-site-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.platform-content {
  flex: 1;
  padding: 1.5rem 1.75rem 3rem;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 150;
  backdrop-filter: blur(4px);
}

/* Hero & stats */
.platform-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(229,9,20,.12), transparent),
    linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
}

.platform-greeting {
  font-size: .95rem;
  color: var(--muted);
  margin: 0 0 .35rem;
}

.platform-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 .5rem;
}

.platform-hero-lead {
  margin: 0;
  color: var(--muted);
  max-width: 480px;
  font-size: .95rem;
}

.platform-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  min-width: 120px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-soft);
  line-height: 1.2;
}

.stat-label {
  font-size: .75rem;
  color: var(--muted);
}

/* Tabs */
.platform-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.75rem;
  padding: .35rem;
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.platform-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.platform-tab svg { width: 18px; height: 18px; }

.platform-tab:hover { color: #fff; }

.platform-tab.active {
  background: linear-gradient(135deg, var(--accent), #8b0000);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229,9,20,.3);
}

.tab-badge {
  background: rgba(255,255,255,.25);
  font-size: .72rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-weight: 700;
}

.platform-panel { animation: fadeIn .35s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Course grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.platform-course-card {
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.platform-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  border-color: rgba(229,9,20,.25);
}

.platform-course-thumb {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
}

.course-badge {
  position: absolute;
  top: .65rem;
  left: .65rem;
  background: rgba(201,162,39,.9);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.course-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0,0,0,.5);
}

.course-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.platform-course-body { padding: 1rem 1.1rem 1.15rem; }

.platform-course-body h3 {
  margin: 0 0 .4rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.platform-course-meta {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.platform-course-progress {
  margin: .5rem 0 0;
  font-size: .78rem;
  color: var(--accent-soft);
  font-weight: 600;
}

/* Continue list */
.continue-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.continue-card {
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}

.continue-card:hover {
  border-color: rgba(229,9,20,.3);
  transform: translateX(4px);
}

.continue-thumb {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.continue-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(229,9,20,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(229,9,20,.5);
}

.continue-play svg { width: 18px; height: 18px; margin-left: 2px; }

.continue-body { flex: 1; min-width: 0; }

.continue-course {
  margin: 0 0 .25rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
}

.continue-body h3 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.continue-meta {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: var(--muted);
}

.continue-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.continue-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}

.continue-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
}

.continue-pct {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent-soft);
  min-width: 36px;
}

/* Empty state */
.platform-empty {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: 16px;
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(255,255,255,.1);
}

.platform-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .7;
}

.platform-empty h3 { margin: 0 0 .5rem; }

/* Page cards (assinatura, cobrança, etc.) */
.platform-page-card {
  max-width: 900px;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.06);
}

.platform-page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
}

.subscription-details { margin-bottom: 1.5rem; }

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.detail-row span { color: var(--muted); }

.platform-table-wrap { overflow-x: auto; }

.platform-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.platform-table th,
.platform-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.platform-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.status-pill {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,.08);
}

.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

/* Course page */
.course-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  margin-bottom: 1.5rem;
  transition: color .2s;
}

.course-back:hover { color: #fff; }
.course-back svg { width: 18px; height: 18px; }

.course-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.course-header-poster {
  aspect-ratio: 16/10;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.course-teacher {
  font-size: .85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 .5rem;
}

.course-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 1rem;
}

.course-desc {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.course-page-intro {
  margin-bottom: 1.5rem;
}

/* Layout: vídeo à esquerda, aulas à direita */
.course-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
  min-height: calc(100vh - 220px);
}

.course-watch-main {
  position: sticky;
  top: 5.5rem;
}

.course-player-shell {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
}

.course-player-wrap {
  position: relative;
  max-width: none;
  margin: 0;
  border-radius: 0;
  aspect-ratio: 16/9;
  background: #000;
}

/* —— Player estilo YouTube —— */
.yt-player {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}

.yt-player__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}

.yt-player__stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
  pointer-events: none;
}

.yt-player__shield {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.yt-player__watermarks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.yt-watermark {
  position: absolute;
  right: 12px;
  bottom: 52px;
  max-width: 45%;
  padding: .25rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .02em;
  background: rgba(0,0,0,.35);
  border-radius: 4px;
}

.yt-player.is-paused .yt-watermark,
.yt-player.show-controls .yt-watermark {
  bottom: 72px;
}

.yt-player__loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
}

.yt-player__loading[hidden] { display: none !important; }

.yt-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: yt-spin .8s linear infinite;
}

@keyframes yt-spin { to { transform: rotate(360deg); } }

.yt-player__big-play {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.yt-player__big-play[hidden] { display: none !important; }

.yt-player__big-play svg {
  width: 68px;
  height: 68px;
  color: rgba(255,255,255,.92);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
}

.yt-player__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 0 .5rem .35rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.yt-player.show-controls .yt-player__controls,
.yt-player.is-paused .yt-player__controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.yt-progress {
  padding: .65rem .35rem .25rem;
}

.yt-progress__track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  cursor: pointer;
}

.yt-progress__track:hover { height: 5px; }

.yt-progress__buffered,
.yt-progress__played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  pointer-events: none;
}

.yt-progress__buffered { background: rgba(255,255,255,.35); width: 0; }
.yt-progress__played { background: #f00; width: 0; z-index: 1; }

.yt-progress__seek {
  position: absolute;
  inset: -6px 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.yt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 40px;
}

.yt-bar__left,
.yt-bar__right {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
}

.yt-btn:hover { background: rgba(255,255,255,.12); }

.yt-btn svg { width: 22px; height: 22px; }

.yt-btn-play .icon-pause,
.yt-btn-play.is-playing .icon-play { display: none; }
.yt-btn-play.is-playing .icon-pause { display: block; }

.yt-btn-mute .icon-muted { display: none; }
.yt-btn-mute.is-muted .icon-vol { display: none; }
.yt-btn-mute.is-muted .icon-muted { display: block; }

.yt-btn-fs .icon-fs-exit { display: none; }
.yt-player.is-fullscreen .yt-btn-fs .icon-fs-enter { display: none; }
.yt-player.is-fullscreen .yt-btn-fs .icon-fs-exit { display: block; }

.yt-btn-speed {
  width: auto;
  min-width: 40px;
  padding: 0 .5rem;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 4px;
}

.yt-volume {
  display: flex;
  align-items: center;
  gap: .15rem;
}

.yt-volume__slider {
  width: 0;
  opacity: 0;
  transition: width .2s, opacity .2s;
  accent-color: #f00;
  cursor: pointer;
}

.yt-volume:hover .yt-volume__slider,
.yt-player.show-controls .yt-volume__slider {
  width: 72px;
  opacity: 1;
}

.yt-time {
  font-size: .78rem;
  color: #eee;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: .15rem;
}

.yt-player .player-overlay {
  z-index: 7;
}

.course-player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: rgba(0,0,0,.75);
  color: var(--muted);
  pointer-events: none;
}

.player-overlay[hidden] { display: none !important; }

.player-overlay svg {
  width: 48px;
  height: 48px;
  opacity: .5;
}

.player-overlay p {
  margin: 0;
  font-size: .95rem;
}

.now-playing {
  padding: 1rem 1.25rem 1.25rem;
}

.now-playing-label {
  margin: 0 0 .25rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
}

.now-playing h3 {
  margin: 0 0 .35rem;
  font-size: 1.1rem;
}

.course-watch-sidebar {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 5.5rem;
}

.course-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.course-sidebar-head h3 {
  margin: 0;
  font-size: .95rem;
}

.course-sidebar-count {
  font-size: .75rem;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.lesson-list-sidebar {
  overflow-y: auto;
  padding: .5rem .65rem 1rem;
  margin: 0;
  flex: 1;
}

.lesson-list-sidebar .lesson-module-label:first-child {
  margin-top: .5rem;
}

.lesson-item-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.lesson-item-btn:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

.lesson-item-btn.active {
  background: rgba(229,9,20,.12);
  border-color: rgba(229,9,20,.35);
  box-shadow: inset 3px 0 0 var(--accent);
}

.lesson-item-btn.no-video {
  opacity: .65;
}

.lesson-list { margin-bottom: 0; }

.lesson-module-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 1.5rem 0 .5rem;
  padding-left: .5rem;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s;
  margin-bottom: .35rem;
}

.lesson-item:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

.lesson-item.completed { opacity: .75; }

.lesson-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  flex-shrink: 0;
}

.lesson-item.completed .lesson-num {
  background: rgba(34,197,94,.15);
  color: #4ade80;
}

.lesson-info { flex: 1; min-width: 0; }
.lesson-info strong { display: block; font-size: .92rem; }
.lesson-info small { color: var(--muted); font-size: .8rem; }

.lesson-status { flex-shrink: 0; font-size: .78rem; color: var(--muted); }
.lesson-status.done { color: #4ade80; }
.lesson-status.progress { color: var(--accent-soft); font-weight: 600; }

.player-placeholder {
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255,255,255,.08);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-placeholder-inner {
  text-align: center;
  color: var(--muted);
}

.player-placeholder-inner svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: .5;
}

/* Profile */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 1.5rem;
}

.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a3a, #1a1a28);
  border: 3px solid rgba(229,9,20,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-soft);
}

.profile-header-info h2 { margin: 0 0 .25rem; }

.profile-role {
  display: inline-block;
  margin-top: .5rem;
}

/* Role badges */
.role-badge,
.sidebar-role-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .55rem;
  border-radius: 999px;
}

.sidebar-role-badge { margin-top: .25rem; }

.role-badge-admin {
  background: rgba(229,9,20,.2);
  color: #ff6b6b;
  border: 1px solid rgba(229,9,20,.35);
}

.role-badge-mod {
  background: rgba(59,130,246,.18);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,.35);
}

.role-badge-teacher {
  background: rgba(201,162,39,.18);
  color: var(--gold);
  border: 1px solid rgba(201,162,39,.35);
}

.role-badge-student {
  background: rgba(255,255,255,.08);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.1);
}

/* Admin team page */
.team-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.team-stats {
  display: flex;
  gap: 1rem;
}

.team-stat {
  padding: .65rem 1rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.08);
  font-size: .85rem;
  color: var(--muted);
}

.team-stat strong {
  color: var(--accent-soft);
  font-size: 1.1rem;
  margin-right: .25rem;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.team-form-card h3,
.team-list-card h3 {
  margin: 0 0 .75rem;
  font-size: 1rem;
}

.team-form-hint {
  margin: 0 0 1.25rem;
  font-size: .88rem;
}

.team-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-field span {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.form-field input,
.form-field select {
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(229,9,20,.45);
  box-shadow: 0 0 0 3px rgba(229,9,20,.12);
}

.field-hint {
  font-size: .75rem;
  color: var(--muted);
}

.btn-block { width: 100%; }

.form-feedback {
  font-size: .88rem;
  padding: .65rem .85rem;
  border-radius: 8px;
  margin: 0;
}

.form-feedback.is-success {
  background: rgba(34,197,94,.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.25);
}

.form-feedback.is-error {
  background: rgba(229,9,20,.12);
  color: #ff6b6b;
  border: 1px solid rgba(229,9,20,.25);
}

.team-search-results {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 180px;
  overflow-y: auto;
  padding: .35rem;
  border-radius: 10px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.08);
}

.team-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: .55rem .7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.team-search-item:hover { background: rgba(255,255,255,.06); }
.team-search-item small { color: var(--muted); font-size: .78rem; }

.team-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem;
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.06);
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.team-member-info {
  flex: 1;
  min-width: 0;
}

.team-member-info strong {
  display: block;
  font-size: .92rem;
}

.team-member-info small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: .35rem;
}

.team-member-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.team-role-select {
  padding: .4rem .6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
}

.team-self-label { font-size: .82rem; }

.team-permissions-card h3 { margin: 0 0 1rem; }

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.permission-card {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.06);
}

.permission-card ul {
  margin: .75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
}

.team-empty-inline { padding: 2rem 1rem; text-align: center; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.profile-card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.06);
}

.profile-card h3 {
  margin: 0 0 1rem;
  font-size: .95rem;
}

.profile-stat-row {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .5rem;
}

.profile-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-soft);
}

@media (max-width: 960px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-member { flex-wrap: wrap; }
  .team-member-actions { width: 100%; justify-content: flex-end; }
  .platform-sidebar {
    transform: translateX(-100%);
  }
  .platform-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: block; }
  .topbar-menu { display: block; }
  .platform-main { margin-left: 0; }
  .course-header { grid-template-columns: 1fr; }
  .course-watch-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .course-watch-main,
  .course-watch-sidebar {
    position: static;
    max-height: none;
  }
  .course-watch-sidebar {
    max-height: 480px;
  }
  .continue-card { flex-direction: column; }
  .continue-thumb { width: 100%; }
  .platform-tabs { width: 100%; }
  .platform-tab { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
  .platform-content { padding: 1rem; }
  .platform-stats { width: 100%; }
  .stat-card { flex: 1; min-width: 90px; }
}

/* Admin — cursos e vídeos */
.admin-courses-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 1.25rem;
}

.courses-admin-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.course-admin-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem;
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}

.course-admin-item:hover {
  border-color: rgba(229,9,20,.3);
  transform: translateX(3px);
}

.course-admin-thumb {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.course-admin-info { flex: 1; min-width: 0; }
.course-admin-info strong { display: block; font-size: .95rem; }
.course-admin-info small { color: var(--muted); font-size: .8rem; }
.course-admin-meta { display: flex; gap: .35rem; margin-top: .35rem; flex-wrap: wrap; }
.course-admin-arrow { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }

.status-live { background: rgba(34,197,94,.15); color: #4ade80; }
.status-featured { background: rgba(201,162,39,.15); color: var(--gold); }

.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.form-field textarea {
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  resize: vertical;
  min-height: 80px;
}

.course-edit-form { margin-bottom: 1.25rem; }
.course-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.form-field-full { grid-column: 1 / -1; }

/* Capa do curso — link ou upload */
.course-thumbnail-field > span { display: block; margin-bottom: .5rem; }
.thumb-mode-tabs {
  display: flex;
  gap: .35rem;
  margin-bottom: .75rem;
}
.thumb-mode-tab {
  flex: 1;
  padding: .5rem .75rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.thumb-mode-tab:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.thumb-mode-tab.active {
  background: rgba(229,9,20,.15);
  border-color: rgba(229,9,20,.45);
  color: #fff;
}
.thumb-mode-panel { margin-bottom: .75rem; }
.thumb-mode-panel[hidden] { display: none !important; }
.thumb-url-input {
  width: 100%;
  padding: .65rem .85rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: inherit;
  font: inherit;
}
.thumb-url-input:focus {
  outline: none;
  border-color: rgba(229,9,20,.5);
}
.thumb-upload-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  cursor: pointer;
}
.thumb-file-name { font-size: .8rem; }
.thumb-preview-wrap {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
.thumb-preview {
  width: 200px;
  aspect-ratio: 16/10;
  border-radius: 10px;
  background: linear-gradient(145deg,#1a1a28,#2d2d44) center/cover no-repeat;
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-preview-placeholder {
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  padding: .5rem;
}
.thumb-upload-feedback { margin-top: .35rem; font-size: .8rem; }

.course-edit-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.course-content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.course-content-head h3 { margin: 0; }

.module-admin-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.module-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.module-admin-head h4 { margin: 0; font-size: .95rem; }

.lessons-admin-list { padding: .5rem; }

.lesson-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem;
  border-radius: 10px;
  margin-bottom: .35rem;
  background: rgba(0,0,0,.15);
  flex-wrap: wrap;
}

.lesson-admin-main { flex: 1; min-width: 200px; }
.lesson-admin-title { display: block; font-size: .92rem; margin-bottom: .25rem; }
.lesson-admin-access { font-size: .75rem; color: var(--muted); margin-right: .5rem; }

.video-status-badge {
  display: inline-block;
  font-size: .72rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
}

.video-status-badge.status-completed { background: rgba(34,197,94,.15); color: #4ade80; }
.video-status-badge.status-processing,
.video-status-badge.status-queued { background: rgba(59,130,246,.15); color: #60a5fa; }
.video-status-badge.status-failed { background: rgba(229,9,20,.15); color: #ff6b6b; }
.video-status-badge.status-none { background: rgba(255,255,255,.05); }

.upload-btn {
  display: inline-flex;
  cursor: pointer;
}

.upload-btn input { display: none; }

.upload-btn span {
  display: inline-block;
  padding: .45rem .85rem;
  border-radius: 8px;
  background: rgba(229,9,20,.15);
  border: 1px solid rgba(229,9,20,.35);
  color: var(--accent-soft);
  font-size: .82rem;
  font-weight: 600;
  transition: background .2s;
}

.upload-btn:hover span { background: rgba(229,9,20,.25); }

.upload-progress {
  margin-top: .5rem;
  min-width: 140px;
}

.upload-progress-bar {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: .25rem;
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s;
}

.upload-progress-text { font-size: .75rem; color: var(--muted); }
.upload-progress.is-error .upload-progress-bar span { background: #ef4444; }

.lesson-empty { padding: .5rem 1rem; font-size: .85rem; }

/* Modal de upload de vídeo */
body.upload-modal-open { overflow: hidden; }

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.upload-modal[hidden] { display: none !important; }

.upload-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.upload-modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 2rem 1.75rem;
  border-radius: 18px;
  background: linear-gradient(160deg, #12121c 0%, #0a0a10 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.upload-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--accent-soft);
}

.upload-modal-icon.is-success { color: #4ade80; }
.upload-modal-icon.is-error { color: #ff6b6b; }

.upload-spinner {
  width: 56px;
  height: 56px;
  animation: uploadSpin 1s linear infinite;
}

@keyframes uploadSpin {
  to { transform: rotate(360deg); }
}

.upload-modal-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.upload-modal-lesson {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  color: var(--gold);
}

.upload-modal-file {
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

.upload-modal-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.upload-modal-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.upload-modal-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.upload-modal-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-soft);
  min-width: 38px;
}

.upload-modal-status {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--text);
}

.upload-modal-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

#upload-modal-close {
  margin-top: 1rem;
}

/* —— Experiência Udemy (assistir curso) —— */
.page-udemy-watch .platform-main { padding-top: 0; }

.udemy-watch {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4rem);
}

.udemy-watch-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.udemy-back {
  display: flex;
  color: var(--muted);
  padding: .35rem;
}
.udemy-back:hover { color: #fff; }

.udemy-header-info { flex: 1; min-width: 0; }
.udemy-course-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.udemy-course-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--muted);
}

.udemy-progress-bar {
  flex: 1;
  max-width: 200px;
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  overflow: hidden;
}
.udemy-progress-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width .3s ease;
}

.udemy-watch-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  flex: 1;
  align-items: start;
}

.udemy-watch.theater-mode .udemy-watch-body {
  grid-template-columns: 1fr;
}
.udemy-watch.theater-mode .udemy-sidebar {
  display: none;
}

.udemy-main { min-width: 0; }

.udemy-lesson-panel {
  padding: 1rem 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border-top: 1px solid rgba(255,255,255,.06);
}

.udemy-lesson-nav {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
}

.udemy-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.udemy-nav-btn:disabled { opacity: .35; pointer-events: none; }
.udemy-nav-btn svg { width: 16px; height: 16px; }

.udemy-lesson-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.udemy-lesson-meta h2 { margin: 0 0 .25rem; font-size: 1.15rem; }

.udemy-lesson-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.udemy-autoplay-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
}

#btn-mark-complete.is-done {
  color: #4ade80;
  border-color: rgba(74,222,128,.35);
}

.udemy-lesson-desc {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--muted);
  line-height: 1.65;
  font-size: .9rem;
  white-space: pre-wrap;
}

.udemy-sidebar {
  position: sticky;
  top: 3.5rem;
  max-height: calc(100vh - 4rem);
  border-left: 1px solid rgba(255,255,255,.08);
  background: var(--bg-elevated);
}

.yt-autoplay-countdown {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: rgba(0,0,0,.75);
  color: #fff;
}
.yt-autoplay-countdown[hidden] { display: none !important; }
.yt-autoplay-countdown p { margin: 0; font-size: 1.1rem; }

.yt-settings-wrap { position: relative; }

.yt-settings-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: .5rem;
  min-width: 160px;
  padding: .65rem;
  background: rgba(28,28,36,.98);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.yt-settings-menu[hidden] { display: none !important; }

.yt-settings-label {
  margin: .35rem 0 .25rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.yt-settings-speeds,
.yt-settings-qualities {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .5rem;
}

.yt-settings-opt {
  padding: .3rem .55rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  background: transparent;
  color: #eee;
  font-size: .78rem;
  cursor: pointer;
}
.yt-settings-opt:hover { background: rgba(255,255,255,.08); }
.yt-settings-opt.active {
  background: rgba(229,9,20,.25);
  border-color: rgba(229,9,20,.5);
  color: #fff;
}

.yt-btn-settings,
.yt-btn-theater {
  font-size: .95rem;
  min-width: 36px;
}

.udemy-sidebar-toggle { display: none; }

@media (max-width: 960px) {
  .admin-courses-grid { grid-template-columns: 1fr; }
  .course-edit-grid { grid-template-columns: 1fr; }

  .udemy-watch-body { grid-template-columns: 1fr; }
  .udemy-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 360px);
    z-index: 50;
    transform: translateX(100%);
    transition: transform .25s ease;
    max-height: none;
  }
  .udemy-sidebar.sidebar-open { transform: translateX(0); }
  .udemy-sidebar-toggle { display: inline-flex; }
}

/* —— Logo & aparência do site (admin) —— */
.site-logo-img {
  max-height: 36px;
  width: auto;
  display: block;
}

.sidebar-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.admin-appearance-page .admin-appearance-intro {
  margin-bottom: 1.25rem;
  max-width: 52rem;
}

.appearance-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 960px;
}

.appearance-preview-card .appearance-preview {
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--bg-elevated, #0c0c12);
  color: var(--text, #f4f4f8);
  border: 1px solid rgba(255,255,255,.08);
}

.appearance-preview .preview-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.appearance-preview .preview-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent, #e50914);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.appearance-preview .preview-tagline {
  color: var(--muted, #9a9ab0);
  font-size: .9rem;
  margin: 0 0 1rem;
}

.appearance-preview .preview-btn {
  margin-right: 1rem;
}

.appearance-preview .preview-gold {
  color: var(--gold, #c9a227);
  font-size: .85rem;
}

.appearance-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.appearance-fields.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.appearance-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.color-input-wrap {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.color-input-wrap input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.color-input-wrap .color-hex {
  flex: 1;
  font-family: ui-monospace, monospace;
  font-size: .85rem;
}

.appearance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  grid-column: 1 / -1;
}

.form-field-full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .appearance-fields.two-cols { grid-template-columns: 1fr; }
}
