:root {
  --gold: #C9A84C;
  --gold-light: #F0D080;
  --gold-dark: #8A6820;
  --black: #080808;
  --dark: #0E0E0E;
  --surface: #141414;
  --surface2: #1C1C1C;
  --text: #F0EDE6;
  --muted: #888880;
  --pixel: 'Press Start 2P', monospace;
  --mono: 'Space Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
  cursor: crosshair;
}

/* ===== SCANLINE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== INTRO SCREEN ===== */
#intro {
  position: fixed;
  inset: 0;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: 48px;
}

.intro-logo {
  font-family: var(--pixel);
  font-size: clamp(10px, 3vw, 18px);
  color: var(--gold);
  text-align: center;
  line-height: 2.2;
  letter-spacing: 2px;
  animation: flicker 3s infinite;
}

.intro-logo span {
  display: block;
  font-size: clamp(22px, 6vw, 52px);
  color: var(--gold-light);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
}

.intro-sub {
  font-family: var(--pixel);
  font-size: clamp(6px, 1.5vw, 10px);
  color: var(--muted);
  letter-spacing: 3px;
  text-align: center;
  line-height: 2;
}

.start-btn {
  font-family: var(--pixel);
  font-size: clamp(8px, 2vw, 13px);
  color: var(--black);
  background: var(--gold);
  border: none;
  padding: 18px 40px;
  cursor: pointer;
  letter-spacing: 2px;
  animation: blink-btn 1.2s step-end infinite;
  transition: transform 0.1s;
  text-transform: uppercase;
}

.start-btn:hover { transform: scale(1.05); animation: none; background: var(--gold-light); }
.start-btn:active { transform: scale(0.97); }

.pixel-border {
  border: 2px solid var(--gold-dark);
  box-shadow:
    inset 0 0 0 2px var(--black),
    4px 4px 0 var(--gold-dark);
  padding: 32px 48px;
  text-align: center;
}

.insert-coin {
  font-family: var(--pixel);
  font-size: clamp(6px, 1.2vw, 9px);
  color: var(--gold-dark);
  letter-spacing: 2px;
  animation: blink-text 1.5s step-end infinite;
}

.intro-credits {
  position: absolute;
  bottom: 32px;
  font-family: var(--pixel);
  font-size: clamp(5px, 1vw, 7px);
  color: var(--gold-dark);
  letter-spacing: 1px;
  opacity: 0.6;
}

/* ===== NAME INPUT OVERLAY ===== */
#name-screen {
  position: fixed;
  inset: 0;
  background: var(--black);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: 32px;
}

.name-prompt {
  font-family: var(--pixel);
  font-size: clamp(8px, 1.8vw, 12px);
  color: var(--gold);
  text-align: center;
  line-height: 2;
}

.name-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--gold);
}

.name-prefix {
  font-family: var(--pixel);
  font-size: clamp(8px, 1.5vw, 11px);
  color: var(--gold-light);
  background: var(--surface);
  padding: 14px 16px;
  border-right: 2px solid var(--gold);
}

.name-input {
  font-family: var(--pixel);
  font-size: clamp(8px, 1.5vw, 11px);
  background: var(--black);
  color: var(--text);
  border: none;
  padding: 14px 16px;
  outline: none;
  width: 220px;
  caret-color: var(--gold);
}

.name-confirm {
  font-family: var(--pixel);
  font-size: clamp(6px, 1.2vw, 9px);
  color: var(--black);
  background: var(--gold);
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
#main {
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#main.visible { opacity: 1; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 60%, rgba(201,168,76,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(201,168,76,0.04) 0%, transparent 60%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  perspective: 300px;
}

.greeting {
  font-family: var(--pixel);
  font-size: clamp(7px, 1.5vw, 11px);
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(60px, 14vw, 160px);
  color: var(--gold-light);
  letter-spacing: 8px;
  line-height: 0.9;
  text-align: center;
  position: relative;
  z-index: 2;
  text-shadow:
    0 0 60px rgba(201,168,76,0.15),
    0 2px 0 var(--gold-dark);
}

.hero-subtitle {
  font-family: var(--display);
  font-size: clamp(20px, 5vw, 56px);
  color: var(--gold-dark);
  letter-spacing: clamp(4px, 3vw, 16px);
  margin-top: 8px;
  position: relative;
  z-index: 2;
}

.hero-date {
  font-family: var(--mono);
  font-size: clamp(11px, 2vw, 15px);
  color: var(--text);
  letter-spacing: 6px;
  margin-top: 32px;
  position: relative;
  z-index: 2;
  border: 1px solid var(--gold-dark);
  padding: 10px 28px;
  text-transform: uppercase;
}

.hero-location {
  font-family: var(--mono);
  font-size: clamp(9px, 1.5vw, 12px);
  color: var(--muted);
  letter-spacing: 4px;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  font-family: var(--pixel);
  font-size: clamp(5px, 1vw, 7px);
  color: var(--gold-dark);
  letter-spacing: 2px;
  animation: bounce 2s infinite;
  z-index: 2;
}

