:root {
  --primary: #6c5ce7;
  --primary-dark: #5143c4;
  --soft: #f0edff;
  --accent: #ffb703;
  --success: #20bf6b;
  --danger: #eb4d4b;
  --ink: #29263a;
  --muted: #6f6b7d;
  --surface: #ffffff;
  --bg: #f7f5ff;
  --border: #e8e4f4;
  --shadow: 0 18px 50px rgba(68, 53, 125, .12);
  --radius: 26px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; color: var(--ink); background: radial-gradient(circle at 10% 0%, #fff4cc 0, transparent 28%), radial-gradient(circle at 90% 10%, #e3dcff 0, transparent 30%), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 12px clamp(18px, 4vw, 56px); background: rgba(247,245,255,.9); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(232,228,244,.8); }
.brand { border: 0; background: transparent; display: flex; gap: 10px; align-items: center; color: var(--ink); text-align: left; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 25px; font-weight: 900; box-shadow: 0 9px 20px rgba(108,92,231,.28); }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.app-shell { width: min(1180px, calc(100% - 28px)); margin: 28px auto; min-height: calc(100vh - 180px); }
.card { background: rgba(255,255,255,.94); border: 1px solid rgba(232,228,244,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero { display: grid; grid-template-columns: 1.3fr .7fr; min-height: 430px; overflow: hidden; }
.hero-copy { padding: clamp(32px, 7vw, 78px); align-self: center; }
.eyebrow { display: inline-flex; background: var(--soft); color: var(--primary-dark); padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 22px 0 18px; letter-spacing: -2px; }
.hero p { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 680px; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { border: 0; border-radius: 16px; min-height: 50px; padding: 0 20px; font-weight: 800; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(108,92,231,.27); }
.btn-soft { background: var(--soft); color: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: #fff0f0; color: var(--danger); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.hero-visual { position: relative; min-height: 330px; background: linear-gradient(145deg, #6c5ce7, #8e7cff); }
.bubble { position: absolute; display: grid; place-items: center; background: #fff; border-radius: 28px; font-weight: 900; box-shadow: 0 20px 40px rgba(35,27,77,.2); }
.bubble-a { width: 120px; height: 120px; top: 55px; left: 20%; font-size: 70px; color: #ff6b6b; transform: rotate(-8deg); }
.bubble-5 { width: 105px; height: 105px; right: 13%; bottom: 45px; font-size: 62px; color: #20bf6b; transform: rotate(8deg); }
.mascot { position: absolute; left: 43%; top: 47%; font-size: 80px; color: var(--accent); filter: drop-shadow(0 12px 12px rgba(0,0,0,.16)); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.feature { padding: 26px; }
.feature span { font-size: 40px; }
.feature h2 { margin: 12px 0 8px; font-size: 21px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.55; }
.panel { max-width: 760px; margin: 0 auto; padding: clamp(24px,5vw,48px); }
.panel.wide { max-width: 1100px; }
.panel h1 { font-size: clamp(32px,5vw,52px); }
.panel h2 { font-size: 28px; margin: 0 0 8px; }
.panel-subtitle { color: var(--muted); margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--ink); outline: 0; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--soft); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.checkbox input { margin-top: 3px; }
.dashboard-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.profile-grid, .category-grid, .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.profile-card, .category-card, .stat-card { padding: 22px; text-align: left; }
.profile-card { border: 2px solid transparent; background: #fff; border-radius: 22px; box-shadow: 0 12px 28px rgba(68,53,125,.09); }
.profile-card:hover { border-color: var(--primary); }
.avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: var(--soft); font-size: 38px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.category-card { border: 0; border-radius: 22px; color: var(--ink); min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; }
.category-card span { font-size: 48px; }
.category-card strong { font-size: 22px; }
.category-card small { color: var(--muted); }
.game-wrap { max-width: 980px; margin: 0 auto; }
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.progress { height: 14px; flex: 1; background: #eae5fb; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,var(--primary),#9b88ff); transition: width .3s; }
.question-card { padding: clamp(24px,5vw,52px); text-align: center; }
.speaker { width: 68px; height: 68px; border-radius: 24px; border: 0; background: var(--soft); font-size: 30px; }
.question-title { font-size: clamp(28px,4vw,48px); margin: 18px 0 28px; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.answer { min-height: 150px; border: 3px solid transparent; border-radius: 26px; background: #fff; box-shadow: 0 12px 28px rgba(68,53,125,.1); font-size: clamp(42px,9vw,86px); font-weight: 900; color: var(--ink); }
.answer:hover { border-color: var(--primary); }
.answer.correct { background: #eafff3; border-color: var(--success); color: #137d48; }
.answer.wrong { background: #fff1f1; border-color: var(--danger); animation: shake .25s linear; }
.feedback-line { min-height: 36px; margin-top: 20px; font-size: 20px; font-weight: 800; }
.result { text-align: center; padding: 50px; }
.result .big-star { font-size: 100px; }
.stat-card strong { display: block; font-size: 30px; }
.stat-card small { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--primary-dark); font-size: 12px; font-weight: 800; }
.empty { padding: 36px; text-align: center; border: 2px dashed var(--border); border-radius: 20px; color: var(--muted); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 14px 18px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow); transition: .25s; max-width: calc(100% - 30px); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast.success { background: #146b43; }
.toast.error { background: #9f2b2b; }
.footer { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 24px; color: var(--muted); font-size: 13px; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 260px; }
  .features-grid, .profile-grid, .category-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}
@media (max-width: 540px) {
  .app-shell { width: min(100% - 18px, 1180px); margin-top: 12px; }
  .topbar { padding: 10px 14px; }
  .brand small { display: none; }
  .hero-copy { padding: 28px 22px; }
  h1 { letter-spacing: -1px; }
  .features-grid, .profile-grid, .category-grid, .stats-grid { grid-template-columns: 1fr; }
  .answers { grid-template-columns: 1fr 1fr; gap: 10px; }
  .answer { min-height: 110px; border-radius: 20px; }
  .dashboard-head { flex-direction: column; }
  .top-actions .btn span { display: none; }
}

/* Voz natural ElevenLabs */
.admin-head-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.voice-layout { display: grid; gap: 18px; margin-top: 20px; }
.voice-section { padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.voice-section h2 { margin-bottom: 6px; }
.voice-status { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; border-radius: 20px; background: #fff7e5; border: 1px solid #f4dfac; }
.voice-status.ready { background: #eafff3; border-color: #bcebd2; }
.voice-status h2 { margin: 10px 0 5px; }
.voice-status p { margin: 0; color: var(--muted); word-break: break-word; }
.voice-status-dot { flex: 0 0 auto; display: inline-flex; padding: 8px 12px; border-radius: 999px; background: #fff; font-weight: 900; color: var(--danger); }
.voice-status.ready .voice-status-dot { color: #137d48; }
.voice-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.voice-preview-card { display: grid; gap: 13px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg,#fff,#faf8ff); }
.voice-preview-card h3 { margin: 0; font-size: 18px; }
.voice-preview-card audio, .voice-player { width: 100%; }
.voice-number { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 999px; background: var(--soft); color: var(--primary-dark); font-size: 12px; font-weight: 900; }
.voice-player { margin-top: 14px; }
@media (max-width: 820px) {
  .voice-preview-grid { grid-template-columns: 1fr; }
  .voice-status { align-items: flex-start; flex-direction: column; }
  .admin-head-actions { justify-content: flex-start; }
}

/* Controle global de voz GS Fluxo */
.voice-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.voice-section-head h2 { margin-bottom: 6px; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.45; }
.range-label { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.range-label strong { display: inline-flex; min-width: 64px; justify-content: center; padding: 7px 10px; border-radius: 999px; background: var(--soft); color: var(--primary-dark); }
.field input[type="range"] { min-height: 34px; padding: 0; border: 0; box-shadow: none; accent-color: var(--primary); }
.field input[type="range"]:focus { box-shadow: none; }
.rate-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.voice-preset-row { display: flex; flex-wrap: wrap; gap: 9px; }
.voice-preset-row .btn { min-height: 42px; padding: 0 14px; }
@media (max-width: 620px) {
  .voice-section { padding: 18px; }
  .voice-section-head { flex-direction: column; }
  .voice-preset-row .btn { flex: 1 1 calc(50% - 9px); }
}
