/* Estilo "jogo de sinuca": feltro verde, madeira, dourado e botões 3D brilhantes. */
:root {
  color-scheme: dark;
  --bg-top: #123a66;
  --bg: #0a2540;
  --bg-deep: #061629;
  --panel: linear-gradient(180deg, #14406f 0%, #0c2b4d 100%);
  --panel-border: #2b6cb0;
  --text: #ffffff;
  --muted: #9cc2ea;
  --gold: #ffd23f;
  --gold-dark: #b8860b;
  --felt: #1e8a3e;
  --felt-dark: #0d4d22;
  --wood: #6b3410;
  --wood-dark: #3b1a06;
  --green-btn: #5fd13b;
  --green-btn-dark: #2c8a17;
  --blue-btn: #3fa9ff;
  --blue-btn-dark: #1559b8;
  --danger: #ff4d4d;
  --display: "Lilita One", "Outfit", system-ui, sans-serif;
  --body: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-top), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .95rem; }
.label {
  font-family: var(--display); font-weight: 400; font-size: 1rem; letter-spacing: .04em;
  color: var(--gold); margin: 0 0 .5rem; text-shadow: 0 2px 0 rgba(0,0,0,.45);
}

/* ---------- Botões 3D ---------- */
.primary, .ghost {
  font-family: var(--display); letter-spacing: .03em;
  border-radius: 14px; padding: .65rem 1.2rem;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
  transition: transform .08s ease, filter .15s ease, box-shadow .08s ease;
}
.primary {
  background: linear-gradient(180deg, #8ff06a 0%, var(--green-btn) 45%, #3fae22 100%);
  box-shadow: 0 5px 0 var(--green-btn-dark), 0 8px 18px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.45);
  font-size: 1.15rem;
}
.ghost {
  background: linear-gradient(180deg, #6cc0ff 0%, var(--blue-btn) 45%, #2a86e8 100%);
  box-shadow: 0 4px 0 var(--blue-btn-dark), 0 6px 14px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.4);
}
.primary:hover, .ghost:hover { filter: brightness(1.08); }
.primary:active, .ghost:active, .ghost-danger:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-btn-dark), inset 0 2px 0 rgba(255,255,255,.3); }
.ghost:active { box-shadow: 0 0 0 var(--blue-btn-dark), inset 0 2px 0 rgba(255,255,255,.3); }
.ghost-danger {
  font-family: var(--display); letter-spacing: .03em;
  border-radius: 14px; padding: .65rem 1.2rem;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
  transition: transform .08s ease, filter .15s ease, box-shadow .08s ease;
  background: linear-gradient(180deg, #ff7b7b 0%, #e04040 45%, #b82020 100%);
  box-shadow: 0 4px 0 #8a1010, 0 6px 14px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.35);
  display: inline-flex; align-items: center; gap: .45rem;
}
.ghost-danger:hover { filter: brightness(1.08); }
.ghost-danger:active { box-shadow: 0 0 0 #8a1010, inset 0 2px 0 rgba(255,255,255,.3); }
.icon { padding: .55rem .7rem; }
.ghost { display: inline-flex; align-items: center; gap: .45rem; }

/* Ícones próprios: traço branco grosso com contorno azul-escuro, no estilo das letras */
.ico { width: 24px; height: 24px; flex: none; overflow: visible; filter: drop-shadow(0 2px 0 rgba(4,30,80,.45)); }
.ico use { stroke-linecap: round; stroke-linejoin: round; }
.ico-out { fill: #0b3f8f; stroke: #0b3f8f; stroke-width: 6; }
.ico-in { fill: #ffffff; stroke: #ffffff; stroke-width: 2.6; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Topo ---------- */
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1.25rem;
  background: linear-gradient(180deg, #1b5594 0%, #0f3561 100%);
  border-bottom: 3px solid #072040;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.brand { margin: 0; line-height: 0; }
.brand a { display: inline-block; border-radius: 12px; transition: transform .15s ease; }
.brand a:hover { transform: scale(1.04) rotate(-1deg); }
.logo { height: 48px; width: auto; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.tabs {
  display: flex; gap: .25rem; padding: .3rem; border-radius: 16px;
  background: rgba(0,0,0,.3); box-shadow: inset 0 2px 6px rgba(0,0,0,.4);
}
.tab {
  font-family: var(--display); letter-spacing: .03em; background: transparent;
  color: var(--muted); padding: .5rem 1rem; border-radius: 12px;
}
.tab.active {
  color: #3b2a00; text-shadow: 0 1px 0 rgba(255,255,255,.5);
  background: linear-gradient(180deg, #ffe680 0%, var(--gold) 50%, #f0b400 100%);
  box-shadow: 0 3px 0 var(--gold-dark), inset 0 2px 0 rgba(255,255,255,.6);
}
.actions { margin-left: auto; display: flex; gap: .6rem; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem;
  padding: 1.5rem; max-width: 1240px; margin: 0 auto;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; padding: 1rem; } }

/* Mesa de sinuca: feltro + trilho de madeira */
.stage {
  position: relative; padding: 2rem 1.5rem 1.5rem; border-radius: 28px;
  display: flex; justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.14), transparent 55%),
    repeating-radial-gradient(circle at 30% 30%, rgba(0,0,0,.035) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, var(--felt) 0%, #157034 55%, var(--felt-dark) 100%);
  border: 18px solid var(--wood);
  box-shadow:
    inset 0 0 0 3px #2a1204,
    inset 0 10px 30px rgba(0,0,0,.45),
    0 0 0 3px #8a4b1c,
    0 14px 40px rgba(0,0,0,.55);
}
.stage::before {
  /* veios da madeira no trilho */
  content: ""; position: absolute; inset: -18px; border-radius: 28px; pointer-events: none;
  border: 18px solid transparent;
  background: repeating-linear-gradient(100deg, rgba(255,255,255,.06) 0 3px, transparent 3px 11px) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0) border-box;
          mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0) border-box;
}
.view { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }

/* ---------- Roleta ---------- */
.wheel-wrap { position: relative; width: min(100%, 560px); aspect-ratio: 1; container-type: inline-size; }
#wheel { width: 100%; height: 100%; display: block; cursor: pointer; }

/* Botão central = bola 8 */
.spin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 17%; aspect-ratio: 1; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #6a6a6a 0%, #1a1a1a 38%, #000 75%);
  box-shadow: 0 6px 14px rgba(0,0,0,.6), inset -6px -8px 14px rgba(0,0,0,.6), inset 4px 5px 10px rgba(255,255,255,.12);
  transition: transform .15s ease;
}
.spin span {
  width: 64%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #fff 0%, #f1f1f1 60%, #d6d6d6 100%);
  color: #111; font-family: var(--display); font-size: 3.4cqw; letter-spacing: .02em;
}
.spin:hover { transform: translate(-50%, -50%) scale(1.06); }
.spin:active { transform: translate(-50%, -50%) scale(.96); }
.spin:disabled { cursor: default; transform: translate(-50%, -50%); }
.spin:not(:disabled) { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,.6), 0 0 0 0 rgba(255,210,63,.55), inset -6px -8px 14px rgba(0,0,0,.6); }
  50% { box-shadow: 0 6px 14px rgba(0,0,0,.6), 0 0 0 12px rgba(255,210,63,0), inset -6px -8px 14px rgba(0,0,0,.6); }
}

