/* Fake Name of PES: UI estilo seleção de equipas PES 5/6 */

:root {
  --pes-bg-top: #0c1830;
  --pes-bg-bottom: #060c18;
  --pes-glow: rgba(0, 195, 255, 0.14);
  --pes-card: rgba(14, 24, 44, 0.88);
  --pes-card-border: rgba(130, 150, 180, 0.28);
  --pes-bar-top: #3a3a40;
  --pes-bar-bottom: #0c0c10;
  --pes-select: #1565c0;
  --pes-select-bright: #1e88e5;
  --pes-text: #ffffff;
  --pes-text-dim: rgba(255, 255, 255, 0.78);
  --pes-text-footer: rgba(255, 255, 255, 0.52);
  --pes-input-bg: rgba(0, 0, 0, 0.35);
  --pes-green: #66bb6a;
  --pes-red: #ef5350;
  --pes-brand-orange: #e85d1c;
  --pes-brand-orange-soft: #f4a024;
  --pill-gk: linear-gradient(180deg, #f0d060 0%, #c9a020 100%);
  --pill-def: linear-gradient(180deg, #5eeaff 0%, #00acc1 100%);
  --pill-mid: linear-gradient(180deg, #aed581 0%, #7cb342 100%);
  --pill-fwd: linear-gradient(180deg, #ff8a65 0%, #e53935 100%);
  --font-menu: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Saira Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", Arial, Helvetica, sans-serif;
  --font-digital: "Share Tech Mono", "Courier New", monospace;
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--pes-bg-bottom);
  color: var(--pes-text);
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(ellipse 140px 90px at 12% 18%, var(--pes-glow), transparent 70%),
    radial-gradient(ellipse 110px 110px at 88% 28%, rgba(0, 195, 255, 0.1), transparent 70%),
    radial-gradient(ellipse 160px 100px at 45% 88%, rgba(0, 195, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 80px 60px at 72% 62%, rgba(0, 195, 255, 0.06), transparent 70%),
    linear-gradient(180deg, var(--pes-bg-top) 0%, var(--pes-bg-bottom) 100%);
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding: 16px 14px 20px;
  gap: 12px;
  animation: fadeIn 0.35s ease;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Barra de equipa (ARGENTINA / BRAZIL style) */
.pes-team-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  background: linear-gradient(180deg, var(--pes-bar-top) 0%, var(--pes-bar-bottom) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 3px 12px rgba(0, 0, 0, 0.45);
}

.pes-team-bar__label {
  font-family: var(--font-menu);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pes-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Cabeçalho: logo + nome do quiz (placa clara) */
.pes-logo-stage {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 18px 20px;
  background: linear-gradient(180deg, #ececee 0%, #d4d6da 100%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 18px rgba(0, 0, 0, 0.25);
}

.pes-logo-stage img {
  width: min(280px, 82vw);
  height: auto;
  display: block;
  margin-bottom: 14px;
}

.pes-logo-stage__kicker {
  margin: 0 0 4px;
  font-family: var(--font-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c44a12;
}

.pes-logo-stage__title {
  display: inline-block;
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #1a2340;
  text-transform: uppercase;
  transform: skewX(-8deg);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pes-logo-stage .game-subtitle {
  font-family: var(--font-body);
  color: #4a4f58;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0 4px;
  line-height: 1.4;
}

.pes-logo-stage .podcast-credit {
  font-family: var(--font-menu);
  color: #b83810;
  margin-top: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}

.pes-logo-stage .dev-credit {
  margin-top: 10px;
  font-family: var(--font-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a2340;
}

.pes-logo-stage .dev-credit__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pes-logo-stage .dev-credit__link:hover,
.pes-logo-stage .dev-credit__link:focus-visible {
  color: #c44a12;
  outline: none;
}

/* Menu central: Match Start panel, ocupa o resto do ecrã */
.pes-menu {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 22px 0 16px;
  background: linear-gradient(180deg, rgba(20, 32, 54, 0.92) 0%, rgba(10, 16, 30, 0.94) 100%);
  border: 1px solid rgba(160, 175, 200, 0.22);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 32px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  min-height: min(320px, 42vh);
}

.pes-menu__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #8b1e1e 0%, #3a0c0c 40%, #000 100%);
}

.pes-menu__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  flex-shrink: 0;
}

.pes-menu__item {
  display: block;
  width: 100%;
  padding: 12px 28px;
  font-family: var(--font-menu);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #ffffff;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.pes-menu__item:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.05);
}

.pes-menu__item.is-active {
  background: linear-gradient(180deg, #1e7ad4 0%, #1565c0 55%, #0d47a1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.pes-menu__footer {
  margin-top: auto;
  padding: 16px 28px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.pes-menu__footer-heading {
  margin: 0 0 10px;
  font-family: var(--font-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.pes-menu__footer p + p {
  margin-top: 6px;
}

.pes-menu__footer strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

/* Cards das outras screens */
.pes-card {
  position: relative;
  background: var(--pes-card);
  border: 1px solid var(--pes-card-border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.pes-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #7a1a1a 0%, #2a0808 45%, #000000 100%);
}

.pes-card--main,
.pes-card--answers,
.pes-card--actions {
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-menu);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pes-text);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.menu-item:hover:not(.selected) {
  background: rgba(255, 255, 255, 0.06);
}

.menu-item.selected {
  background: linear-gradient(180deg, #1e7ad4 0%, #1565c0 55%, #0d47a1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.menu-item--action {
  margin-top: 8px;
}

/* Ranking */
.screen--ranking {
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.ranking-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ranking-intro {
  flex-shrink: 0;
  margin: 4px 0 10px;
  padding-top: 4px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--pes-text-footer);
}

.ranking-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-bottom: 4px;
  padding-right: 2px;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  counter-increment: rank;
}

.ranking-list li::before {
  content: counter(rank);
  font-family: var(--font-digital);
  font-size: 0.9rem;
  color: var(--pes-select-bright);
  text-align: center;
}

.ranking-list li:first-child::before {
  color: #f0d060;
}

.ranking-name {
  font-family: var(--font-menu);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pes-text);
  font-size: 0.92rem;
}

.ranking-meta {
  font-size: 0.72rem;
  color: var(--pes-text-footer);
}

.ranking-points {
  font-family: var(--font-digital);
  font-size: 0.95rem;
  color: var(--pes-text-dim);
  text-align: right;
}

.ranking-empty {
  margin: 12px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--pes-text-footer);
}

.ranking-empty.hidden {
  display: none;
}

.ranking-status {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--pes-text-footer);
}

.ranking-status.hidden {
  display: none;
}

.ranking-status.is-error {
  color: #ff8a80;
}

.screen--ranking .menu-item--action {
  flex-shrink: 0;
  margin-top: 8px;
}

.powered-by {
  text-align: center;
  padding: 4px 0;
  font-size: 0.72rem;
  color: var(--pes-text-footer);
}

.powered-by strong {
  display: block;
  font-family: var(--font-menu);
  font-size: 0.78rem;
  color: var(--pes-text-dim);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.site-link {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--pes-text-footer);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-link:hover {
  color: var(--pes-text-dim);
}

.ig-link {
  display: block;
  margin-top: 8px;
  font-family: var(--font-menu);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64b5f6;
  text-decoration: none;
}

.ig-link:hover,
.ig-link:focus-visible {
  color: #90caf9;
  outline: none;
}

/* Timer compacto no topo: a pergunta leva a hierarquia */
.quiz-top {
  flex-shrink: 0;
}

.quiz-top__bar {
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 6px 12px;
}

.timer-inline {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}

.timer-urgency {
  font-family: var(--font-menu);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pes-brand-orange-soft);
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.15s, max-width 0.15s;
}

.timer-urgency.visible {
  opacity: 1;
  max-width: 8rem;
  margin-right: 4px;
}

.timer-bar-track {
  height: 4px;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--pes-select), var(--pes-select-bright));
  transition: width 0.08s linear;
}

.timer-seconds {
  font-family: var(--font-digital);
  font-size: 1.15rem;
  color: var(--pes-text);
  line-height: 1;
  min-width: 1.4ch;
  text-align: right;
}

.timer-seconds-label {
  font-family: var(--font-menu);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--pes-text-footer);
  text-transform: uppercase;
}

.quiz-top.warning .timer-bar-fill {
  background: linear-gradient(90deg, #e65100, var(--pes-brand-orange-soft));
}

.quiz-top.warning .timer-seconds,
.quiz-top.warning .timer-urgency.visible {
  color: var(--pes-brand-orange-soft);
}

.quiz-top.critical {
  animation: timer-shake 0.35s ease-in-out infinite;
}

.quiz-top.critical .timer-bar-fill {
  background: var(--pes-red);
}

.quiz-top.critical .timer-seconds,
.quiz-top.critical .timer-urgency.visible {
  color: var(--pes-red);
}

.quiz-top.final-second {
  animation: timer-shake 0.25s ease-in-out infinite;
}

.quiz-top.final-second .timer-seconds {
  color: #ff5252;
}

@keyframes timer-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Pergunta: foco principal */
.pes-card--question {
  flex-shrink: 0;
  padding: 22px 20px 18px;
}

.question-panel {
  padding-top: 4px;
  text-align: center;
}

.pill {
  display: inline-block;
  padding: 3px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-family: var(--font-menu);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.pill--gk { background: var(--pill-gk); }
.pill--def { background: var(--pill-def); }
.pill--mid { background: var(--pill-mid); }
.pill--fwd { background: var(--pill-fwd); }

.question-text {
  font-family: var(--font-menu);
  font-size: clamp(1.2rem, 4.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pes-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.progress-bar {
  height: 3px;
  background: rgba(0, 0, 0, 0.4);
  margin-top: 18px;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--pes-select-bright);
  width: 10%;
  transition: width 0.3s ease;
}

/* Respostas: 4 opções claramente tocáveis (mobile first) */
.answers-heading {
  margin: 4px 0 12px;
  font-family: var(--font-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pes-text-dim);
  text-align: center;
}

.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
}

.answer-btn {
  display: grid;
  grid-template-columns: 2.6rem 1fr 1.4rem;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 14px;
  background: rgba(30, 100, 180, 0.22);
  border: 2px solid rgba(100, 180, 255, 0.45);
  border-radius: 10px;
  color: var(--pes-text);
  font-family: var(--font-menu);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.answer-btn:active:not(:disabled) {
  background: rgba(21, 101, 192, 0.55);
  border-color: #42a5f5;
  transform: scale(0.985);
}

.answer-btn:disabled {
  cursor: default;
  transform: none;
}

.answer-btn.correct {
  background: rgba(102, 187, 106, 0.32);
  border-color: var(--pes-green);
}

.answer-btn.wrong {
  background: rgba(239, 83, 80, 0.32);
  border-color: var(--pes-red);
  opacity: 0.85;
}

.answer-btn.reveal-correct {
  background: rgba(102, 187, 106, 0.28);
  border-color: var(--pes-green);
}

.answer-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  font-family: var(--font-menu);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: #1565c0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.answer-text {
  line-height: 1.25;
}

.answer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
}

/* Feedback modal */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(4, 8, 16, 0.88);
  backdrop-filter: blur(4px);
}

.feedback-modal.hidden {
  display: none;
}

.feedback-modal__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  padding: 22px 20px 18px;
  text-align: center;
  background: var(--pes-card);
  border: 1px solid var(--pes-card-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.feedback-progress {
  margin: 0 0 2px;
  font-family: var(--font-menu);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--pes-text-footer);
  opacity: 0.9;
}

.feedback-label {
  margin: 0;
  font-family: var(--font-menu);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
}

.feedback-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
}

.feedback-points {
  margin: 0;
  font-family: var(--font-menu);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.85;
}

.feedback-points.hidden {
  display: none;
}

.feedback-modal.correct .feedback-label,
.feedback-modal.correct .feedback-text,
.feedback-modal.correct .feedback-points { color: var(--pes-green); }
.feedback-modal.wrong .feedback-label,
.feedback-modal.wrong .feedback-text { color: var(--pes-red); }
.feedback-modal.timeout .feedback-label,
.feedback-modal.timeout .feedback-text { color: var(--pes-brand-orange-soft); }

.feedback-next {
  width: 100%;
  margin-top: 6px;
}

/* Form */
.pes-header.compact {
  padding: 6px 0 12px;
  text-align: center;
}

.game-title.small {
  font-family: var(--font-menu);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.score-display,
.points-display {
  font-size: 0.88rem;
  color: var(--pes-text-dim);
}

.score-display strong {
  color: var(--pes-select-bright);
}

.points-display strong {
  font-family: var(--font-digital);
  font-size: 1.35rem;
  color: var(--pes-text);
}

.player-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-privacy {
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--pes-text-footer);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.form-privacy strong {
  color: #64b5f6;
  font-weight: 700;
}

.player-form label {
  font-family: var(--font-menu);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--pes-text-footer);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 10px;
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.player-form input {
  padding: 11px 12px;
  background: var(--pes-input-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--pes-text);
  font-family: var(--font-menu);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
}

.player-form input:focus {
  border-color: var(--pes-select-bright);
}

.player-form input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  text-transform: none;
}

.instagram-input {
  display: flex;
}

.at-sign {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: var(--pes-text-footer);
  font-weight: 700;
}

.instagram-input input {
  flex: 1;
  border-radius: 0 4px 4px 0;
  text-transform: none;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Resultado */
#screen-result {
  padding: 14px;
}

.result-preview {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#result-canvas {
  display: none;
}

.result-image-btn {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  max-width: 100%;
}

.result-image {
  display: block;
  max-width: 100%;
  max-height: 46vh;
  border: 1px solid var(--pes-card-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.result-image-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-menu);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

body.modal-open {
  overflow: hidden;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 16, 0.92);
  backdrop-filter: blur(4px);
}

.result-modal.hidden {
  display: none;
}

.result-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(14, 24, 44, 0.9);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.result-modal__img {
  max-width: min(100%, 420px);
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  border: 1px solid var(--pes-card-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.share-tips {
  margin: 4px 0 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-align: center;
}

.share-tips__title {
  margin: 0 0 6px;
  font-family: var(--font-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pes-text-dim);
}

.share-tips__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--pes-text-footer);
}

.share-tips__text strong {
  color: #64b5f6;
  font-weight: 700;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

@media (min-width: 481px) {
  .app {
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }
}

@media (max-height: 700px) {
  .pes-logo-stage {
    padding: 14px 14px 12px;
  }

  .pes-logo-stage img {
    width: min(220px, 74vw);
    margin-bottom: 10px;
  }

  .pes-logo-stage__title {
    font-size: 1.2rem;
  }

  .timer-seconds {
    font-size: 1.05rem;
  }

  .question-text {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .quiz-top.critical,
  .quiz-top.final-second {
    animation: none;
  }
}