/* ===== PARALLAX BOTTLES ===== */
.parallax-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bottle {
  position: absolute;
  will-change: transform;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.bottle:hover { opacity: 1; }

.bottle svg { width: 100%; height: 100%; }

.parallax-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px;
  background: rgba(8,8,8,0.7);
  border: 1px solid rgba(201,168,76,0.2);
  max-width: 600px;
  width: 90%;
}

.section-label {
  font-family: var(--pixel);
  font-size: clamp(6px, 1.2vw, 9px);
  color: var(--gold-dark);
  letter-spacing: 4px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

/* ===== COUNTDOWN ===== */
#countdown-section {
  padding: 100px 20px;
  text-align: center;
  background: var(--surface);
  position: relative;
}

#countdown-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

#countdown-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 48px);
  margin: 48px 0;
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.countdown-num {
  font-family: var(--pixel);
  font-size: clamp(28px, 7vw, 72px);
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
  min-width: 2ch;
  text-align: center;
  display: block;
  transition: all 0.1s;
}

.countdown-num.tick {
  transform: scale(1.1);
  color: var(--gold);
}

.countdown-label {
  font-family: var(--pixel);
  font-size: clamp(5px, 1vw, 8px);
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.countdown-sep {
  font-family: var(--pixel);
  font-size: clamp(24px, 5vw, 56px);
  color: var(--gold-dark);
  align-self: flex-start;
  padding-top: clamp(6px, 1.5vw, 14px);
  animation: blink-text 1s step-end infinite;
}

/* ===== GUESTLIST ===== */
#guestlist-section {
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.guest-count-badge {
  font-family: var(--pixel);
  font-size: clamp(6px, 1.2vw, 9px);
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  padding: 8px 16px;
  letter-spacing: 2px;
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  max-width: 1200px;
  gap: 12px;
}

.guest-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.guest-card:hover {
  border-color: var(--gold-dark);
  background: var(--surface2);
}

.guest-avatar {
  width: 32px;
  height: 32px;
  background: var(--surface2);
  border: 1px solid var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--gold);
  flex-shrink: 0;
  text-transform: uppercase;
}

.guest-info { overflow: hidden; }

.guest-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest-role {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.guest-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

.guest-status:not(.unconfirmed) {
  background: #44CC44;
}

.guest-status.unconfirmed {
  background: #E08020;
}

/* ===== RSVP ===== */
#rsvp-section {
  padding: 120px 20px;
  text-align: center;
  position: relative;
  background: var(--surface);
}

#rsvp-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.rsvp-title {
  font-family: var(--display);
  font-size: clamp(48px, 10vw, 100px);
  color: var(--gold-light);
  letter-spacing: 8px;
  margin-bottom: 16px;
}

.rsvp-sub {
  font-family: var(--mono);
  font-size: clamp(10px, 2vw, 13px);
  color: var(--muted);
  letter-spacing: 3px;
  margin-bottom: 48px;
}

.rsvp-btn {
  display: inline-block;
  font-family: var(--pixel);
  font-size: clamp(8px, 1.8vw, 13px);
  color: var(--black);
  background: var(--gold);
  text-decoration: none;
  padding: 20px 56px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 6px 6px 0 var(--gold-dark);
  cursor: pointer;
  border: none;
}

.rsvp-btn:hover {
  background: var(--gold-light);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--gold-dark);
}

.rsvp-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--gold-dark);
}

.rsvp-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold-dark);
  margin-top: 24px;
  letter-spacing: 2px;
}

/* ===== FOOTER ===== */
footer {
  padding: 32px 20px;
  text-align: center;
  border-top: 1px solid var(--surface2);
}

footer p {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--gold-dark);
  letter-spacing: 2px;
  opacity: 0.5;
}

/* ===== SECTION HEADINGS ===== */
.section-title {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 80px);
  color: var(--gold-light);
  letter-spacing: 6px;
  line-height: 1;
}

/* ===== DETAILS SECTION ===== */
#details-section {
  padding: 100px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--surface2);
}

.detail-icon {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--gold);
  background: var(--surface);
  border: 1px solid var(--gold-dark);
  padding: 10px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.detail-key {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--gold-dark);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.detail-val {
  font-family: var(--mono);
  font-size: clamp(13px, 2.5vw, 18px);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ===== ANIMATIONS ===== */
@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.6; }
  97% { opacity: 1; }
  98% { opacity: 0.4; }
}

@keyframes blink-btn {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes blink-text {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

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

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

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

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes confirmPop {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== BOTTLE SVG LABELS ===== */
.bottle-label {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--gold);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 1px;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .countdown-grid {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
    gap: 0 clamp(12px, 3vw, 24px);
    row-gap: 24px;
  }
  .mid-sep {
    flex-basis: 100%;
    height: 0;
    visibility: hidden;
    padding: 0;
    font-size: 0;
  }
}