.wheel-actions {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: .6rem .8rem; background: rgba(0,0,0,.2); border-radius: 14px;
}
.check {
  display: flex; align-items: center; gap: .6rem; cursor: pointer;
  color: #e6ffe9; font-weight: 700; font-size: .95rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.check input {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px;
  border: 3px solid var(--gold-dark); border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, #1a3a2a, #0d4d22);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 1px 0 rgba(255,210,63,.15);
  position: relative; flex-shrink: 0; transition: border-color .15s, background .15s;
}
.check input:checked {
  background: linear-gradient(145deg, #ffe36e, #ffd23f, #d4a017);
  border-color: #b8860b;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.4), 0 0 10px rgba(255,210,63,.4);
}
.check input:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 9px; height: 15px;
  border: solid #3d1a05; border-width: 0 3.5px 3.5px 0; transform: rotate(40deg);
}
.check input:hover { border-color: var(--gold); }
.timer-setting {
  display: flex; align-items: center; gap: .5rem; cursor: default;
  color: #e6ffe9; font-weight: 700; font-size: .95rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.timer-input {
  width: 3.6rem; text-align: center; padding: .4rem .3rem; border-radius: 10px;
  border: 3px solid var(--gold-dark); background: linear-gradient(135deg, #1a3a2a, #0d4d22);
  color: var(--gold); font-family: var(--display); font-size: 1.1rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 1px 0 rgba(255,210,63,.15);
  transition: border-color .15s;
}
.timer-input:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 0 8px rgba(255,210,63,.3); }
.timer-input::-webkit-inner-spin-button { opacity: 1; }
.timer-display {
  width: min(100%, 440px); text-align: center;
  background: rgba(0,0,0,.35); border-radius: 16px; padding: 1rem;
  border: 2px solid rgba(255,210,63,.25);
}
.timer-who {
  font-family: var(--display); font-size: 1.1rem; color: var(--gold);
  display: block; margin-bottom: .3rem;
}
.timer-clock {
  font-family: var(--display); font-size: 3rem; color: var(--text);
  display: block; line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.timer-display.expired .timer-clock { color: var(--danger); animation: timerPulse 1s ease-in-out infinite; }
.timer-display.expired { border-color: var(--danger); }
@keyframes timerPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Daily bar ---------- */
.daily-bar {
  width: min(100%, 440px); display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,.35); border-radius: 16px; padding: .6rem 1rem;
  border: 2px solid rgba(255,210,63,.25);
}
.daily-bar-left { display: flex; align-items: center; gap: .5rem; }
.daily-bar-label {
  font-family: var(--display); font-size: .85rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.daily-clock {
  font-family: var(--display); font-size: 1.8rem; color: var(--gold);
  font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.daily-clock.over-goal { color: var(--danger); animation: timerPulse 1s ease-in-out infinite; }
.daily-bar.over-goal { border-color: var(--danger); }
.daily-goal-badge {
  font-family: var(--display); font-size: .9rem; color: var(--muted);
}
.daily-finalizar { font-size: .95rem; padding: .5rem 1rem; }
.auto-progress {
  width: min(100%, 440px); text-align: center;
  background: rgba(0,0,0,.3); border-radius: 16px; padding: .8rem 1rem;
  border: 2px solid rgba(255,210,63,.2);
}
.auto-round {
  font-family: var(--display); font-size: 1rem; color: var(--gold); margin: 0 0 .5rem;
  text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.auto-order {
  list-style: none; counter-reset: ao; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .3rem;
}
.auto-order li {
  counter-increment: ao; display: flex; align-items: center; gap: .5rem;
  padding: .35rem .6rem; border-radius: 8px; font-weight: 600; font-size: .95rem;
  background: rgba(0,0,0,.2); animation: slideIn .3s ease-out both;
}
.auto-order li::before {
  content: counter(ao); width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .8rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700);
}
select {
  background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.2); border-radius: 10px;
  padding: .3rem .6rem; color: #fff;
}

/* ---------- Painel lateral ---------- */
.panel {
  padding: 1.25rem; display: flex; flex-direction: column; gap: .8rem; border-radius: 22px;
  background: var(--panel);
  border: 3px solid var(--panel-border);
  box-shadow: 0 8px 0 #072040, 0 14px 30px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.12);
}
textarea {
  width: 100%; resize: vertical; line-height: 1.55; font-size: 1.02rem; color: #fff;
  background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: .8rem; box-shadow: inset 0 3px 8px rgba(0,0,0,.35);
}
textarea:focus { outline: none; border-color: var(--gold); }
.panel-row { display: flex; justify-content: space-between; align-items: center; }
.panel h2 { margin-top: .4rem; }
.daily-log-list {
  list-style: none; counter-reset: dl; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .3rem;
}
.daily-log-list li {
  counter-increment: dl; display: flex; align-items: center; gap: .5rem;
  padding: .45rem .65rem; border-radius: 10px; font-weight: 600; font-size: .95rem;
  background: rgba(0,0,0,.25); animation: slideIn .3s ease-out both;
}
.daily-log-list li::before {
  content: counter(dl); width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .7rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700);
}
.daily-log-list li .dl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-log-list li .dl-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; flex: none; }
.daily-log-list li.dl-active { background: rgba(255,210,63,.15); border: 1px solid rgba(255,210,63,.25); }
.daily-log-list li.dl-active::before {
  background: radial-gradient(circle at 35% 30%, #8ff06a, var(--green-btn) 55%, #2c8a17);
}
.daily-log-list:empty::before { content: "No daily yet"; color: var(--muted); font-size: .95rem; }

/* ---------- Times salvos ---------- */
.teams-section { margin-top: .6rem; }
.teams-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.teams-header .label { margin: 0; }
.teams-save-btn { font-size: .8rem; padding: .35rem .7rem; }
.teams-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.teams-list:empty::before { content: "No saved teams"; color: var(--muted); font-size: .85rem; }
.teams-list li {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .65rem; border-radius: 10px;
  background: rgba(0,0,0,.25); cursor: pointer; transition: background .15s;
}
.teams-list li:hover { background: rgba(255,210,63,.12); }
.team-icon {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .7rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700);
}
.team-info { flex: 1; min-width: 0; }
.team-name { font-weight: 600; font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-count { font-size: .75rem; color: var(--muted); }
.btn-team-del {
  background: none; padding: .15rem .4rem; border-radius: 6px;
  color: var(--muted); opacity: .5; transition: opacity .15s; flex: none;
}
.btn-team-del:hover { opacity: 1; color: var(--danger); }

/* ---------- Resumo da daily ---------- */
.summary-card { padding-top: 3rem; }
.summary-meta {
  text-align: center; margin: .4rem 0 .8rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.2rem;
}
.summary-stat {
  display: flex; flex-direction: column; align-items: center;
}
.summary-stat-val {
  font-family: var(--display); font-size: 1.6rem; line-height: 1;
  color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.summary-stat-val.over { color: var(--danger); }
.summary-stat-val.under { color: var(--green-btn); }
.summary-stat-label { font-size: .75rem; color: var(--muted); }
.summary-actions { display: flex; gap: .6rem; justify-content: center; margin-top: .8rem; }
.summary-actions .ghost, .summary-actions .primary { font-size: 1rem; padding: .6rem 1.4rem; }

/* Modal salvar time */
.team-name-card { padding: 2.8rem 1.5rem 1.5rem; }
.ribbon-sm { font-size: 1.2rem; padding: .35rem 1.6rem; }
.team-name-card .home-input { margin: .6rem 0; }

/* ---------- Team Stats ---------- */
.btn-stats { width: 100%; justify-content: center; font-size: .95rem; margin-top: .4rem; }
.stats-card { padding: 1.5rem 1.5rem 1.5rem; max-height: 85vh; display: flex; flex-direction: column; }
.stats-card .ribbon { position: relative; top: auto; left: auto; translate: none; align-self: center; margin: -.2rem 0 .8rem; }
.stats-card .stats-content { overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
.stats-content { display: flex; flex-direction: column; gap: .8rem; text-align: left; }
.stat-group { background: rgba(0,0,0,.2); border-radius: 14px; padding: .8rem; }
.stat-group-title {
  font-family: var(--display); font-size: .85rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .4rem;
}
.stat-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .3rem 0; font-weight: 600; font-size: .95rem;
}
.stat-row .stat-badge {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .75rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700);
}
.stat-row .stat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .stat-val { font-variant-numeric: tabular-nums; color: var(--gold); font-family: var(--display); }
.stat-highlight {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.2rem;
  margin-bottom: .4rem;
}
.stat-highlight .summary-stat-val { font-size: 1.4rem; }

/* ---------- Daily-active stage ---------- */
.stage.daily-active #wheel-controls { display: none; }
.stage.daily-active #btn-single-spin { display: none; }
.spin.state-next span {
  background: radial-gradient(circle at 40% 35%, #e6ffe9 0%, #b3f0b3 60%, #80d080 100%);
  color: #1a5c1a;
}
#btn-single-spin {
  background: none; font-family: var(--body); font-size: .85rem; font-weight: 600;
  color: var(--muted); padding: .4rem .8rem; margin-top: .3rem;
  border-radius: 10px; transition: color .15s;
}
#btn-single-spin:hover { color: #fff; }
.btn-next {
  width: min(100%, 440px); font-size: 1.4rem; padding: .8rem 2rem;
  text-align: center; justify-content: center;
}
#daily-progress-text {
  font-family: var(--display); font-size: .95rem; letter-spacing: .04em;
}
#legacy-controls { display: contents; }
#legacy-controls.hidden { display: none; }

