/* Ruleta de Premios - AWS Girls Peru × KCD Lima 2026 */

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

:root {
  --pink:        #FF6B9D;
  --orange:      #FF9900;
  --purple:      #8B5CF6;
  --bg-deep:     #07091a;
  --bg-card:     rgba(16, 24, 48, 0.9);
  --text:        #FFFFFF;
  --text-muted:  #94a3b8;
  --modal-bg:    rgba(4, 6, 18, 0.92);
  --glow-pink:   rgba(255, 107, 157, 0.5);
  --glow-orange: rgba(255, 153,   0, 0.4);
  --glow-purple: rgba(139,  92, 246, 0.3);
  --border:      rgba(255, 107, 157, 0.25);
}

/* ── Animations ── */
@keyframes bgDrift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0)    rotate(0deg);   opacity: 0.18; }
  33%       { transform: translateY(-28px) rotate(120deg); opacity: 0.38; }
  66%       { transform: translateY(-14px) rotate(240deg); opacity: 0.25; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes wheelIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 24px var(--glow-pink), 0 4px 24px var(--glow-orange); }
  50%       { box-shadow: 0 4px 48px var(--glow-pink), 0 4px 48px var(--glow-orange), 0 0 70px rgba(255,107,157,0.2); }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.82) translateY(24px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes emojiBounce {
  0%   { transform: scale(0);   opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  80%  { transform: scale(0.9); }
  100% { transform: scale(1);   opacity: 1; }
}

@keyframes confettiShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes badgePop {
  0%  { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.08); }
  100%{ transform: scale(1);   opacity: 1; }
}

/* ── Body ── */
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(-45deg, #07091a, #0d1432, #1a0a2e, #07091a);
  background-size: 400% 400%;
  animation: bgDrift 28s ease infinite;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  position: relative;
}

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particles span {
  position: absolute;
  border-radius: 50%;
  animation: float linear infinite;
}

.particles span:nth-child(1) { left:  5%; top: 15%; width: 7px;  height: 7px;  background: var(--pink);   animation-duration: 9s;  animation-delay: 0s; }
.particles span:nth-child(2) { left: 88%; top: 25%; width: 5px;  height: 5px;  background: var(--orange); animation-duration: 12s; animation-delay: 1s; }
.particles span:nth-child(3) { left: 15%; top: 65%; width: 9px;  height: 9px;  background: var(--purple); animation-duration: 8s;  animation-delay: 2s; }
.particles span:nth-child(4) { left: 78%; top: 70%; width: 6px;  height: 6px;  background: var(--pink);   animation-duration: 11s; animation-delay: 0.5s; }
.particles span:nth-child(5) { left: 50%; top:  8%; width: 8px;  height: 8px;  background: var(--orange); animation-duration: 10s; animation-delay: 3s; }
.particles span:nth-child(6) { left: 92%; top: 50%; width: 5px;  height: 5px;  background: var(--purple); animation-duration: 13s; animation-delay: 1.5s; }
.particles span:nth-child(7) { left: 35%; top: 85%; width: 7px;  height: 7px;  background: var(--pink);   animation-duration: 7s;  animation-delay: 4s; }
.particles span:nth-child(8) { left: 65%; top: 40%; width: 6px;  height: 6px;  background: var(--orange); animation-duration: 9s;  animation-delay: 2s; }

/* ── Top Bar ── */
.logo-wrapper {
  display: flex;
  align-items: center;
}

.org-logo {
  height: 32px;
  width: auto;
  display: block;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(7, 9, 26, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
  animation: fadeInDown 0.4s ease both;
}

.org-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.event-badge {
  background: linear-gradient(135deg, rgba(255,107,157,0.15), rgba(255,153,0,0.15));
  border: 1px solid rgba(255,107,157,0.35);
  color: var(--pink);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: badgePop 0.5s ease 0.2s both;
}

/* ── Page Title ── */
.page-title {
  text-align: center;
  padding: 28px 20px 16px;
  position: relative;
  z-index: 1;
  animation: fadeInDown 0.5s ease 0.1s both;
}

.page-title h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 3vw, 1rem);
  margin-top: 6px;
  text-wrap: pretty;
}

