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

:root {
  --bg: #0a0a1a;
  --bg-card: #141428;
  --gold: #c8a45c;
  --gold-light: #e8d5a3;
  --gold-dark: #a07830;
  --text: #f0f0f0;
  --text-muted: #8888aa;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ── Screens ──────────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
}
.screen.active { display: flex; }
.screen { animation: fadeInUp 0.4s ease-out; }

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

.screen > * { position: relative; z-index: 1; }

/* ── HOME SCREEN ─────────────────────────────────────── */
#home { text-align: center; gap: 24px; }

.home-emoji { font-size: 64px; animation: float 3s ease-in-out infinite; }

.home-title {
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 300px;
  line-height: 1.5;
}

.avios-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,164,92,0.1);
  border: 1px solid rgba(200,164,92,0.25);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--gold-light);
}

.spin-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a1a;
  border: none;
  border-radius: 999px;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(200,164,92,0.3);
}
.spin-btn:active { transform: scale(0.96); }

/* ── GLOBE SCREEN ────────────────────────────────────── */
#globe { text-align: center; gap: 32px; }

.globe-wrapper { position: relative; display: inline-block; }

#globe-img {
  width: min(260px, 60vw);
  height: min(260px, 60vw);
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 40px rgba(79,195,247,0.25));
}

.globe-pin {
  position: absolute;
  top: 45%; left: 50%;
  transform: translate(-50%, -100%) scale(0);
  font-size: 36px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.globe-pin.dropped { transform: translate(-50%, -100%) scale(1); }

.globe-text {
  font-size: 18px;
  color: var(--gold-light);
  font-weight: 600;
  min-height: 28px;
}

/* ── SCRATCH SCREEN ──────────────────────────────────── */
#scratch { text-align: center; gap: 20px; }

.scratch-instruction {
  font-size: 16px;
  color: var(--gold-light);
  font-weight: 600;
  animation: pulse 1.5s ease-in-out infinite;
}

.scratch-container {
  position: relative;
  width: min(340px, 85vw);
  height: min(440px, 65vh);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.scratch-reveal {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.scratch-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,26,0.85) 0%, rgba(10,10,26,0.3) 50%, transparent 100%);
}

.scratch-reveal > * { position: relative; }
.scratch-reveal .dest-emoji { font-size: 56px; }
.scratch-reveal .dest-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.scratch-reveal .dest-country {
  font-size: 18px;
  color: #ccc;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.scratch-reveal .dest-tagline {
  font-size: 15px;
  color: var(--gold-light);
  font-style: italic;
  max-width: 260px;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

#scratch-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  cursor: grab;
  touch-action: none;
}

/* ── RESULT SCREEN ───────────────────────────────────── */
#result {
  justify-content: flex-start;
  padding-top: 0;
  gap: 0;
  overflow-y: auto;
}

.result-hero {
  width: 100%;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 20px 32px;
  position: relative;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.result-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 70%;
  background: linear-gradient(to top, var(--bg) 5%, rgba(10,10,26,0.7) 50%, transparent 100%);
  pointer-events: none;
}

.result-hero > * { z-index: 1; }
.result-hero .dest-emoji { font-size: 56px; margin-bottom: 12px; }
.result-hero .dest-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.result-hero .dest-country {
  font-size: 16px;
  color: #ccc;
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.result-hero .dest-tagline {
  color: var(--gold-light);
  font-style: italic;
  margin-top: 8px;
  font-size: 15px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.result-body {
  width: 100%;
  max-width: 600px;
  padding: 0 20px 40px;
  margin: 0 auto;
}

.result-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Cost cards */
.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.cost-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.cost-card.full-width { grid-column: 1 / -1; }
.cost-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cost-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
}
.cost-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag {
  background: rgba(200,164,92,0.1);
  border: 1px solid rgba(200,164,92,0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--gold-light);
}

/* Sections */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.months-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.month {
  width: 42px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 11px; font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
}
.month.active {
  background: rgba(200,164,92,0.15);
  color: var(--gold-light);
  border: 1px solid rgba(200,164,92,0.3);
}

/* Highlights */
.highlights-list { list-style: none; margin-bottom: 24px; }
.highlights-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.highlights-list li::before {
  content: '\2726'; color: var(--gold); font-size: 12px; flex-shrink: 0;
}

/* Itinerary */
.itinerary { margin-bottom: 32px; }
.itin-day {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}
.itin-day-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.itin-day-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a1a;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.itin-day-title { font-size: 15px; font-weight: 700; }
.itin-day-desc {
  font-size: 13px; line-height: 1.6;
  color: var(--text-muted);
  padding-left: 38px;
}

/* Buttons */
.result-actions {
  display: flex; gap: 12px;
  padding: 16px 20px;
  width: 100%; max-width: 600px;
  margin: 0 auto;
}
.btn-secondary {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(200,164,92,0.3);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-secondary:active { transform: scale(0.96); }

/* ── Animations ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out both; }
