/* ============================================================
   STARBOUND LETTERS — MAIN STYLESHEET
   ============================================================ */

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

:root {
  --bg:         #050510;
  --bg2:        #0a0a1f;
  --surface:    rgba(255,255,255,0.04);
  --surface2:   rgba(255,255,255,0.08);
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.15);
  --text:       #e8e8f0;
  --text-muted: #8888aa;
  --accent:     #7c6dfa;
  --accent2:    #a78bfa;
  --gold:       #FFD700;
  --radius:     14px;
  --radius-lg:  22px;
  --font-head:  'Orbitron', monospace;
  --font-body:  'Inter', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── STARFIELD CANVAS ───────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.logo-icon {
  color: var(--gold);
  font-size: 1.2rem;
  animation: pulse 2s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

.nav-link:hover { color: var(--text); }

/* ── FLASH MESSAGES ─────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 80px; right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.flash {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  animation: slideIn 0.3s ease-out;
}

.flash-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
}

.flash-success {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  color: #86efac;
}

/* ── MAIN LAYOUT ────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  padding-top: 64px;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 4px 20px rgba(124,109,250,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,109,250,0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.3);
  background: var(--surface2);
}

.btn-launch {
  background: linear-gradient(135deg, #1a1a3e, #2d1b69);
  color: white;
  border: 1px solid rgba(124,109,250,0.4);
  box-shadow: 0 0 30px rgba(124,109,250,0.2);
  font-family: var(--font-head);
  font-size: 1rem;
  padding: 1rem 2.5rem;
  transition: all 0.3s;
}

.btn-launch:hover {
  background: linear-gradient(135deg, #2d1b69, #4c1d95);
  box-shadow: 0 0 50px rgba(124,109,250,0.5);
  transform: translateY(-3px);
}

.btn-launch.launching {
  animation: launchPulse 0.5s ease-in-out infinite;
}

.btn-small { padding: 0.5rem 1.25rem; font-size: 0.8rem; }
.btn-open  { margin-top: 1rem; width: 100%; justify-content: center; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 700px; }

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(124,109,250,0.15);
  border: 1px solid rgba(124,109,250,0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: var(--font-head);
  color: var(--accent2);
  letter-spacing: 1px;
  margin-bottom: 2rem;
  animation: pulse 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(90deg, var(--gold), var(--accent2), #f0abfc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── MINI GALAXY (HERO BG) ──────────────────────────────────── */
.mini-galaxy {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mini-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: twinkle var(--t, 3s) ease-in-out infinite;
}

.mini-star:nth-child(odd)  { --t: 2.5s; }
.mini-star:nth-child(even) { --t: 3.8s; }

/* ── FEATURES ────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--surface2);
  border-color: var(--border2);
  transform: translateY(-4px);
}

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 0.75rem; letter-spacing: 1px; }
.feature-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ── MOOD LEGEND ─────────────────────────────────────────────── */
.mood-legend {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(30,10,60,0.4), transparent);
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-sub { color: var(--text-muted); margin-bottom: 2rem; }

.mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.mood-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: 1px solid;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.page-sub { color: var(--text-muted); font-size: 1rem; }

/* ── WRITE FORM ──────────────────────────────────────────────── */
.write-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.875rem 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus, .form-textarea:focus {
  border-color: rgba(124,109,250,0.5);
  box-shadow: 0 0 0 3px rgba(124,109,250,0.1);
}

.form-input::placeholder, .form-textarea::placeholder { color: rgba(136,136,170,0.5); }

.form-textarea {
  min-height: 260px;
  resize: vertical;
  line-height: 1.8;
}

/* Date input dark */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}

/* ── MOOD SELECTOR ───────────────────────────────────────────── */
.mood-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mood-option input[type="radio"] { display: none; }

.mood-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
}

.mood-btn:hover {
  border-color: var(--mood-color);
  color: var(--mood-color);
}

.mood-option input:checked + .mood-btn {
  border-color: var(--mood-color);
  color: var(--mood-color);
  background: rgba(0,0,0,0.2);
  box-shadow: 0 0 16px var(--mood-glow), inset 0 0 8px rgba(0,0,0,0.3);
}

/* ── EDITOR WRAPPER ──────────────────────────────────────────── */
.editor-wrapper { position: relative; }

.word-counter {
  position: absolute;
  bottom: 1rem; right: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── LAUNCH SECTION ──────────────────────────────────────────── */
.launch-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
}

.launch-info { display: flex; flex-direction: column; gap: 0.5rem; }
.launch-hint { font-size: 0.875rem; color: var(--text-muted); }

/* ── LAUNCHED PAGE ───────────────────────────────────────────── */
.launched-container {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex-direction: column;
  gap: 2rem;
}

.rocket-animation {
  font-size: 3rem;
  opacity: 0;
}

@keyframes rocketLaunch {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  40%  { opacity: 1; transform: translateY(-20px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-120px) scale(0.5); }
}