/* ---------- Modo Daily ---------- */
.daily-current { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.daily-current .label { color: #e6ffe9; }
.daily-name {
  font-family: var(--display); font-size: clamp(2.4rem, 7vw, 4.2rem); margin: 0; line-height: 1.1;
  color: var(--gold); -webkit-text-stroke: 2px #4a3000; paint-order: stroke fill;
  text-shadow: 0 5px 0 #4a3000, 0 10px 20px rgba(0,0,0,.4);
}
.daily-timer {
  font-family: var(--display); font-size: 2.6rem; margin: 0; font-variant-numeric: tabular-nums;
  color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.4);
  background: rgba(0,0,0,.35); padding: .1rem 1.1rem; border-radius: 14px;
}
.daily-timer.over { color: var(--danger); animation: shake .4s ease-in-out infinite; }
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.daily-controls { display: flex; gap: .6rem; margin: .6rem 0; }
.daily-list { width: min(100%, 440px); margin: 0; padding: 0; list-style: none; counter-reset: n; display: flex; flex-direction: column; gap: .45rem; }
.daily-list li {
  counter-increment: n; display: flex; align-items: center; gap: .7rem;
  padding: .55rem .8rem; border-radius: 12px; font-weight: 600;
  background: rgba(0,0,0,.28); border: 2px solid rgba(255,255,255,.08);
}
.daily-list li::before {
  content: counter(n); width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .9rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff, #e8e8e8 60%, #bdbdbd);
}
.daily-list li span.name { flex: 1; }
.daily-list li.current { border-color: var(--gold); background: rgba(255,210,63,.18); }
.daily-list li.current::before { background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700); }
.daily-list li.done { opacity: .5; text-decoration: line-through; }
.daily-list li .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }

