/* Plataforma própria de cursos — Grupo Uni (protótipo)
   Visual moderno e interativo: paleta escura, destaque em gradiente
   violeta → rosa, cards arredondados, mobile-first, transições suaves. */
:root {
  --bg: #0b0f1e;
  --bg2: #0e1428;
  --surface: #141a2e;
  --surface2: #1b2340;
  --border: #26304d;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #8b5cf6;
  --accent2: #ff2e88;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.55;
  background-image: radial-gradient(900px 400px at 85% -10%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(700px 350px at -10% 10%, rgba(255, 46, 136, .12), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(11, 15, 30, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 18px; font-weight: 900; color: #fff;
}
.logo small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .4px; }
.topbar nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.chip-btn {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: transform .15s ease, border-color .15s ease;
}
.chip-btn:hover { transform: translateY(-1px); border-color: var(--accent); }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 80px; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.15; margin: 8px 0 6px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 0 18px; max-width: 640px; }
.eyebrow { color: var(--accent2); font-weight: 700; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }

/* ---------- vitrine ---------- */
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.section-title { font-size: 20px; margin: 28px 0 12px; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.card-actions .btn { width: 100%; }
.login-prompt {
  background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(255, 46, 136, .18));
  border: 1px solid rgba(139, 92, 246, .5); border-radius: var(--radius);
  padding: 18px 20px; margin: 20px 0;
}
.login-prompt p { color: var(--muted); }

/* ---------- busca ---------- */
.search-row { display: flex; gap: 10px; margin: 18px 0 20px; }
.search-row input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 12px 18px; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card img.cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.meta span { background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.meta span.selo, .selo-badge { background: var(--accent2); color: #fff; border: 1px solid var(--accent2); border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 12px; }
.price { font-size: 18px; font-weight: 800; }
.price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.btn {
  display: inline-block; text-align: center; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; border: none; border-radius: 999px;
  padding: 12px 20px; transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn.ghost { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn.success { background: var(--success); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { display: block; width: 100%; }

/* ---------- progresso ---------- */
.progress { height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .5s ease; }
.progress-label { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.next-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(255, 46, 136, .18));
  border: 1px solid rgba(139, 92, 246, .5); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
}
.next-banner b { font-size: 15px; }
.next-banner .btn { margin-left: auto; }

/* ---------- detalhe do curso ---------- */
.course-hero { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 20px; }
@media (min-width: 720px) { .course-hero { grid-template-columns: 220px 1fr; } }
.course-hero img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; max-width: 260px; }
.module { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.module > summary {
  cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none;
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
}
.module > summary::-webkit-details-marker { display: none; }
.module > summary:hover { background: var(--surface2); }
.module .lessons { padding: 0 8px 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; text-decoration: none;
}
.lesson-row:hover { background: var(--surface2); }
.lesson-row.done .lesson-title { color: var(--success); }
.lesson-row.next { outline: 2px solid var(--accent); background: rgba(139, 92, 246, .12); }
.lesson-check {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--muted); display: grid; place-items: center; font-size: 12px; color: #fff;
}
.lesson-row.done .lesson-check { background: var(--success); border-color: var(--success); }
.lesson-title { flex: 1; font-size: 14px; }
.lesson-tag { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- player ---------- */
.player-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.player-head h2 { margin: 0; flex: 1; min-width: 200px; font-size: clamp(19px, 4vw, 26px); }
.pdf-viewer {
  width: 100%; height: min(78vh, 900px); border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; overflow: hidden;
}
.pdf-viewer iframe { width: 100%; height: 100%; border: 0; }
.map-box { margin-top: 16px; }
.map-box img { border-radius: var(--radius); border: 1px solid var(--border); cursor: zoom-in; transition: transform .2s ease; }
.map-box img:hover { transform: scale(1.01); }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.player-actions .btn { flex: 1; min-width: 140px; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .92);
  display: grid; place-items: center; padding: 20px; cursor: zoom-out;
  animation: fadeUp .2s ease both;
}
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; }
.video-note {
  background: var(--surface2); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 14px 16px; color: var(--muted); font-size: 14px; margin-top: 16px;
}

/* ---------- login / admin / forms ---------- */
.center-box { max-width: 420px; margin: 60px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.center-box h1 { margin: 0 0 4px; font-size: 24px; }
.center-box p { color: var(--muted); font-size: 14px; }
.field { margin: 14px 0; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 12px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.login-tabs { display: flex; gap: 8px; margin: 16px 0 4px; }
.login-tabs .login-tab { flex: 1; }
.login-tabs .login-tab.active { background: linear-gradient(90deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.error { background: rgba(239, 68, 68, .15); border: 1px solid rgba(239, 68, 68, .5); color: #fca5a5; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.ok-msg { background: rgba(34, 197, 94, .15); border: 1px solid rgba(34, 197, 94, .5); color: #86efac; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.demo-banner { background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .5); color: #fcd34d; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel h3 { margin: 0 0 6px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 16px; }
@media (max-width: 480px) {
  .player-actions .btn { min-width: 100%; }
  .next-banner .btn { margin-left: 0; width: 100%; }
}
