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

:root {
  --bg: #0a0a0a;
  --text: #fafafa;
  --text-muted: #a3a3a3;
  --border: #262626;
  --accent: #fafafa;
  --accent-hover: #d4d4d4;
  --accent-text: #0a0a0a;
  --input-bg: #171717;
  --input-border: #333333;
  --ring: #fafafa;
  --modal-overlay: rgba(0, 0, 0, 0.6);
  --radius: 0.625rem;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(255,255,255,0.02) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 20% 20%, rgba(255,255,255,0.015) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
  animation: heroIn 1s ease-out;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  user-select: none;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 7rem;
  position: relative;
}

.countdown-item::after {
  content: '';
  position: absolute;
  inset: -1rem;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.countdown-item:hover::after {
  opacity: 1;
}

.countdown-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  position: relative;
}

.odometer-wheel {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  position: relative;
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  width: 0.6em;
  text-align: center;
}

.odometer-strip {
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.odometer-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1em;
}

.countdown-label {
  font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  transition: color 0.3s;
}

.countdown-item:hover .countdown-label {
  color: var(--text);
}

.countdown-sep {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 1.8rem;
  animation: sepPulse 2s ease-in-out infinite;
}

@keyframes sepPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: calc(var(--radius) + 0.125rem);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: background-position 0.5s;
  pointer-events: none;
}

.btn:hover::before {
  background-position: -100% 0;
}

.btn:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(255,255,255,0.06);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.25rem;
}

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

.btn:disabled::before {
  display: none;
}

.btn svg {
  transition: transform 0.3s;
}

.btn:hover svg {
  transform: translateY(-1px);
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.turnstile-wrap iframe {
  border-radius: 0.375rem;
}

.lang-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
}

.lang-btn {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.7rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  box-shadow: 0 0 20px rgba(255,255,255,0.03);
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
  transition: opacity 0.25s;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 400px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  z-index: 50;
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92) translateY(0.5rem);
  pointer-events: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.modal-body {
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  padding: 0 1.5rem 1.25rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: calc(var(--radius) - 0.2rem);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input::placeholder {
  color: #525252;
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring), 0 0 20px rgba(255,255,255,0.02);
  background: #1a1a1a;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 60;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-success {
  background: #1a1a1a;
  color: #fafafa;
  border: 1px solid #333333;
}

.toast-error {
  background: #2a0a0a;
  color: #fecaca;
  border: 1px solid #7f1d1d;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .countdown-item {
    min-width: 5rem;
  }

  .hero {
    gap: 2rem;
  }

  .countdown {
    gap: 0.4rem;
  }

  .countdown-sep {
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 360px) {
  .countdown-item {
    min-width: 3.5rem;
  }
}
