/* =====================================================
   Ouvido Musical — Estilos globais
   Dark theme · Glassmorphism · Nunito
   ===================================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080c14;
  --bg2:       #0e1421;
  --surface:   rgba(255,255,255,.06);
  --border:    rgba(255,255,255,.10);
  --purple:    #7c3aed;
  --purple2:   #9f67ff;
  --purple3:   #c4b5fd;
  --green:     #22c55e;
  --yellow:    #f59e0b;
  --red:       #ef4444;
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --radius:    16px;
  --shadow:    0 8px 32px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- GLASSMORPHISM ---------- */
.glass {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- BOTÕES ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 20px rgba(124,58,237,.45);
  text-decoration: none;
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,.6); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: transparent;
  color: var(--purple3);
  border: 1.5px solid var(--purple);
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.btn-secondary:hover { background: rgba(124,58,237,.15); color: #fff; }

.btn-full { width: 100%; justify-content: center; }

/* ======================================================
   AUTH — index.php
   ====================================================== */
.auth-body {
  background: radial-gradient(ellipse at 20% 10%, #1a0533 0%, var(--bg) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Notas flutuantes */
.notes-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.float-note {
  position: absolute;
  top: 105vh;
  color: var(--purple3);
  animation: floatUp linear forwards;
  user-select: none;
}
@keyframes floatUp {
  from { transform: translateY(0) rotate(0deg); opacity: .25; }
  to   { transform: translateY(-130vh) rotate(25deg); opacity: 0; }
}

.auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 48px;
  align-items: center;
  padding: 24px 16px;
  max-width: 900px;
  width: 100%;
}

/* Hero lateral */
.auth-hero {
  flex: 1;
  display: none;
  flex-direction: column;
  gap: 24px;
}
@media(min-width:700px) { .auth-hero { display: flex; } }

.hero-logo  { font-size: 4rem; animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.hero-title { font-size: 2.4rem; font-weight: 900; background: linear-gradient(135deg,#fff,var(--purple3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub   { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.hero-stats { display: flex; gap: 20px; }
.hstat      { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.hstat span { display: block; font-size: 1.5rem; font-weight: 900; color: var(--purple3); }

/* Auth card */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/* Tabs */
.auth-tabs {
  display: flex;
  position: relative;
  background: rgba(0,0,0,.25);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  padding: 10px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color .2s;
  border-radius: 50px;
}
.auth-tab.active { color: #fff; }
.tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 4px;
  width: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  border-radius: 50px;
  transition: left .25s cubic-bezier(.4,0,.2,1);
  z-index: 1;
  box-shadow: 0 2px 12px rgba(124,58,237,.5);
}

/* Formulários */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form.hidden { display: none; }
.auth-form.visible { display: flex; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.field-group input {
  background: rgba(255,255,255,.06);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  padding: 12px 16px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.field-group input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
.field-group input::placeholder { color: rgba(148,163,184,.5); }

/* Alert */
.alert { border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.alert-error { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }

/* ======================================================
   DASHBOARD
   ====================================================== */
.dash-body {
  background: radial-gradient(ellipse at 50% 0%, #12062a 0%, var(--bg) 55%);
  min-height: 100vh;
}

/* Header */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,20,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.dh-left  { display: flex; align-items: center; gap: 10px; }
.dh-logo  { font-size: 1.5rem; }
.dh-brand { font-size: 1.1rem; font-weight: 800; }
.dh-back  { font-size: 1.3rem; font-weight: 800; color: var(--muted); padding-right: 8px; transition: color .15s; }
.dh-back:hover { color: #fff; }
.dh-right { display: flex; gap: 16px; align-items: center; }
.dh-link  { font-weight: 700; font-size: .9rem; color: var(--muted); transition: color .15s; }
.dh-link:hover  { color: #fff; }
.dh-logout      { color: rgba(239,68,68,.8); }
.dh-logout:hover{ color: var(--red); }

/* Profile section */
.profile-section { padding: 24px 16px 8px; max-width: 700px; margin: 0 auto; }
.profile-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  align-items: flex-start;
}
.pc-avatar {
  width: 56px; height: 56px; min-width: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900; color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.5);
}
.pc-info    { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pc-name    { font-size: 1.2rem; font-weight: 800; }
.pc-stats   { display: flex; gap: 16px; flex-wrap: wrap; }
.pc-stat    { font-size: .85rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.ps-icon    { font-size: 1rem; }
.pc-xp-label{ font-size: .8rem; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; }
.pc-xp-num  { color: var(--purple3); }
.pc-xpbar   { height: 8px; background: rgba(255,255,255,.1); border-radius: 50px; overflow: hidden; margin-top: 4px; }
.pc-xpbar-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple2)); border-radius: 50px; transition: width 1s cubic-bezier(.4,0,.2,1); }

/* Trilha */
.trail-section { padding: 24px 16px 80px; max-width: 700px; margin: 0 auto; }
.trail-title   { font-size: 1.5rem; font-weight: 900; text-align: center; margin-bottom: 4px; }
.trail-sub     { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 40px; }

.trail { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; }

/* Nó da trilha */
.trail-node {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  padding: 0 8px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s, transform .5s;
  position: relative;
  margin-bottom: 8px;
}
.trail-node.node-visible { opacity: 1; transform: translateY(0); }
.trail-left  { flex-direction: row; }
.trail-right { flex-direction: row-reverse; }

/* Conector vertical */
.trail-connector {
  position: absolute;
  left: 50%;
  top: -28px;
  width: 2px;
  height: 28px;
  background: rgba(255,255,255,.1);
  transform: translateX(-50%);
}
.trail-connector.conn-unlocked { background: linear-gradient(180deg, var(--purple), rgba(124,58,237,.3)); }

/* Bubble (círculo com ícone) */
.node-bubble {
  width: 68px; height: 68px; min-width: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(124,58,237,.45), 0 0 0 4px rgba(124,58,237,.15);
  cursor: default;
  position: relative;
  z-index: 2;
  transition: transform .2s, box-shadow .2s;
}
.node-bubble:hover { transform: scale(1.08); }
.node-locked { background: rgba(255,255,255,.07); box-shadow: none; }
.node-mastered { background: linear-gradient(135deg, #059669, #22c55e); box-shadow: 0 4px 20px rgba(34,197,94,.4); }

.node-icon      { font-size: 1.5rem; }
.node-lock-text { font-size: .5rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.node-stars     { display: flex; gap: 2px; font-size: .7rem; }
.star           { color: rgba(255,255,255,.2); }
.star-on        { color: #f59e0b; text-shadow: 0 0 8px rgba(245,158,11,.6); }

/* Card da habilidade */
.node-card { flex: 1; padding: 16px 20px; }
.card-locked { opacity: .5; pointer-events: none; }

.nc-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.nc-name    { font-size: 1.05rem; font-weight: 800; }
.nc-badge   { font-size: .75rem; font-weight: 700; color: var(--purple3); background: rgba(124,58,237,.2); padding: 2px 8px; border-radius: 50px; }
.nc-desc    { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }

.nc-progress { margin-bottom: 10px; }
.nc-prog-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 50px; overflow: hidden; margin-bottom: 4px; }
.nc-prog-fill{ height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple2)); border-radius: 50px; }
.nc-prog-pct { font-size: .75rem; color: var(--muted); font-weight: 700; }

.btn-train {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(124,58,237,.4);
}
.btn-train:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,.6); }
.btn-mastered { background: linear-gradient(135deg, #059669, #22c55e); box-shadow: 0 3px 14px rgba(34,197,94,.35); }
.btn-arrow    { opacity: .7; }

.nc-locked-msg { font-size: .8rem; color: rgba(148,163,184,.5); font-style: italic; }

/* Fim da trilha */
.trail-end   { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 32px; opacity: .35; }
.te-bubble   { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1.5px dashed rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.te-label    { font-size: .8rem; color: var(--muted); font-weight: 700; }

/* ======================================================
   TRAIN — train.php
   ====================================================== */
.train-body {
  background: radial-gradient(ellipse at 50% -10%, #1a0a36 0%, var(--bg) 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- INTRO ---------- */
.intro-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0 60px;
  animation: fadeIn .4s ease;
}

.intro-badge {
  text-align: center;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--purple3);
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 50px;
  padding: 6px 18px;
  align-self: center;
}

.intro-title {
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #fff, var(--purple3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.intro-semitones {
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: -10px;
}

.intro-desc {
  padding: 20px 22px;
  line-height: 1.7;
  font-size: .95rem;
  color: #cbd5e1;
}

.intro-example {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-color: rgba(124,58,237,.3);
}
.ie-label {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple3);
}
.ie-notes {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
}

.btn-play-intro {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
}
.btn-play-intro:hover    { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,.55); }
.btn-play-intro:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ie-hint {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
}

.intro-hook {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-color: rgba(245,158,11,.25);
  background: rgba(245,158,11,.06);
}
.ih-label { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #f59e0b; }
.ih-text  { font-size: .92rem; color: #fde68a; line-height: 1.5; }

.intro-warn {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px 16px;
}
.intro-warn strong { color: #f1f5f9; }

.intro-start { margin-top: 4px; }

.train-wrap { width: 100%; max-width: 560px; padding: 0 16px 60px; }

/* Header do treino */
.train-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(8,12,20,.9);
  backdrop-filter: blur(16px);
  z-index: 100;
  margin-bottom: 32px;
}
.train-back {
  font-size: 1.3rem; font-weight: 800; color: var(--muted);
  text-decoration: none; width: 36px; transition: color .15s;
}
.train-back:hover { color: #fff; }
.train-skill-name  { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.train-progress-bar{ flex: 1; height: 8px; background: rgba(255,255,255,.1); border-radius: 50px; overflow: hidden; }
.tpb-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple2)); border-radius: 50px; transition: width .4s ease; width: 0; }
.train-count { font-size: .85rem; font-weight: 800; color: var(--muted); white-space: nowrap; }

/* Área de exercício */
.exercise-area { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 8px 0 60px; animation: fadeIn .3s ease; }

/* Badge de tipo */
.exercise-type-badge {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
}

/* Hint */
.exercise-hint { font-size: .85rem; color: var(--muted); text-align: center; margin-top: -8px; }

/* Botão play — grande, central */
.btn-play-big {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a073a, var(--purple));
  border: 2px solid rgba(124,58,237,.5);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 0 8px rgba(124,58,237,.1), 0 8px 32px rgba(124,58,237,.4);
  font-size: .9rem;
  font-weight: 800;
}
.btn-play-big:hover    { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(124,58,237,.15), 0 12px 40px rgba(124,58,237,.55); }
.btn-play-big:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bpb-icon { font-size: 2.2rem; line-height: 1; }

/* Botão play (versão pequena — intro) */
.btn-play {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #1e0a3c, var(--purple));
  border: 1.5px solid var(--purple);
  border-radius: 50px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(124,58,237,.35);
}
.btn-play:hover    { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,.55); }
.btn-play:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.play-icon { font-size: 1.2rem; }
.spin { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Grid de opções */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, transform .1s;
}
.option-btn:hover:not(:disabled) { background: rgba(124,58,237,.2); border-color: var(--purple); transform: translateY(-1px); }
.option-btn:disabled { cursor: not-allowed; }
.ob-num {
  width: 28px; height: 28px; min-width: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
}

.opt-correct { background: rgba(34,197,94,.18) !important; border-color: var(--green) !important; color: #86efac; }
.opt-correct .ob-num { background: var(--green); color: #fff; }
.opt-wrong   { background: rgba(239,68,68,.18) !important; border-color: var(--red) !important; color: #fca5a5; }
.opt-wrong .ob-num { background: var(--red); color: #fff; }

/* Feedback */
.feedback-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
  width: 100%;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.fp-row     { display: flex; align-items: flex-start; gap: 14px; }
.fp-content { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fp-icon    { font-size: 1.8rem; font-weight: 900; line-height: 1.2; }
.fp-correct { color: var(--green); }
.fp-wrong   { color: var(--red); }
.fp-text    { font-size: 1rem; font-weight: 800; }
.fp-detail  { font-size: .82rem; color: var(--muted); }

.btn-next {
  padding: 12px 28px;
  align-self: flex-end;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
}
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,.55); }

/* Resultados */
.results-area {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
  animation: fadeIn .5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.results-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 36px 28px;
  text-align: center;
}
.rc-emoji    { font-size: 4rem; animation: bounce .6s ease; }
@keyframes bounce { 0%,100%{transform:scale(1)} 40%{transform:scale(1.3)} 70%{transform:scale(.92)} }
.rc-title    { font-size: 1.5rem; font-weight: 900; }
.rc-score    { font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.rc-xp       { font-size: 1.2rem; font-weight: 800; color: var(--purple3); background: rgba(124,58,237,.15); padding: 8px 24px; border-radius: 50px; border: 1px solid rgba(124,58,237,.3); }
.rc-bars     { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.rc-bar-row  { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.rc-bar-bg   { flex: 1; height: 8px; background: rgba(255,255,255,.1); border-radius: 50px; overflow: hidden; }
.rc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple2)); border-radius: 50px; transition: width 1s ease; }
.rc-mini-bar { display: flex; gap: 3px; font-size: 1.1rem; }
.rmb-star    { color: rgba(255,255,255,.2); }
.rmb-on      { color: #f59e0b; }
.rc-actions  { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ======================================================
   HISTORY — history.php
   ====================================================== */
.hist-body {
  background: radial-gradient(ellipse at 50% 0%, #0a1a2e 0%, var(--bg) 60%);
  min-height: 100vh;
}

.hist-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px 16px;
  max-width: 700px;
  margin: 0 auto;
}
@media(max-width:480px) { .hist-stats { grid-template-columns: repeat(2,1fr); } }

.hs-card  { padding: 16px; text-align: center; }
.hs-num   { font-size: 1.5rem; font-weight: 900; color: var(--purple3); }
.hs-label { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }

.hist-main { padding: 8px 16px 60px; max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.hist-day    { display: flex; flex-direction: column; gap: 10px; }
.hd-label    { font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 0 4px; }

.hist-card   { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.hc-top      { display: flex; align-items: center; gap: 12px; }
.hc-icon     { font-size: 1.5rem; }
.hc-info     { flex: 1; }
.hc-name     { font-size: 1rem; font-weight: 800; }
.hc-time     { font-size: .78rem; color: var(--muted); }
.hc-xp       { font-size: .85rem; font-weight: 800; color: var(--purple3); background: rgba(124,58,237,.15); padding: 4px 10px; border-radius: 50px; }

.hc-bar-row  { display: flex; align-items: center; gap: 12px; }
.hc-bar-bg   { flex: 1; height: 8px; background: rgba(255,255,255,.1); border-radius: 50px; overflow: hidden; }
.hc-bar-fill { height: 100%; border-radius: 50px; }
.hc-score    { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.hcs-main    { font-size: .85rem; font-weight: 800; }
.hcs-pct     { font-size: .75rem; color: var(--muted); }

.hist-empty  { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; text-align: center; margin: 24px 0; }
.he-icon     { font-size: 3rem; }
.he-text     { color: var(--muted); line-height: 1.6; }

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 480px) {
  .auth-wrap     { padding: 16px 12px; }
  .auth-card     { padding: 24px 20px; }
  .note-display  { padding: 20px 24px; }
  .options-grid  { grid-template-columns: 1fr; }
  .nd-root, .nd-target { font-size: 2.2rem; }
  .profile-card  { flex-direction: column; align-items: center; text-align: center; }
  .pc-stats      { justify-content: center; }
  .trail-node    { gap: 12px; }
  .node-bubble   { width: 56px; height: 56px; min-width: 56px; }
}

@media (max-width: 380px) {
  .options-grid  { grid-template-columns: 1fr; }
  .btn-play      { padding: 14px 24px; font-size: .95rem; }
}

/* ======================================================
   PAIR TRAINING — dashboard.php + train.php
   ====================================================== */

/* Dashboard: par labels nos cards */
.nc-pair-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}
.npl-tag {
  font-size: .78rem;
  font-weight: 700;
  color: var(--purple3);
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 50px;
  padding: 3px 10px;
}
.npl-vs {
  font-size: .75rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---- Intro em dois cards lado a lado ---- */
.intro-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin-top: -4px;
  margin-bottom: 8px;
}

.pair-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  margin: 4px 0 16px;
}
@media (max-width: 560px) {
  .pair-intro-grid { grid-template-columns: 1fr; }
}

.pi-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
}
.pi-card-a { border-color: rgba(124,58,237,.35); }
.pi-card-b { border-color: rgba(34,197,94,.25); }

.pi-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pi-icon  { font-size: 2rem; }
.pi-name  { font-size: 1rem; font-weight: 900; }
.pi-semitons {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .03em;
}

.pi-desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
}

.pi-notes {
  font-size: .82rem;
  font-weight: 700;
  color: var(--purple3);
  background: rgba(124,58,237,.12);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  letter-spacing: .02em;
}

.pi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(124,58,237,.2);
  border: 1.5px solid rgba(124,58,237,.4);
  border-radius: 50px;
  color: var(--purple3);
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.pi-btn:hover:not(:disabled) { background: rgba(124,58,237,.35); transform: translateY(-1px); }
.pi-btn:disabled { opacity: .6; cursor: not-allowed; }

.pi-hook {
  font-size: .78rem;
  color: var(--yellow);
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.45;
}

/* ---- Opções para par (2 botões grandes) ---- */
.options-pair {
  grid-template-columns: 1fr 1fr !important;
}
.option-pair-btn {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  text-align: center;
  gap: 8px;
  min-height: 88px;
}
.ob-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 900;
  flex-shrink: 0;
}
.ob-name {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.3;
}
.opt-correct .ob-letter { background: var(--green); color: #fff; }
.opt-wrong   .ob-letter { background: var(--red);   color: #fff; }

@media (max-width: 380px) {
  .options-pair { grid-template-columns: 1fr !important; }
  .option-pair-btn { flex-direction: row; min-height: 60px; }
}

/* ---- Comparação de sons (ao errar) ---- */
.fp-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 4px;
}
.fp-cmp-label {
  font-size: .82rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.fp-cmp-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fp-cmp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 12px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.fp-cmp-btn:disabled { opacity: .5; cursor: not-allowed; }
.fp-cmp-btn:not(:disabled):hover { transform: translateY(-1px); }
.fp-cmp-correct {
  background: rgba(34,197,94,.18);
  border: 1.5px solid rgba(34,197,94,.4);
  color: #86efac;
}
.fp-cmp-correct:not(:disabled):hover { background: rgba(34,197,94,.28); }
.fp-cmp-wrong {
  background: rgba(239,68,68,.18);
  border: 1.5px solid rgba(239,68,68,.4);
  color: #fca5a5;
}
.fp-cmp-wrong:not(:disabled):hover { background: rgba(239,68,68,.28); }
.fp-cmp-icon { font-size: .95rem; }

/* ---- Seções extras (escalas, acordes) no dashboard ---- */
.extra-section {
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 0 16px;
}
.extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.extra-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.extra-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(124,58,237,.25);
}
.ec-icon { font-size: 1.6rem; }
.ec-name { font-size: 1rem; font-weight: 800; }
.ec-desc { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.ec-cta  {
  margin-top: 6px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--purple3);
}

/* =====================================================
   Bottom Navigation + Tab system
   ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.bn-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  transition: color .18s;
  position: relative;
}
.bn-tab::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--purple2);
  border-radius: 0 0 2px 2px;
  transition: width .2s;
}
.bn-tab.bn-active { color: var(--purple3); }
.bn-tab.bn-active::before { width: 32px; }
.bn-icon { font-size: 1.35rem; line-height: 1; }
.bn-label { font-size: .68rem; font-weight: 800; letter-spacing: .02em; }

/* Push content above fixed nav */
.dash-body { padding-bottom: 80px; }
.tab-panel { animation: tabFadeIn .22s ease; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Extra-card improvements */
.ec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ec-dif {
  font-size: .68rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 50px;
}
.ec-dif-iniciante    { background: rgba(34,197,94,.15); color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.ec-dif-intermediário { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.ec-dif-avançado      { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* ===========================
   MODO DIGITAÇÃO (text mode)
   =========================== */
.exercise-hint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.mode-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  color: var(--muted);
  font-size: 1.1rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.mode-toggle:hover { background: rgba(124,58,237,.25); color: var(--purple3); }
.tm-hint {
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 10px;
  padding: 6px 12px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}
.tm-row {
  display: flex;
  gap: 8px;
}
.tm-input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color .18s;
}
.tm-input:focus {
  border-color: var(--purple2);
  background: rgba(124,58,237,.08);
}
.tm-btn {
  padding: 14px 20px;
  background: var(--purple);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s;
}
.tm-btn:hover { background: var(--purple2); }
@keyframes tmShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.tm-shake { animation: tmShake .4s ease; border-color: var(--red) !important; }

/* ===========================
   TELA DE REVISÃO DE ERROS
   =========================== */
.review-area {
  flex-direction: column;
  align-items: stretch;
  padding: 24px 16px 32px;
  gap: 20px;
}
.rv-header {
  text-align: center;
  padding-bottom: 4px;
}
.rv-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.rv-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}
.rv-sub {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
}
.rv-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-card {
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.rv-card-num {
  font-size: .75rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rv-card-diff {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 700;
}
.rv-wrong-name   { color: var(--red); }
.rv-arrow        { color: var(--muted); }
.rv-correct-name { color: var(--green); }
.rv-cmp-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rv-play-btn {
  flex: 1;
  min-width: 120px;
}
.rv-continue {
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   Dashboard v6 — Daily banner, Leaderboard, Avatar header
   ═══════════════════════════════════════════ */

/* Header avatar */
.dh-avatar-link { display: flex; align-items: center; }
.dh-avatar-img {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(124,58,237,.5);
}
.dh-avatar-init {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #9f67ff);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 900; color: #fff;
}

/* Profile card avatar clickable */
.pc-avatar-link { text-decoration: none; }
.pc-avatar-link .pc-avatar { cursor: pointer; transition: opacity .18s; }
.pc-avatar-link .pc-avatar:hover { opacity: .85; }

/* Daily training banner */
.daily-banner-wrap { padding: 0 16px 16px; max-width: 760px; margin: 0 auto; }
.daily-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  text-decoration: none; color: inherit;
  transition: all .18s;
}
.daily-banner.daily-pulse {
  background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(99,102,241,.14));
  border: 1.5px solid rgba(124,58,237,.45);
}
.daily-banner.daily-pulse:hover {
  background: linear-gradient(135deg, rgba(124,58,237,.32), rgba(99,102,241,.22));
  border-color: rgba(124,58,237,.7);
}
.daily-banner.daily-done {
  background: rgba(34,197,94,.08);
  border: 1.5px solid rgba(34,197,94,.25);
}
.daily-banner.daily-locked {
  background: rgba(255,255,255,.03);
  border: 1.5px solid rgba(255,255,255,.07);
  opacity: .65; cursor: not-allowed;
}
.daily-icon { font-size: 1.8rem; flex-shrink: 0; }
.daily-text { flex: 1; }
.daily-text strong { display: block; font-size: .95rem; font-weight: 900; margin-bottom: 2px; }
.daily-text span   { font-size: .78rem; color: var(--muted); }
.daily-arrow { font-size: 1.2rem; color: var(--purple3); }

/* Mini leaderboard */
.mini-lb-wrap {
  max-width: 760px; margin: 0 auto 16px;
  padding: 0 16px;
}
.mini-lb-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .08em; color: var(--purple3); margin-bottom: 10px;
}
.mini-lb-more { font-size: .72rem; color: var(--muted); text-decoration: none; font-weight: 700; }
.mini-lb-more:hover { color: var(--purple3); }
.mini-lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 6px;
}
.mini-lb-row.mini-lb-me { border-color: rgba(124,58,237,.35); background: rgba(124,58,237,.06); }
.mini-lb-pos { font-size: .85rem; width: 24px; text-align: center; flex-shrink: 0; }
.mini-lb-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #9f67ff);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; color: #fff; overflow: hidden;
}
.mini-lb-av img { width: 100%; height: 100%; object-fit: cover; }
.mini-lb-name { flex: 1; font-size: .82rem; font-weight: 700; }
.mini-lb-xp   { font-size: .8rem; font-weight: 900; color: var(--purple3); }