/* ── Wheel Section ── */
.wheel-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  animation: wheelIn 0.6s ease 0.2s both;
}

.wheel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient glow ring */
.wheel-glow {
  position: absolute;
  width: 104%;
  height: 104%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,157,0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: btnPulse 5s ease-in-out infinite;
}

.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 32px solid var(--pink);
  z-index: 10;
  filter: drop-shadow(0 2px 8px var(--glow-pink));
}

#wheel-container {
  transition: transform 0ms;
}

#wheel-canvas {
  display: block;
  width: min(360px, calc(100vw - 72px));
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255,107,157,0.18));
}

/* ── Spin Button ── */
.spin-section {
  padding: 28px 20px 8px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease 0.3s both;
}

#spin-btn {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: white;
  border: none;
  padding: 18px 56px;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: btnPulse 2.5s ease-in-out infinite;
  min-width: 200px;
  touch-action: manipulation;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

#spin-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 55%);
  border-radius: 50px;
  pointer-events: none;
}

.btn-icon { font-size: 1.4rem; line-height: 1; display: inline-flex; align-items: center; }
.btn-text { position: relative; z-index: 1; }

#spin-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 44px var(--glow-pink), 0 12px 44px var(--glow-orange);
  animation: none;
}

#spin-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

#spin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  animation: none;
  box-shadow: none;
}

#status-text {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 20px;
}

/* ── Community Section ── */
.community-section {
  width: 100%;
  max-width: 460px;
  padding: 16px 20px 28px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.community-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.community-divider::before,
.community-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 107, 157, 0.2);
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.social-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.social-btn.meetup,
.social-btn.linkedin,
.social-btn.instagram,
.social-btn.youtube {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.social-btn.meetup:hover    { border-color: rgba(237,  28,  64, 0.5); box-shadow: 0 4px 18px rgba(237,  28,  64, 0.2); }
.social-btn.linkedin:hover  { border-color: rgba(  0, 119, 181, 0.5); box-shadow: 0 4px 18px rgba(  0, 119, 181, 0.2); }
.social-btn.instagram:hover { border-color: rgba(225,  48, 108, 0.5); box-shadow: 0 4px 18px rgba(225,  48, 108, 0.2); }
.social-btn.youtube:hover   { border-color: rgba(255,   0,   0, 0.5); box-shadow: 0 4px 18px rgba(255,   0,   0, 0.2); }

.social-icon { font-size: 1rem; }

.website-link {
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  display: inline-block;
}
.website-link:hover {
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Result Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.visible .modal-content {
  animation: modalIn 0.45s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

.modal-content {
  background: linear-gradient(160deg, #111827 0%, #0a1128 100%);
  border-radius: 28px;
  padding: 40px 32px 32px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 107, 157, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 48px rgba(255, 107, 157, 0.12);
  overflow: hidden;
}

/* Top gradient line */
.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--purple), var(--pink));
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.07);
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 9px;
  line-height: 1;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(255,107,157,0.2);
  color: var(--pink);
}

.modal-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
  line-height: 1;
  animation: emojiBounce 0.5s ease 0.1s both;
  min-height: 56px;
}

.result-heading {
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  margin-bottom: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.result-heading.prize-win {
  background: linear-gradient(135deg, var(--orange), #FFD700, var(--orange));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: confettiShimmer 2s linear infinite;
}

.result-heading.no-prize {
  color: var(--text-muted);
}

#result-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.65;
}

.meetup-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px var(--glow-pink);
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
}

.meetup-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 55%);
  pointer-events: none;
}

.meetup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-pink), 0 8px 30px var(--glow-orange);
}

/* ── Responsive ── */
@media (max-width: 400px) {
  .wheel-section { padding: 16px 16px 16px; }
  #spin-btn { padding: 16px 40px; font-size: 1.15rem; }
  .modal-content { padding: 36px 20px 28px; border-radius: 22px; }
  .result-heading { font-size: 1.5rem; }
  .meetup-button { padding: 12px 20px; font-size: 0.88rem; }
}