/* ---------- Tela do vencedor ---------- */
.modal {
  position: fixed; inset: 0; z-index: 10; padding: 1rem; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at center, rgba(10,37,64,.75), rgba(3,10,20,.92));
  animation: fade .25s ease-out;
}
.modal-rays {
  position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 50%;
  translate: -50% -50%; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255,210,63,.35) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 45%);
          mask: radial-gradient(circle, #000 0%, transparent 45%);
  animation: rays 14s linear infinite;
}
@keyframes rays { to { rotate: 360deg; } }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; text-align: center; max-width: min(92vw, 560px); width: 100%;
  padding: 2.8rem 2rem 2rem; border-radius: 26px;
  background: var(--panel); border: 4px solid var(--gold);
  box-shadow: 0 10px 0 var(--gold-dark), 0 24px 60px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.2);
  animation: pop .55s cubic-bezier(.2, 1.6, .4, 1);
}
.ribbon {
  position: absolute; top: -26px; left: 50%; translate: -50% 0; margin: 0; white-space: nowrap;
  font-family: var(--display); font-size: 1.6rem; letter-spacing: .05em; padding: .45rem 2.2rem;
  color: #fff; text-shadow: 0 3px 0 #7a0d0d;
  background: linear-gradient(180deg, #ff6b6b 0%, #e02828 55%, #b01414 100%);
  border-radius: 12px; box-shadow: 0 5px 0 #6e0909, 0 8px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.4);
}
.modal-name {
  font-family: var(--display); margin: .6rem 0 1.6rem; line-height: 1.05; word-break: break-word;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  background: linear-gradient(180deg, #fff6c2 0%, var(--gold) 45%, #f0a500 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #6b4a00) drop-shadow(0 10px 18px rgba(0,0,0,.45));
}
.modal-card.is-me {
  animation: popMe .7s cubic-bezier(.2, 1.6, .4, 1);
  border-color: #5fd13b;
  box-shadow: 0 10px 0 #2c8a17, 0 0 50px rgba(95,209,59,.4), 0 0 100px rgba(95,209,59,.15),
    0 24px 60px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.2);
}
.modal-card.is-me .ribbon {
  background: linear-gradient(180deg, #5fd13b 0%, #2c8a17 55%, #1a6b0e 100%);
  text-shadow: 0 3px 0 #0d4d0d;
  box-shadow: 0 5px 0 #0a3a0a, 0 8px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.4);
  animation: ribbonPulse 1.2s ease-in-out infinite;
}
@keyframes popMe {
  0% { transform: scale(0.2) rotate(-8deg); opacity: 0; }
  50% { transform: scale(1.12) rotate(2deg); }
  70% { transform: scale(0.95) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes ribbonPulse {
  0%,100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
.modal .primary { font-size: 1.3rem; padding: .75rem 2.4rem; }
.modal-order-list {
  list-style: none; counter-reset: o; margin: .8rem 0 1.4rem; padding: 0;
  display: flex; flex-direction: column; gap: .4rem; text-align: left;
  max-height: 50vh; overflow-y: auto;
}
.modal-order-list li {
  counter-increment: o; display: flex; align-items: center; gap: .65rem;
  padding: .55rem .8rem; border-radius: 12px; font-weight: 700; font-size: 1.1rem;
  background: rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.08);
  animation: slideIn .35s ease-out both;
}
.modal-order-list li::before {
  content: counter(o); width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: .95rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 55%, #c99700);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 20;
  font-family: var(--display); letter-spacing: .03em;
  background: linear-gradient(180deg, #ffe680, var(--gold)); color: #3b2a00;
  padding: .65rem 1.2rem; border-radius: 12px; box-shadow: 0 4px 0 var(--gold-dark), 0 8px 20px rgba(0,0,0,.4);
}
.confetti { position: fixed; top: -14px; z-index: 11; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(900deg); } }

/* ---------- Home / Landing ---------- */
.home {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 2rem 1rem;
}
.home.out {
  position: fixed; inset: 0; z-index: 30;
  animation: homeOut .4s ease-in forwards;
}
@keyframes homeOut {
  to { opacity: 0; pointer-events: none; }
}
.app.entering {
  animation: appIn .4s ease-out .15s both;
}
@keyframes appIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ícones de daily flutuando */
.home-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hfloat {
  position: absolute; color: rgba(255,255,255,.12);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
}
.hf-1 { width: 80px; top: 8%; left: 6%; color: rgba(255,210,63,.18); animation: float1 8s ease-in-out infinite; }
.hf-2 { width: 60px; top: 12%; right: 9%; color: rgba(63,169,255,.2); animation: float2 9s ease-in-out infinite; }
.hf-3 { width: 55px; bottom: 15%; left: 8%; color: rgba(95,209,59,.18); animation: float3 7.5s ease-in-out infinite; }
.hf-4 { width: 100px; bottom: 8%; right: 5%; color: rgba(255,210,63,.14); animation: float1 11s ease-in-out infinite .5s; }
.hf-5 { width: 50px; top: 48%; left: 3%; color: rgba(255,77,77,.16); animation: float2 7s ease-in-out infinite 1s; }
.hf-6 { width: 58px; top: 35%; right: 4%; color: rgba(63,169,255,.16); animation: float3 10s ease-in-out infinite .8s; }
.hf-7 { width: 65px; bottom: 32%; left: 52%; color: rgba(255,210,63,.12); animation: float1 9s ease-in-out infinite 1.5s; }

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-28px) rotate(8deg); }
  66% { transform: translateY(12px) rotate(-5deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-35px) rotate(-10deg) scale(1.04); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(15px, -20px) rotate(12deg); }
  80% { transform: translate(-10px, 10px) rotate(-6deg); }
}

.home-content {
  position: relative; z-index: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  max-width: 800px; width: 100%;
}

/* Logo grande pulsante */
.home-logo {
  animation: logoBounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 12px 40px rgba(42,110,240,.35));
}
.logo-big {
  height: 110px; width: auto; display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
}
@keyframes logoBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-14px) scale(1.04); }
}

