@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/dm-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/dm-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #12100e;
  --bg2: #1a1714;
  --card: #211d19;
  --line: #322c26;
  --text: #f3eee8;
  --muted: #a99e92;
  --accent: #e0a458;
  --accent-ink: #1b130a;
  --good: #6cc28a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
button:hover { filter: brightness(1.06); }
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }
button.link { background: none; color: var(--muted); padding: 6px 0; font-weight: 500; text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* topo */
.top { position: sticky; top: 0; z-index: 5; background: rgba(18, 16, 14, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .2px; }
.mono { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #f0bd74, #b97a36); color: var(--accent-ink); font-weight: 800; font-size: 15px; letter-spacing: .5px; flex: none; }
.mono.big { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; margin: 0 auto; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; line-height: 1; }
.grow { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* entrar */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% -10%, rgba(224, 164, 88, .18), transparent 70%), var(--bg); }
.login form { width: 100%; max-width: 400px; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: grid; gap: 16px; }
.login h1 { margin: 0; text-align: center; font-size: 24px; }
.login p { margin: 0; text-align: center; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
input.code { letter-spacing: 10px; text-align: center; font-size: 26px; font-weight: 700; }
.error { color: #ff8f80; text-align: center; min-height: 1.5em; font-size: 14px; }
.help { font-size: 13px; text-align: center; }

/* vitrine */
.hello { padding: 34px 0 10px; }
.hello h1 { margin: 0 0 4px; font-size: 28px; }
.resume { margin: 18px 0 8px; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(224, 164, 88, .18), rgba(224, 164, 88, .04)); border: 1px solid rgba(224, 164, 88, .35); text-decoration: none; }
.resume .play { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; font-size: 18px; }
.resume b { display: block; }
h2.sec { font-size: 18px; margin: 30px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.course { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.course:hover { transform: translateY(-3px); border-color: rgba(224, 164, 88, .5); }
.course .pic { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #3a2a1b, #1a1410); position: relative; display: grid; place-items: center; text-align: center; padding: 12px; font-weight: 800; font-size: 19px; }
.course .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course .body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.course .body b { line-height: 1.3; }
.course.locked { opacity: .55; }
.course .lock { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .7); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.small { font-size: 13px; }

/* curso */
.hero { position: relative; padding: 40px 0 30px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) brightness(.35); transform: scale(1.2); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 28px; align-items: center; }
.hero .cover { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.hero .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero h1 { margin: 6px 0; font-size: 30px; line-height: 1.15; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.file { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.module { margin: 26px 0; }
.module h3 { margin: 0 0 10px; font-size: 17px; display: flex; gap: 10px; align-items: baseline; }
.lessons { display: grid; gap: 8px; }
.lesson { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.lesson:hover { border-color: rgba(224, 164, 88, .5); }
.lesson .thumb { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #3a2a1b, #1a1410); display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.lesson .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lesson.off { opacity: .55; cursor: not-allowed; }
.state { font-size: 13px; font-weight: 700; color: var(--muted); padding-right: 8px; white-space: nowrap; }
.state.done { color: var(--good); }

/* aula */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding: 24px 0 50px; }
.player { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0 6px; }
.meta h1 { font-size: 22px; margin: 0; flex: 1; min-width: 220px; line-height: 1.25; }
button.done { background: var(--good); color: #0b1a10; }
.nav { display: flex; gap: 10px; margin-top: 14px; }
.side { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; max-height: calc(100vh - 110px); overflow: auto; position: sticky; top: 84px; }
.side h4 { margin: 12px 4px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.side a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.side a:hover { background: rgba(255, 255, 255, .05); }
.side a.on { background: rgba(224, 164, 88, .16); font-weight: 700; }
.side a.off { opacity: .5; pointer-events: none; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 11px; }
.dot.done { background: var(--good); border-color: var(--good); color: #0b1a10; }

.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #f3eee8; color: #1b130a; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 20; max-width: 90vw; }
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 40px; font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .watch { grid-template-columns: 1fr; padding-top: 0; }
  .watch .player { border-radius: 0; margin: 0 -20px; border-left: 0; border-right: 0; }
  .side { position: static; max-height: none; }
  .lesson { grid-template-columns: 96px 1fr; }
  .lesson .state { grid-column: 2; padding: 0; }
}
@media (max-width: 520px) {
  .brand small, .top .small { display: none; }
  .top .wrap { gap: 10px; }
  .top button.ghost { padding: 8px 12px; }
}
