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

body {
  background: #0a0f2e;
  color: #e8ecff;
  font-family: 'Georgia', serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* HEADER */
header {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.badge {
  display: inline-block;
  background: #f0c040;
  color: #0a0f2e;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 3px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
  font-family: sans-serif;
}

header h1 {
  font-size: clamp(2.2rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(70, 130, 220, 0.6);
}

.subtitle {
  font-size: 1.1rem;
  color: #a8bfff;
  margin-top: 0.5rem;
  font-style: italic;
}

.disclaimer {
  font-size: 0.75rem;
  color: #556;
  margin-top: 0.25rem;
}

/* LOGO SECTION */
.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.hint {
  font-size: clamp(1rem, 4vw, 1.4rem);
  color: #f0c040;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(240, 192, 64, 0.6);
  animation: hint-pulse 1.4s ease-in-out infinite;
  cursor: pointer;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

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

.logo-wrapper {
  position: relative;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s;
}

.logo-wrapper:hover {
  transform: scale(1.05);
}

.logo-wrapper:active {
  transform: scale(0.97);
}

#teamLogo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(70, 130, 220, 0.5));
}

.glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 130, 220, 0.15) 0%, transparent 70%);
  animation: glow 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes glow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* STATS */
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 1rem 2.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(100, 150, 255, 0.2);
  border-radius: 12px;
  padding: 1.2rem 2rem;
  text-align: center;
  min-width: 120px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #f0c040;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: #7090aa;
  margin-top: 0.3rem;
  letter-spacing: 1px;
  font-family: sans-serif;
  text-transform: uppercase;
}

/* QUOTES */
.quotes {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 1rem 2rem 3rem;
}

blockquote {
  font-size: 1.15rem;
  font-style: italic;
  color: #c8d8ff;
  line-height: 1.6;
}

cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #556;
  font-style: normal;
  font-family: sans-serif;
}

/* FOOTER */
footer {
  margin-top: auto;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.72rem;
  color: #334;
  font-family: sans-serif;
  border-top: 1px solid #1a2040;
  width: 100%;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

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

/* --- FASE 1: IMMAGINE SORPRESA --- */
#phaseImage {
  gap: 1.5rem;
}

#surpriseImg {
  width: min(420px, 80vw);
  border-radius: 16px;
  animation: slam-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             wobble 0.6s 0.5s ease-in-out;
  box-shadow: 0 0 60px rgba(240, 192, 64, 0.6), 0 0 120px rgba(240, 192, 64, 0.2);
  image-rendering: auto;
}

@keyframes slam-in {
  from { transform: scale(0.2) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes wobble {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-5deg) scale(1.05); }
  40%  { transform: rotate(5deg) scale(1.05); }
  60%  { transform: rotate(-3deg); }
  80%  { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}

.surprise-label {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 900;
  color: #f0c040;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: flash-text 0.5s 0.4s ease both, pulse-text 1s 1s infinite;
  font-family: sans-serif;
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.8);
}

@keyframes flash-text {
  from { opacity: 0; transform: scale(1.5); }
  to   { opacity: 1; transform: scale(1); }
}

.taunt-bubble {
  position: fixed;
  top: 12%;
  background: rgba(240, 60, 60, 0.9);
  color: #fff;
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  max-width: 80vw;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.taunt-bubble.show {
  opacity: 1;
}

/* --- FASE 2: VIDEO --- */
.modal-overlay.video-mode {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

#phaseVideo {
  pointer-events: none;
}

.video-wrapper {
  position: relative;
  width: min(720px, 82vw);
  animation: fade-slide-up 0.5s ease both;
  pointer-events: all;
  cursor: default;
}

@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

#mainVideo {
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(70, 130, 220, 0.3);
}

.video-skip-hint {
  text-align: center;
  margin-top: 0.8rem;
  font-family: sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1px;
  pointer-events: none;
}