.home-tagline {
  font-family: var(--body); font-size: 1.2rem; font-weight: 600;
  color: var(--muted); margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* Cards de ação */
.home-cards {
  display: flex; gap: 1.2rem; align-items: stretch; width: 100%; margin-top: .8rem;
}
.home-card {
  flex: 1; padding: 2rem 1.5rem 1.5rem; border-radius: 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: var(--panel); border: 3px solid var(--panel-border);
  box-shadow: 0 8px 0 #072040, 0 14px 30px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 #072040, 0 20px 40px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.12);
}
.home-card-icon { width: 56px; height: 56px; color: var(--gold); filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.home-card-title {
  font-family: var(--display); font-size: 1.4rem; margin: 0;
  color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.home-card-desc { color: var(--muted); font-size: .95rem; margin: 0 0 .4rem; }

.home-input {
  width: 100%; font-size: 1.1rem; padding: .7rem 1rem;
  background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.15);
  border-radius: 14px; color: #fff; font-family: var(--body);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.35);
  transition: border-color .15s;
}
.home-input:focus { outline: none; border-color: var(--gold); }
.home-input::placeholder { color: rgba(255,255,255,.35); }

.home-btn { width: 100%; margin-top: .3rem; }

.home-divider {
  display: flex; align-items: center; padding: 0 .2rem;
  font-family: var(--display); color: var(--muted); font-size: 1.1rem;
}
.home-divider span {
  background: rgba(0,0,0,.4); padding: .3rem .8rem; border-radius: 10px;
  border: 2px solid rgba(255,255,255,.08);
}

.home-solo {
  background: none; font-family: var(--body); font-size: .95rem; font-weight: 600;
  color: var(--muted); padding: .5rem 1rem; margin-top: .6rem;
  border-radius: 10px; transition: color .15s;
}
.home-solo:hover { color: #fff; }
.home-new-room { margin-top: .2rem; font-size: .9rem; }

/* Home SEO content */
.home-seo {
  max-width: 800px; margin: 2.5rem auto 0; text-align: center;
  border-top: 1px solid rgba(255,255,255,.06); padding-top: 2rem;
}
.home-seo h2 {
  font-family: var(--display); font-size: 1.4rem; color: var(--gold); margin: 0 0 .8rem;
}
.home-seo > p { color: var(--muted); line-height: 1.6; margin: 0 0 1.5rem; font-size: .95rem; }
.home-features {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem; text-align: left;
}
.home-feature {
  background: rgba(0,0,0,.2); border-radius: 14px; padding: 1.2rem;
  border: 1px solid rgba(255,255,255,.06);
}
.home-feature h3 {
  font-family: var(--display); font-size: 1rem; margin: 0 0 .4rem; color: var(--text);
}
.home-feature p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; }

@media (max-width: 640px) {
  .home-cards { flex-direction: column; }
  .home-divider { padding: .2rem 0; }
  .logo-big { height: 80px; }
  .home-tagline { font-size: 1rem; }
  .hf-4 { display: none; }
  .hf-7 { display: none; }
}

/* ---------- Sala ---------- */
.room-create-btn { width: 100%; margin-top: .6rem; }
.room-join-card { padding-top: 3.2rem; }
.room-input {
  width: 100%; font-size: 1.15rem; padding: .75rem 1rem; margin: .6rem 0;
  background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.15);
  border-radius: 14px; color: #fff; font-family: var(--body);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.35);
}
.room-input:focus { outline: none; border-color: var(--gold); }
.room-input::placeholder { color: rgba(255,255,255,.4); }
.room-cancel { width: 100%; margin-top: .2rem; justify-content: center; }

.room-code-big {
  font-family: var(--display); font-size: 2.6rem; letter-spacing: .18em; margin: .4rem 0;
  color: var(--gold); text-shadow: 0 3px 0 rgba(0,0,0,.4);
}
#panel-room { gap: .6rem; display: flex; flex-direction: column; }
.room-header { display: flex; align-items: baseline; gap: .6rem; }
.room-code-badge {
  font-family: var(--display); font-size: 1.3rem; letter-spacing: .12em;
  background: rgba(0,0,0,.35); padding: .25rem .7rem; border-radius: 10px;
  color: var(--gold); border: 2px solid rgba(255,210,63,.3);
}
.room-copy { width: 100%; justify-content: center; font-size: .95rem; }
.room-status { display: flex; justify-content: space-between; align-items: center; }
.room-role {
  font-family: var(--display); font-size: .85rem; letter-spacing: .03em;
  padding: .2rem .6rem; border-radius: 8px;
}
.room-role.master { background: rgba(255,210,63,.2); color: var(--gold); }
.room-role.member { background: rgba(63,169,255,.15); color: var(--blue-btn); }

.room-members {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem;
  max-height: 320px; overflow-y: auto;
}
.room-members li {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .75rem; border-radius: 10px;
  background: rgba(0,0,0,.25); font-weight: 600;
}
.room-members li .dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--green-btn); box-shadow: 0 0 6px rgba(95,209,59,.5);
}
.room-members li .member-name { flex: 1; }
.room-members li .crown { color: var(--gold); display: flex; align-items: center; }
.room-members li .btn-kick {
  background: none; padding: .15rem .4rem; border-radius: 6px; font-size: .75rem;
  color: var(--muted); opacity: .6; transition: opacity .15s;
}
.room-members li .btn-kick:hover { opacity: 1; color: var(--danger); }
.room-members li.observer { opacity: .55; }
.room-members li .dot-off { background: #666; box-shadow: none; }
.tag-observer { font-size: .7rem; color: var(--muted); font-weight: 400; font-style: italic; }
.btn-toggle-obs {
  background: rgba(255,255,255,.08); padding: .15rem .5rem; border-radius: 6px;
  font-size: .72rem; font-weight: 600; color: var(--muted); transition: background .15s;
}
.btn-toggle-obs:hover { background: rgba(255,255,255,.18); color: #fff; }
.room-reset { width: 100%; justify-content: center; font-size: .9rem; }
.room-leave { width: 100%; justify-content: center; margin-top: .6rem; }

/* ---------- Celular ---------- */
@media (max-width: 600px) {
  .topbar { padding: .6rem .75rem; gap: .5rem; }
  .logo { height: 36px; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1; }
  .actions { gap: .4rem; }
  .actions .ghost { padding: .5rem .65rem; font-size: .9rem; }
  .share-text { display: none; }
  .stage { border-width: 10px; padding: 1rem .4rem; border-radius: 20px; }
  .stage::before { inset: -10px; border-width: 10px; border-radius: 20px; }
  .layout { gap: 1.1rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 1.5rem 1rem; font-size: .8rem; color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer nav { display: flex; gap: 1.2rem; justify-content: center; margin-top: .4rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Content pages (privacy, terms, about) ---------- */
.page-content {
  max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 3rem;
  line-height: 1.7; font-size: 1.05rem;
}
.page-content h1 {
  font-family: var(--display); font-size: 2rem; margin: 0 0 .2rem;
  background: linear-gradient(180deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-content h2 {
  font-family: var(--display); font-size: 1.2rem; color: var(--gold);
  margin: 2rem 0 .6rem; letter-spacing: .02em;
}
.page-content p, .page-content li { color: var(--muted); }
.page-content ul, .page-content ol { padding-left: 1.4rem; }
.page-content li { margin-bottom: .4rem; }
.page-content a { color: var(--blue-btn); }
.page-content a:hover { text-decoration: underline; }
.page-content strong { color: var(--text); }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: none; align-items: center; justify-content: center;
  min-height: 90px; margin: 1rem 0;
  border-radius: 12px;
}
.ad-slot:has(ins), .ad-slot:has(iframe) { display: flex; }
.ad-slot-sidebar { min-height: 250px; }
.ad-slot-footer { min-height: 90px; max-width: 728px; margin: 1rem auto; }

@media (prefers-reduced-motion: reduce) {
  .modal-rays, .spin:not(:disabled), .daily-timer.over,
  .hfloat, .home-logo, .home.out, .app.entering { animation: none; }
}
