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

:root {
  --bg: #fafaf7;
  --text: #1a1a2e;
  --red: #e63946;
  --red-dark: #b52d38;
  --red-shadow: #8c1c26;
  --teal: #a8dadc;
  --blue: #457b9d;
  --navy: #1d3557;
  --white: #ffffff;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  min-height: 80vh;
  width: 100%;
  max-width: 600px;
}

/* Typography */
.title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--gray);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.fine-print {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 1rem;
}

.icon-big {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.company-tag {
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Email Input */
.email-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
}

#email-input {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  width: 100%;
}

#email-input:focus {
  border-color: var(--blue);
}

.btn-verify {
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 0.1s, background 0.2s;
}

.btn-verify:hover {
  background: var(--blue);
  transform: scale(1.02);
}

.btn-verify:active {
  transform: scale(0.98);
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error {
  color: var(--red);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* THE BIG BUTTON */
.button-container {
  perspective: 600px;
  margin: 1rem 0;
}

.the-big-button {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  background: var(--red);
  color: var(--white);
  font-family: inherit;
  box-shadow:
    0 8px 0 var(--red-dark),
    0 16px 0 var(--red-shadow),
    0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s, box-shadow 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.the-big-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 0 var(--red-dark),
    0 18px 0 var(--red-shadow),
    0 24px 50px rgba(0, 0, 0, 0.25);
}

.the-big-button:active {
  transform: translateY(8px);
  box-shadow:
    0 2px 0 var(--red-dark),
    0 4px 0 var(--red-shadow),
    0 6px 15px rgba(0, 0, 0, 0.15);
}

.the-big-button .btn-text {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.button-subtext {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray);
  letter-spacing: 0.2em;
  margin-top: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

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

.vote-count {
  font-size: 1.1rem;
  color: var(--blue);
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Result */
.result-text {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

/* Share */
.share-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-share {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 800;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 0.1s, background 0.2s;
}

.btn-share:hover {
  background: var(--blue);
  transform: scale(1.02);
}

.btn-share:active {
  transform: scale(0.98);
}

.copied {
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 700;
}

/* Leaderboard */
.leaderboard {
  width: 100%;
  max-width: 500px;
  padding: 2rem 1.5rem 4rem;
}

.leaderboard h2 {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.25rem;
}

.lb-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.lb-entry {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--white);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lb-rank {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gray);
  width: 2.5rem;
  text-align: center;
  flex-shrink: 0;
}

.lb-entry:nth-child(1) .lb-rank { color: #f59e0b; }
.lb-entry:nth-child(2) .lb-rank { color: #94a3b8; }
.lb-entry:nth-child(3) .lb-rank { color: #b45309; }

.lb-info {
  flex: 1;
  min-width: 0;
}

.lb-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-location {
  font-size: 0.8rem;
  color: var(--gray);
}

.lb-count {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--red);
  flex-shrink: 0;
  margin-left: 1rem;
}

.lb-more {
  text-align: center;
  color: var(--gray);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 1rem;
  letter-spacing: 0.03em;
}

.lb-empty {
  text-align: center;
  color: var(--gray);
  padding: 2rem;
  font-style: italic;
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Mobile */
@media (max-width: 480px) {
  .the-big-button {
    width: 220px;
    height: 220px;
  }
  .the-big-button .btn-text {
    font-size: 1.6rem;
  }
  .hero {
    padding: 2rem 1rem;
  }
}