.launched-card {
  max-width: 560px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.launched-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.launched-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.launched-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.launched-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.code-reveal {
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(255,215,0,0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.code-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.access-code {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
  margin-bottom: 0.75rem;
}

.code-warning {
  font-size: 0.8rem;
  color: #fbbf24;
  margin-bottom: 1rem;
}

.launch-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.stat { text-align: center; }
.stat-value { display: block; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.launched-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── RETRIEVE PAGE ───────────────────────────────────────────── */
.retrieve-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.code-form { margin-bottom: 3rem; }

.code-input-row {
  display: flex;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.code-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.1rem;
  padding: 0.875rem 1.25rem;
  outline: none;
  transition: border-color var(--transition);
}

.code-input:focus { border-color: rgba(124,109,250,0.5); }

.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.letter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.letter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-color, var(--accent));
  box-shadow: 0 0 12px var(--card-color, var(--accent));
}

.letter-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
}

.letter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.letter-mood { font-size: 0.8rem; color: var(--text-muted); }

.letter-status {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
}

.status-arrived {
  background: rgba(34,197,94,0.15);
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.3);
}

.status-orbiting {
  background: rgba(124,109,250,0.15);
  color: var(--accent2);
  border: 1px solid rgba(124,109,250,0.3);
}

.letter-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.letter-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.letter-arrival { font-size: 0.8rem; color: #86efac; margin-bottom: 0.5rem; }

.countdown-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.countdown-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--card-color, var(--accent)) var(--progress, 0deg), rgba(255,255,255,0.08) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.countdown-days {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
}

.countdown-label { font-size: 0.8rem; color: var(--text-muted); }

.orbit-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.orbit-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-sub { font-size: 0.875rem; margin-top: 0.5rem; }
.empty-sub code {
  background: var(--surface2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

/* ── OPEN LETTER ─────────────────────────────────────────────── */
.open-container {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.envelope-reveal {
  font-size: 6rem;
  text-align: center;
  animation: float 2s ease-in-out infinite;
  transition: all 0.5s;
}

.envelope-reveal.opening {
  animation: envelopeOpen 1.2s ease-out forwards;
}

@keyframes envelopeOpen {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.4) rotate(-10deg); opacity: 1; }
  100% { transform: scale(0) rotate(20deg); opacity: 0; }
}

.letter-reveal {
  max-width: 680px;
  width: 100%;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.6s ease-out;
  display: none;
}

.letter-reveal.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  display: block;
}

.letter-paper {
  background: linear-gradient(135deg, rgba(20,15,50,0.95), rgba(10,8,30,0.98));
  border: 1px solid var(--letter-color, var(--accent));
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px var(--letter-glow, rgba(124,109,250,0.2)),
              inset 0 0 60px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.letter-paper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, var(--letter-glow, rgba(124,109,250,0.05)), transparent 60%);
  pointer-events: none;
}

.letter-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.paper-mood { font-size: 0.9rem; color: var(--letter-color, var(--accent)); font-weight: 600; }

.paper-dates {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.date-divider { color: var(--letter-color, var(--accent)); }

.paper-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--letter-color, var(--text));
  text-shadow: 0 0 20px var(--letter-glow, transparent);
}

.paper-author {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-style: italic;
}

.paper-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 2rem;
}

.paper-signature {
  font-style: italic;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.paper-footer {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(136,136,170,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.open-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── GALAXY PAGE ─────────────────────────────────────────────── */
.galaxy-page {
  padding: 0 2rem 5rem;
}

.galaxy-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.galaxy-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.gstat { text-align: center; }
.gstat-val {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent2);
}
.gstat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.galaxy-canvas-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 2rem auto;
  background: rgba(5,5,20,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#galaxyCanvas {
  display: block;
  width: 100%;
}

.galaxy-tooltip {
  position: absolute;
  background: rgba(10,8,30,0.95);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.mood-breakdown {
  max-width: 600px;
  margin: 3rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.breakdown-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.breakdown-bars { display: flex; flex-direction: column; gap: 1rem; }

.breakdown-row {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 1rem;
}

.bd-mood { font-size: 0.875rem; font-weight: 500; }
.bd-bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.bd-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.bd-count { font-family: var(--font-head); font-size: 0.85rem; text-align: right; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  50% { opacity: 0.3; transform: translate(-50%,-50%) scale(0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes launchPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(124,109,250,0.3); }
  50% { box-shadow: 0 0 60px rgba(124,109,250,0.7); }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-row      { grid-template-columns: 1fr; }
  .code-input-row { flex-direction: column; }
  .launch-section { flex-direction: column; align-items: flex-start; }
  .letter-paper  { padding: 2rem 1.5rem; }
  .launch-stats  { gap: 1rem; }
  .breakdown-row { grid-template-columns: 100px 1fr 32px; }
  .nav-links     { gap: 1rem; }
}
