/* GW English · paleta extraída da logo Golden Way Forex */
:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1C1C1C;
  --border: #2A2A2A;
  --gold: #D4AF37;
  --gold-light: #F3D978;
  --gold-dark: #8C6D1F;
  --cream: #F5EBD0;
  --text: #F5EBD0;
  --text-dim: #9A917A;
  --danger: #E5484D;
  --ok: #C9A227;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; }
body { min-height: 100vh; background:
  radial-gradient(1200px 600px at 50% -200px, rgba(212,175,55,0.12), transparent 70%), var(--bg); }
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- topo ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: rgba(10,10,10,0.85);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: 46px; object-fit: contain; background: #000; border-radius: 10px; }
.brand-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: .5px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: .72rem; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; }
#user-area { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.xp-pill { background: var(--surface-2); border: 1px solid var(--gold-dark); color: var(--gold-light);
  padding: 6px 12px; border-radius: 999px; font-weight: 700; }

main { max-width: 900px; margin: 0 auto; padding: 24px 16px 80px; }

/* ---------- botões ---------- */
.btn { background: var(--surface); color: var(--text); border: 1.5px solid var(--gold-dark); border-radius: 12px;
  padding: 12px 18px; font-weight: 700; cursor: pointer; transition: all .2s ease; }
.btn:hover { border-color: var(--gold); color: var(--gold-light); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #0A0A0A; border-color: var(--gold); }
.btn-primary:hover { color: #0A0A0A; box-shadow: 0 6px 24px rgba(212,175,55,.35); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-weight: 700; cursor: pointer; }
.tab.active { border-color: var(--gold); color: var(--gold-light); background: var(--surface-2); }

/* ---------- login ---------- */
.login-card { max-width: 420px; margin: 40px auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.login-card img { width: 150px; height: 150px; object-fit: contain; background: #000; border-radius: 18px; }
.login-card h1 { font-family: 'Montserrat', sans-serif; margin: 16px 0 4px; font-size: 1.8rem;
  background: linear-gradient(90deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card p { color: var(--text-dim); margin: 0 0 22px; }
input[type=text], select, input[type=number] { width: 100%; background: var(--surface-2); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 1rem; margin-bottom: 14px; }
input:focus, select:focus { outline: none; border-color: var(--gold); }

/* ---------- cartões de módulo ---------- */
.section-title { font-family: 'Montserrat', sans-serif; font-size: 1.25rem; margin: 26px 0 12px; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mod-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: all .2s ease; position: relative; overflow: hidden; }
.mod-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.mod-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); opacity: .6; }
.mod-card.done::before { opacity: 1; }
.mod-card h3 { margin: 0 0 8px; font-size: 1rem; }
.mod-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-dim); margin-bottom: 10px; }
.bar { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); border-radius: 999px; }
.lvl { font-size: .72rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--gold-dark); color: var(--gold-light); }

/* ---------- trilha ---------- */
.trail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.trail-head h2 { font-family: 'Montserrat', sans-serif; font-size: 1.25rem; margin: 0; }
.trail { position: relative; width: 100%; margin: 10px auto 0; }
.trail svg.path { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.node { position: absolute; width: 74px; height: 74px; margin-left: -37px; margin-top: -37px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; color: #0A0A0A;
  border: 4px solid rgba(0,0,0,.4); box-shadow: 0 6px 0 #5a4614, 0 0 0 transparent; cursor: default; user-select: none;
  transition: transform .15s ease; }
.node .lbl { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .72rem;
  color: var(--text-dim); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.node.done { background: linear-gradient(180deg, var(--gold-light), var(--gold)); cursor: pointer; }
.node.done:hover { transform: scale(1.06); }
.node.current { background: linear-gradient(180deg, #FFF3B0, #E0B23A); cursor: pointer; animation: pulse 1.6s infinite; }
.node.current .lbl { color: var(--gold-light); font-weight: 800; }
.node.locked { background: linear-gradient(180deg, #3A3A3A, #262626); color: #777; box-shadow: 0 6px 0 #111; }
.node.start { background: linear-gradient(180deg, #2A2A2A, #161616); color: var(--gold); box-shadow: 0 6px 0 #000; }
.node.chest.open { background: linear-gradient(180deg, #FFF3B0, #B8891F); }
.node.chest.locked { background: linear-gradient(180deg, #3A3A3A, #262626); filter: grayscale(1); opacity: .6; }
.node.trophy { background: linear-gradient(180deg, #FFF3B0, #D4AF37); width: 84px; height: 84px; margin-left: -42px; margin-top: -42px; }
.mascot { position: absolute; width: 58px; height: 58px; margin-left: -29px; margin-top: -29px; font-size: 2.2rem; text-align: center; line-height: 58px; pointer-events: none; animation: bob 2s ease-in-out infinite; }
.mascot-tag { position: absolute; white-space: nowrap; font-size: .72rem; color: var(--gold-light); font-weight: 700; transform: translateX(-50%); }

@keyframes pulse { 0%,100% { box-shadow: 0 6px 0 #5a4614, 0 0 0 0 rgba(212,175,55,.5); } 50% { box-shadow: 0 6px 0 #5a4614, 0 0 0 14px rgba(212,175,55,0); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- modal / quiz ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-card { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--gold-dark); border-radius: 20px;
  padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.7); max-height: 92vh; overflow: auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: .9rem; color: var(--text-dim); }
.hearts { letter-spacing: 3px; font-size: 1.1rem; }
.question { font-size: 1.35rem; font-weight: 700; text-align: center; margin: 18px 0 22px; line-height: 1.35; }
.opt { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; font-size: 1rem; cursor: pointer; transition: all .15s; }
.opt:hover { border-color: var(--gold); }
.opt.sel { border-color: var(--gold); background: #2a2415; }
.opt.right { border-color: var(--ok); background: #1f2a12; color: var(--gold-light); }
.opt.wrong { border-color: var(--danger); background: #2a1414; }
.feedback { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.feedback.ok { background: #1f2a12; color: var(--gold-light); border: 1px solid var(--gold-dark); }
.feedback.err { background: #2a1414; color: #ffb4b6; border: 1px solid var(--danger); }
.result { text-align: center; padding: 10px 0; }
.result .big { font-size: 3rem; }
.result h2 { font-family: 'Montserrat', sans-serif; color: var(--gold-light); }

/* ---------- duelos ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 1rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-dim); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; }
.stat b { display: block; font-family: 'Montserrat', sans-serif; font-size: 1.5rem; color: var(--gold-light); }
.stat span { font-size: .75rem; color: var(--text-dim); }
.warn { background: #2a2415; border: 1px solid var(--gold-dark); border-radius: 12px; padding: 14px; color: var(--gold-light); }

@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .node { width: 64px; height: 64px; margin-left: -32px; margin-top: -32px; font-size: 1.25rem; }
  .node .lbl { top: 70px; font-size: .66rem; }
  .question { font-size: 1.15rem; }
  .brand-sub { display: none; }
}

/* ---------- painel do professor ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.grid3 input { margin-bottom: 0; }
.card input[type=text], .card input[type=password] { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th, .tabela td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tabela th { color: var(--gold-light); font-weight: 700; }
.st-ok { color: var(--gold-light); }
.st-bloq { color: var(--danger); }
.acoes { white-space: nowrap; }
.btn-mini { padding: 6px 10px; font-size: .8rem; border-radius: 8px; margin: 2px; height: auto; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
