/* =====================================================
   DESAFIO REFRIGERA COPA — Stylesheet
   Cores: verde #009739 | amarelo #FFDF00 | azul #002776
   ===================================================== */

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

:root {
  --green:      #009739;
  --green-dark: #006B29;
  --yellow:     #FFDF00;
  --blue:       #002776;
  --blue-light: #0033A0;
  --white:      #FFFFFF;
  --black:      #111111;
  --radius:     16px;
  --shadow:     0 6px 24px rgba(0,0,0,0.35);
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 45%, var(--blue) 100%);
  background-attachment: fixed;
  color: var(--white);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- SCREENS ---------- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
  justify-content: center;
}

.screen.active {
  display: flex;
  animation: fadeIn 0.35s ease;
}

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

.screen-content {
  width: 100%;
  max-width: 440px;
  padding: 32px 20px 48px;
  text-align: center;
}

/* ---------- ESTRELAS HEXA ---------- */
.hexa-stars {
  margin-bottom: 16px;
  text-align: center;
}

.stars-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.star {
  font-size: 28px;
  line-height: 1;
  transition: transform 0.2s;
}

.star.gold {
  color: #FFDF00;
  text-shadow: 0 0 10px rgba(255,223,0,0.8), 0 2px 4px rgba(0,0,0,0.4);
}

.star.empty {
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(255,223,0,0.6);
  animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { -webkit-text-stroke-color: rgba(255,223,0,0.4); transform: scale(1); }
  50%       { -webkit-text-stroke-color: rgba(255,223,0,1);   transform: scale(1.15); }
}

.hexa-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,223,0,0.85);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- LOGO + TROFÉU ---------- */
.logo-trophy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.logo-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 260px;
  max-width: 58vw;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.4));
}

.trophy-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.trophy-img {
  width: 180px;
  max-width: 38vw;
  filter: drop-shadow(0 4px 20px rgba(255,223,0,0.5));
  animation: trophyFloat 3s ease-in-out infinite;
}

@keyframes trophyFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(2deg); }
}

/* ---------- INDICADOR DE ROUND ---------- */
.round-indicator {
  display: inline-block;
  background: rgba(255,223,0,0.18);
  border: 1px solid rgba(255,223,0,0.5);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

/* ---------- PLACAR PARCIAL ---------- */
.score-progress {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 15px;
}

/* ---------- RESULTADO FINAL ---------- */
.final-icon {
  font-size: 72px;
  margin: 8px 0 14px;
  animation: popIn 0.5s ease;
}

.final-score {
  margin-bottom: 20px;
}

.score-summary {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.score-row {
  font-size: 15px;
  padding: 4px 0;
  text-align: left;
  line-height: 1.5;
}

.score-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--yellow);
}

/* ---------- SCREEN 1: WELCOME ---------- */
/* ---------- CAMISA ---------- */
.jersey-container {
  margin: 12px auto 20px;
  position: relative;
}

.jersey-img {
  width: 160px;
  max-width: 50vw;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5));
  animation: floatJersey 3s ease-in-out infinite;
}

@keyframes floatJersey {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(2deg); }
}

/* ---------- SCREEN 1: WELCOME ---------- */
.welcome-old-stars {
  font-size: 22px;
  letter-spacing: 4px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.logo-block {
  margin-bottom: 24px;
}

.logo-icons {
  font-size: 52px;
  margin-bottom: 6px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.4));
}

.brand-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--yellow);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

.brand-event {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.event-location {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.15;
  margin: 20px 0 12px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.yellow-text {
  color: var(--yellow);
}

.hero-sub {
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.92;
  margin-bottom: 16px;
}

.trophy-row {
  font-size: 36px;
  margin: 12px 0 24px;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.hashtag {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.7;
  font-style: italic;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
  background: linear-gradient(135deg, var(--yellow) 0%, #FFB800 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,223,0,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,223,0,0.55);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(255,223,0,0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
}

/* ---------- SCREEN 2: FORM ---------- */
.screen-header {
  margin-bottom: 24px;
}

.screen-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--yellow);
}

.screen-header p {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}

.form-group {
  text-align: left;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.9;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  border: 3px solid transparent;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--yellow);
}

.form-group input::placeholder {
  color: #aaa;
}

.field-error {
  display: block;
  color: #FFB3B3;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

/* ---------- SCREEN 3: ROLETA ---------- */
.roulette-wrapper {
  position: relative;
  display: inline-block;
  margin: 16px auto 24px;
}

.roulette-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: var(--yellow);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 10;
  line-height: 1;
}

#rouletteCanvas {
  display: block;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* ---------- SCREEN 4: PERGUNTA ---------- */
.category-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

.category-badge.tecnica {
  background: var(--green-dark);
  color: var(--yellow);
  border: 2px solid var(--yellow);
}

.category-badge.copa {
  background: var(--yellow);
  color: var(--blue);
  border: 2px solid var(--blue);
}

.category-badge.relampago {
  background: var(--blue);
  color: var(--yellow);
  border: 2px solid var(--yellow);
}

.question-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.question-text {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--white);
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  line-height: 1.4;
}

.option-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.7);
  transform: translateX(4px);
}

.option-btn.correct {
  background: rgba(0, 180, 60, 0.6);
  border-color: #00CC44;
  animation: popIn 0.3s ease;
}

.option-btn.wrong {
  background: rgba(220, 40, 40, 0.6);
  border-color: #FF4444;
}

@keyframes popIn {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ---------- SCREEN 5: RESULTADO ---------- */
.result-icon {
  font-size: 72px;
  margin: 8px 0 16px;
  animation: popIn 0.5s ease;
}

.result-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 10px;
}

.result-msg {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 16px;
  line-height: 1.5;
}

.correct-box {
  display: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.correct-box strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--yellow);
}

.prize-box {
  display: none;
  background: linear-gradient(135deg, rgba(0,39,118,0.7), rgba(0,151,57,0.7));
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.prize-box strong {
  display: block;
  font-size: 18px;
  color: var(--yellow);
  margin: 4px 0;
}

.prize-sub {
  font-size: 12px;
  opacity: 0.8;
}

/* ---------- SCREEN 6: OBRIGADO ---------- */
.thanks-icons {
  font-size: 52px;
  margin: 8px 0 20px;
}

.thanks-msg {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 28px;
}

.social-section {
  margin-bottom: 20px;
}

.social-section p {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}

.social-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.social-btn.instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: var(--white);
}

.social-btn.whatsapp {
  background: #25D366;
  color: var(--white);
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(0,0,0,0.85);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 360px) {
  .hero-title { font-size: 30px; }
  .brand-name { font-size: 22px; }
  #rouletteCanvas { width: 260px; height: 260px; }
}

@media (min-height: 700px) {
  .screen-content {
    padding-top: 48px;
  }
}