.floating-taunt {
  position: fixed;
  pointer-events: none;
  font-family: sans-serif;
  font-weight: 900;
  font-size: clamp(1.1rem, 3.5vw, 2.2rem);
  color: #f0c040;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(240,192,64,0.5);
  opacity: 0;
  white-space: normal;
  max-width: 80vw;
  z-index: 200;
  line-height: 1.2;
}

.floating-taunt.show {
  animation: float-up 9s ease forwards;
}

@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) scale(0.7) rotate(-3deg); }
  8%   { opacity: 1; transform: translateY(-12px) scale(1.15) rotate(2deg); }
  80%  { opacity: 1; transform: translateY(-28px) scale(1) rotate(-1deg); }
  100% { opacity: 0; transform: translateY(-55px) scale(0.9) rotate(2deg); }
}

/* --- FASE 3: TROFEO --- */
#phaseTrophy {
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0f2e 70%);
}

.trophy-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  animation: fade-slide-up 0.6s ease both;
  position: relative;
  z-index: 2;
}

.trophy-emoji {
  font-size: clamp(5rem, 15vw, 9rem);
  animation: trophy-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             spin-trophy 1s 0.8s ease-out both;
  display: block;
  line-height: 1;
}

@keyframes trophy-bounce {
  from { transform: scale(0) translateY(-80px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes spin-trophy {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(15deg) scale(1.2); }
  to   { transform: rotate(0deg) scale(1); }
}

.trophy-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  color: #f0c040;
  letter-spacing: 6px;
  text-shadow: 0 0 30px rgba(240, 192, 64, 0.8);
  animation: reveal-text 0.5s 0.6s ease both;
  font-family: sans-serif;
}

.trophy-sub {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: #e8ecff;
  line-height: 1.5;
  animation: reveal-text 0.5s 0.9s ease both;
  font-family: sans-serif;
}

.trophy-sub strong {
  color: #f0c040;
  font-size: 1.3em;
}

.trophy-detail {
  font-size: 0.9rem;
  color: #556688;
  font-style: italic;
  animation: reveal-text 0.5s 1.2s ease both;
  font-family: sans-serif;
}

@keyframes reveal-text {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.trophy-close {
  margin-top: 1.5rem;
  padding: 18px 48px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border: none;
  color: #fff;
  border-radius: 50px;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 900;
  cursor: pointer;
  font-family: sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 24px rgba(231, 76, 60, 0.5), 0 0 40px rgba(231, 76, 60, 0.2);
  transition: all 0.2s;
  animation: reveal-text 0.5s 1.5s ease both, btn-pulse 2s 2s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(231, 76, 60, 0.5); transform: scale(1); }
  50% { box-shadow: 0 4px 40px rgba(231, 76, 60, 0.8); transform: scale(1.04); }
}

.trophy-close:hover {
  background: linear-gradient(135deg, #e74c3c, #ff6b6b);
  transform: scale(1.07);
}

/* CONFETTI */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetto {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* FADE OUT transition */
.phase-fadeout {
  animation: phase-out 0.4s ease forwards !important;
}

@keyframes phase-out {
  to { opacity: 0; transform: scale(1.05); }
}

/* MOBILE */
@media (max-width: 480px) {
  header {
    padding: 2rem 1rem 1rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .logo-section {
    padding: 1.2rem 1rem;
  }

  #teamLogo {
    width: 170px;
    height: 170px;
  }

  .glow-ring {
    width: 190px;
    height: 190px;
  }

  .stats {
    gap: 0.8rem;
    padding: 0.5rem 1rem 2rem;
  }

  .stat-card {
    padding: 1rem 1.4rem;
    min-width: 90px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .quotes {
    padding: 0.5rem 1.2rem 2.5rem;
  }

  blockquote {
    font-size: 1rem;
  }

  .video-wrapper {
    width: 95vw;
  }

  .video-skip-hint {
    font-size: 0.65rem;
  }

  .trophy-screen {
    gap: 0.7rem;
    padding: 1.2rem 1rem;
  }

  .trophy-close {
    padding: 14px 28px;
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  .taunt-bubble {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
}