/* Rasante: identidade, lobby em tela cheia e tela de VS (carregado depois do style.css) */
:root {
  --p1: #22d3c5;
  --p1-soft: rgba(34, 211, 197, 0.18);
  --p2: #ff5fa2;
  --p2-soft: rgba(255, 95, 162, 0.18);
  --gold: #ffb547;
  --gold-deep: #ff8a1f;
  --ink: #1d1203;
}

body {
  background: var(--bg);
}

/* ---------- Marca ---------- */
.brand-icon { flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(34, 211, 197, 0.45)); }
.brand-title {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff3cf, var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-duel-badge,
.cta-sm-btn,
.primary-sm-btn { color: var(--ink) !important; }

/* ---------- Cores dos jogadores ---------- */
.p1-tag { background: var(--p1-soft); color: var(--p1); border-color: rgba(34, 211, 197, 0.45); }
.p2-tag { background: var(--p2-soft); color: var(--p2); border-color: rgba(255, 95, 162, 0.45); }
.p1-dot { background: var(--p1); box-shadow: 0 0 8px var(--p1); }
.p2-dot { background: var(--p2); box-shadow: 0 0 8px var(--p2); }
.fighter-card.p1.leading { border-color: rgba(34, 211, 197, 0.6); box-shadow: inset 0 0 0 1px rgba(34, 211, 197, 0.2), 0 0 24px rgba(34, 211, 197, 0.15); }
.fighter-card.p2.leading { border-color: rgba(255, 95, 162, 0.6); box-shadow: inset 0 0 0 1px rgba(255, 95, 162, 0.2), 0 0 24px rgba(255, 95, 162, 0.15); }
.score-value, .live-multiplier, .crashed-multiplier, .countdown-timer, .podium-pts {
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.live-multiplier { color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 0 32px rgba(255, 181, 71, 0.6); }
.crashed-banner { font-family: 'Fredoka', 'Nunito', sans-serif; letter-spacing: 0.04em; }

/* ---------- Lobby em tela cheia ---------- */
.lobby-screen {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(6, 20, 36, 0.25) 0%, rgba(6, 20, 36, 0.05) 45%, rgba(6, 20, 36, 0.55) 100%),
    url('/img/ceu_lobby.jpg') center bottom / cover no-repeat,
    #1f6f8b;
  backdrop-filter: none;
  animation: lobby-in 0.45s ease-out;
}
@keyframes lobby-in { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }

.lobby-clouds { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lobby-clouds span {
  position: absolute;
  width: 220px; height: 70px;
  background: rgba(255, 252, 246, 0.7);
  border-radius: 999px;
  filter: blur(2px);
  animation: cloud-drift linear infinite;
}
.lobby-clouds span::before, .lobby-clouds span::after {
  content: ''; position: absolute; background: inherit; border-radius: 50%;
}
.lobby-clouds span::before { width: 110px; height: 110px; left: 30px; top: -50px; }
.lobby-clouds span::after { width: 80px; height: 80px; left: 115px; top: -32px; }
.lobby-clouds span:nth-child(1) { top: 12%; animation-duration: 48s; animation-delay: -8s; transform: scale(0.8); }
.lobby-clouds span:nth-child(2) { top: 38%; animation-duration: 70s; animation-delay: -30s; opacity: 0.6; }
.lobby-clouds span:nth-child(3) { top: 62%; animation-duration: 38s; animation-delay: -20s; transform: scale(1.2); }
.lobby-clouds span:nth-child(4) { top: 24%; animation-duration: 90s; animation-delay: -60s; opacity: 0.45; transform: scale(0.6); }
@keyframes cloud-drift { from { left: 105%; } to { left: -30%; } }

.lobby-close { position: absolute; top: 16px; right: 16px; z-index: 3; }

.lobby-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: center;
}

.lobby-hero { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.lobby-logo {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff4d6;
  background: linear-gradient(180deg, #fffaf0 0%, #ffd27a 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #7a3a0c) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  transform: rotate(-3deg);
}
.lobby-tagline {
  margin-top: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.lobby-plane {
  width: min(460px, 100%);
  height: auto;
  aspect-ratio: 520 / 360;
  margin: 4px 0 6px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.25));
}

.pilot-card {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  text-align: left;
  border-radius: 18px;
  background: rgba(10, 28, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.lobby-panel.modal-card {
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  background: rgba(10, 28, 48, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.lobby-screen .mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lobby-screen .mode-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px;
  border-radius: 16px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.lobby-screen .mode-tab .tab-ico { font-size: 1.7rem; line-height: 1; }
.lobby-screen .mode-tab:hover { transform: translateY(-2px); }
.lobby-screen .mode-tab.active {
  background: linear-gradient(180deg, rgba(255, 181, 71, 0.28), rgba(255, 138, 31, 0.12));
  border-color: var(--gold);
  color: #fff;
}

.lobby-screen .cta-btn {
  background: linear-gradient(180deg, #ffd27a, var(--gold) 45%, var(--gold-deep));
  color: var(--ink);
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 16px;
  padding: 16px;
  border: none;
  box-shadow: 0 5px 0 #a8500e, 0 12px 24px rgba(255, 138, 31, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.lobby-screen .cta-btn:hover { transform: translateY(-1px); }
.lobby-screen .cta-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #a8500e, 0 4px 10px rgba(255, 138, 31, 0.3); }

.lobby-screen .diff-card { border-radius: 16px; }
.lobby-screen .diff-card.active { border-color: var(--gold); background: rgba(255, 181, 71, 0.14); }
.lobby-screen .seg-btn.active { background: var(--gold); color: var(--ink); }

@media (max-width: 860px) {
  .lobby-layout { grid-template-columns: 1fr; gap: 16px; padding: 56px 16px 24px; }
  .lobby-plane { width: min(320px, 80%); margin: 0; }
  .lobby-screen .mode-tab { padding: 10px 4px; font-size: 0.95rem; }
}

/* ---------- Tela de VS ---------- */
.versus-splash {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
}
.vs-side {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 0 6vw;
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.vs-side strong { font-size: clamp(1.6rem, 5vw, 3.4rem); color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); overflow-wrap: anywhere; }
.vs-side .slot-tag { align-self: flex-start; font-size: 1rem; padding: 4px 12px; }
.vs-p1 { align-items: flex-start; background: linear-gradient(100deg, #0c8f86 0%, #22d3c5 70%, rgba(34, 211, 197, 0) 100%); }
.vs-p2 { align-items: flex-end; text-align: right; background: linear-gradient(260deg, #b4256a 0%, #ff5fa2 70%, rgba(255, 95, 162, 0) 100%); }
.vs-p2 .slot-tag { align-self: flex-end; }
.vs-p1 .slot-tag, .vs-p2 .slot-tag { background: rgba(0, 0, 0, 0.25); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.vs-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 8px; }
.vs-badge {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: clamp(3.5rem, 10vw, 7rem);
  color: #fff4d6;
  -webkit-text-stroke: 3px #7a3a0c;
  text-shadow: 0 6px 0 #7a3a0c, 0 0 40px rgba(255, 181, 71, 0.8);
}
.vs-mid small { font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); white-space: nowrap; }

.versus-splash.show .vs-p1 { animation: vs-left 0.42s cubic-bezier(.2, 1.4, .4, 1) both; }
.versus-splash.show .vs-p2 { animation: vs-right 0.42s cubic-bezier(.2, 1.4, .4, 1) both; }
.versus-splash.show .vs-mid { animation: vs-pop 0.5s 0.25s cubic-bezier(.2, 1.6, .4, 1) both; }
.versus-splash.leave { transition: opacity 0.45s ease; opacity: 0; }
@keyframes vs-left { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes vs-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes vs-pop { from { transform: scale(2.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 600px) {
  .versus-splash { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; }
  .vs-side { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-clouds span, .versus-splash.show * { animation: none !important; }
}

/* Palco ocupa toda a altura livre (antes sobrava uma faixa vazia) */
.stage-wrapper { height: auto; min-height: 360px; background: #1f6f8b; }
@media (max-width: 860px) { .stage-wrapper { min-height: 300px; } }
#aviator-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-shell { height: 100vh; min-height: 640px; grid-template-rows: auto auto minmax(300px, 1fr) auto; }
@media (max-width: 860px) { .app-shell { height: auto; } .stage-wrapper { height: 56vh; } }

/* Troféu 3D do pódio */
.trophy-3d { display: block; width: 170px; height: 170px; margin: -10px auto -6px; filter: drop-shadow(0 12px 20px rgba(255, 181, 71, 0.45)); }

/* ---------- Ícones (sprite Lucide em /icons.svg) ---------- */
.ico { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex-shrink: 0; stroke-width: 2.2; }
button .ico, h2 .ico, h4 .ico { margin-right: 0.15em; }
.icon-btn .ico, .primary-sm-btn .ico { width: 18px; height: 18px; margin: 0; }
.primary-sm-btn { display: inline-flex; align-items: center; gap: 6px; }
#btn-fair { display: inline-flex; align-items: center; gap: 6px; color: var(--p1); }
#sound-icon { display: inline-flex; }
.crown-badge { color: var(--gold); display: inline-flex; }
.crown-badge .ico { width: 16px; height: 16px; fill: rgba(255, 181, 71, 0.35); }
.overtime-badge .ico, .countdown-label .ico { color: var(--gold); fill: rgba(255, 181, 71, 0.4); }
.status-pill .ico, .target-hint .ico { width: 1em; height: 1em; vertical-align: -0.15em; }
.status-pill.flying .ico { color: #ff8a3d; }
.stage-seed-pill .ico { width: 12px; height: 12px; }
.close-modal-btn { display: inline-flex; align-items: center; justify-content: center; }
.close-modal-btn .ico { width: 20px; height: 20px; margin: 0; }
.lobby-screen .mode-tab .tab-ico { display: inline-flex; color: var(--gold); }
.lobby-screen .mode-tab .tab-ico .ico { width: 1em; height: 1em; }
.lobby-screen .mode-tab:not(.active) .tab-ico { color: #8fd9ff; }
.diff-emoji { display: inline-flex; font-size: 1.5rem; }
.diff-emoji .ico { width: 1em; height: 1em; }
.diff-card[data-diff="conservative"] .diff-emoji { color: #5cc8ff; }
.diff-card[data-diff="tactical"] .diff-emoji { color: #ff8fd0; }
.diff-card[data-diff="kamikaze"] .diff-emoji { color: #ff8a3d; }
.online-box h4 .ico { color: var(--gold); }
.tele-status-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--p2); }
.tele-status-icon .ico { width: 60%; height: 60%; }
.tele-chute { width: 80%; height: 80%; object-fit: contain; }
.round-dot .ico { width: 11px; height: 11px; vertical-align: -1px; }
.podium-trophy { display: flex; justify-content: center; color: var(--gold); }
.podium-trophy .ico { width: 72px; height: 72px; stroke-width: 1.6; fill: rgba(255, 181, 71, 0.25); }
.podium-trophy .ico-crash { color: var(--p2); fill: rgba(255, 95, 162, 0.2); transform: rotate(135deg); }
.fair-verify-result .ico { width: 1em; height: 1em; }
.fair-verify-result.ok .ico { color: #2ecc71; }
.fair-verify-result.fail .ico { color: #ff5f6d; }
.podium-table .ico { width: 12px; height: 12px; color: var(--gold); }

/* Aviso "Ambos sacaram": fundo escuro para ler sobre o céu claro */
.live-sub-pill { background: rgba(10, 28, 48, 0.88); border-color: rgba(46, 204, 113, 0.7); color: #5ef0a0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
