/* ==============================
   TIMEBOMB - CSS
   Dark, sacred, cinematic
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Lexend:wght@300;400;500;600;700&family=Abril+Fatface&family=DM+Mono:wght@300;400;500&display=swap');

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

:root {
  --bg: #070910;
  --surface: #0d1117;
  --card: #0f1520;
  --card-border: #1a2030;
  --gold: #ffcc00;
  --gold-dim: #b8930a;
  --gold-glow: rgba(255, 204, 0, 0.15);
  --gold-glow-strong: rgba(255, 204, 0, 0.35);
  --amber: #ff9500;
  --amber-deep: #cc7700;
  --text: #e8e4dc;
  --text-dim: #8a8575;
  --text-muted: #4a4640;
  --danger: #ff4444;
  --parchment: #f5e6c8;
  --parchment-dark: #d4c4a0;
  --seal-red: #8b0000;
  --seal-red-light: #cc2222;
}

html {
  scroll-behavior: smooth;
}

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

/* ==============================
   PARTICLE CANVAS
   ============================== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==============================
   NAVIGATION
   ============================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 9, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 204, 0, 0.08);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 204, 0, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 204, 0, 0.6); }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==============================
   PAGES (SPA)
   ============================== */
.page {
  display: none;
  min-height: 100vh;
  padding-top: 64px;
  position: relative;
  z-index: 1;
}

.page.active {
  display: block;
}

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

.hero-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.hero h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(255, 204, 0, 0.3), 0 0 80px rgba(255, 204, 0, 0.1);
  line-height: 1.1;
}

.hero-subtitle {
  font-family: 'Lexend', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 1rem auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-countdown {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-countdown .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-countdown .number {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
  min-width: 80px;
}

.hero-countdown .label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #000;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 40px;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 30px rgba(255, 204, 0, 0.3);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255, 204, 0, 0.5);
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Testimonials */
.testimonials {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.testimonials h2 {
  font-family: 'Abril Fatface', serif;
  font-size: 1.6rem;
  color: var(--text);
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 400;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Abril Fatface', serif;
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.2;
  position: absolute;
  top: 10px;
  left: 18px;
  line-height: 1;
}

.testimonial-card p {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial-card .author {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* How it works */
.how-it-works {
  padding: 5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.how-it-works h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: border-color 0.3s;
}

.step:hover {
  border-color: rgba(255, 204, 0, 0.2);
}

.step-number {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.3;
  margin-bottom: 1rem;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ==============================
   WRITE PAGE
   ============================== */
.write-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.write-header {
  text-align: center;
  margin-bottom: 3rem;
}

.write-header h1 {
  font-family: 'Abril Fatface', serif;
  font-size: 2.2rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.write-header p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Form sections */
.form-section {
  margin-bottom: 2.5rem;
}

.form-section label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Recipient type selector */
.recipient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.75rem;
}

.recipient-option {
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.recipient-option:hover {
  border-color: rgba(255, 204, 0, 0.3);
}

.recipient-option.selected {
  border-color: var(--gold);
  background: rgba(255, 204, 0, 0.05);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.1);
}

.recipient-option .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.recipient-option .name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
}

.recipient-option.selected .name {
  color: var(--gold);
}

.custom-name-input {
  margin-top: 1rem;
  display: none;
}

.custom-name-input.visible {
  display: block;
}

/* Textarea - parchment style */
.letter-textarea {
  width: 100%;
  min-height: 350px;
  background: linear-gradient(135deg, #1a1510, #151210);
  border: 1px solid rgba(255, 204, 0, 0.1);
  border-radius: 16px;
  padding: 2rem;
  color: var(--parchment);
  font-family: 'Lexend', sans-serif;
  font-size: 1.05rem;
  line-height: 1.9;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 2.85rem,
      rgba(255, 204, 0, 0.04) 2.85rem,
      rgba(255, 204, 0, 0.04) 2.9rem
    );
}

.letter-textarea:focus {
  border-color: rgba(255, 204, 0, 0.3);
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.05);
}

.letter-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.char-count {
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Date presets */
.date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.date-preset {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Lexend', sans-serif;
}

.date-preset:hover {
  border-color: rgba(255, 204, 0, 0.3);
  color: var(--text);
}

.date-preset.selected {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 204, 0, 0.05);
}

.custom-date-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.custom-date-row span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

input[type="date"] {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  outline: none;
}

input[type="date"]:focus {
  border-color: var(--gold);
}

input[type="text"] {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: 'Lexend', sans-serif;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

input[type="text"]:focus {
  border-color: rgba(255, 204, 0, 0.3);
}

/* Visibility toggle */
.visibility-options {
  display: flex;
  gap: 1rem;
}

.visibility-option {
  flex: 1;
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}

.visibility-option:hover {
  border-color: rgba(255, 204, 0, 0.2);
}

.visibility-option.selected {
  border-color: var(--gold);
  background: rgba(255, 204, 0, 0.03);
}

.visibility-option .vis-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.visibility-option.selected .vis-title {
  color: var(--gold);
}

.visibility-option .vis-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Author name */
.author-input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-input-row input {
  max-width: 300px;
}

.author-input-row .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Seal button */
.seal-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #000;
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 30px rgba(255, 204, 0, 0.25);
  margin-top: 1rem;
}

.seal-button:hover {
  box-shadow: 0 8px 50px rgba(255, 204, 0, 0.4);
  transform: translateY(-2px);
}

.seal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ==============================
   SEAL ANIMATION OVERLAY
   ============================== */
.seal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 9, 16, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.seal-overlay.active {
  display: flex;
}

.wax-seal {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--seal-red-light), var(--seal-red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 0 rgba(139, 0, 0, 0.5);
  animation: seal-stamp 1.5s ease forwards;
  position: relative;
}

.wax-seal::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 204, 0, 0.3);
}

@keyframes seal-stamp {
  0% { transform: scale(3) rotate(-30deg); opacity: 0; }
  40% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.95); }
  60% { transform: scale(1.02); box-shadow: 0 0 60px rgba(139, 0, 0, 0.8); }
  100% { transform: scale(1); box-shadow: 0 0 30px rgba(139, 0, 0, 0.4); }
}

.seal-text {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-in 0.5s ease 1.2s forwards;
}

.seal-subtext {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.8rem;
  opacity: 0;
  animation: fade-in 0.5s ease 1.6s forwards;
}

.seal-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fade-in 0.5s ease 2s forwards;
}

.seal-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'Lexend', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.seal-actions .btn-primary {
  background: var(--gold);
  color: #000;
}

.seal-actions .btn-secondary {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
}

@keyframes fade-in {
  to { opacity: 1; }
}

/* ==============================
   VAULT WALL
   ============================== */
.vault-page {
  padding: 3rem 2rem 5rem;
}

.vault-header {
  text-align: center;
  margin-bottom: 2rem;
}

.vault-header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.vault-header p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.vault-sort {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.sort-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.sort-btn:hover {
  border-color: rgba(255, 204, 0, 0.3);
}

.sort-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 204, 0, 0.05);
}

/* Vault grid - orbs */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.vault-orb {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(circle at 35% 30%, #1a1520, #0c0a12);
  border: 1px solid rgba(255, 204, 0, 0.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s ease;
  overflow: hidden;
  padding: 1.2rem;
}

.vault-orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, var(--gold-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.vault-orb:hover::before {
  opacity: 1;
}

.vault-orb:hover {
  border-color: rgba(255, 204, 0, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(255, 204, 0, 0.1);
}

.vault-orb.unlocked {
  border-color: rgba(255, 204, 0, 0.2);
}

.vault-orb.unlocked::before {
  opacity: 0.3;
}

.orb-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.3));
}

.orb-timer {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
  line-height: 1.5;
}

.orb-timer.unlocked-text {
  color: var(--amber);
  font-size: 0.7rem;
}

.orb-sealed-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.orb-recipient-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  margin-top: 0.3rem;
}

/* Orb glow animation */
.vault-orb:nth-child(3n) { animation: orb-breathe 4s ease-in-out infinite; }
.vault-orb:nth-child(3n+1) { animation: orb-breathe 5s ease-in-out 0.5s infinite; }
.vault-orb:nth-child(3n+2) { animation: orb-breathe 6s ease-in-out 1s infinite; }

@keyframes orb-breathe {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 204, 0, 0.03); }
  50% { box-shadow: 0 0 25px rgba(255, 204, 0, 0.08); }
}

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

.vault-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.vault-empty p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.vault-empty a {
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
}

/* ==============================
   MODAL
   ============================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(7, 9, 16, 0.9);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  animation: modal-in 0.3s ease;
}

@keyframes modal-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s;
}

.modal-close:hover {
  background: var(--card);
  color: var(--text);
}

.modal-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px rgba(255, 204, 0, 0.3));
}

.modal h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--gold);
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.modal .modal-recipient {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.modal-countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.modal-countdown .cd-unit {
  text-align: center;
  background: var(--card);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  min-width: 60px;
}

.modal-countdown .cd-number {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}

.modal-countdown .cd-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.modal-details {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-details .detail-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.modal-share-url {
  margin-top: 1rem;
  padding: 0.6rem;
  background: var(--card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-share-url input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  outline: none;
}

.modal-share-url button {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==============================
   MY LETTERS PAGE
   ============================== */
.my-letters-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.my-letters-page h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.5rem;
}

.my-letters-page > p {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.my-letter-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.8rem;
  margin-bottom: 1.2rem;
  transition: all 0.3s;
  cursor: pointer;
}

.my-letter-card:hover {
  border-color: rgba(255, 204, 0, 0.15);
}

.my-letter-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.my-letter-recipient {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.my-letter-recipient .icon {
  font-size: 1.5rem;
}

.my-letter-recipient .info h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.my-letter-recipient .info .type {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.my-letter-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
}

.my-letter-status.sealed {
  color: var(--gold);
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.15);
}

.my-letter-status.opened {
  color: var(--amber);
  background: rgba(255, 149, 0, 0.08);
  border: 1px solid rgba(255, 149, 0, 0.15);
}

.my-letter-countdown {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.my-letter-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Unlocked letter content */
.my-letter-content {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.my-letter-content .letter-body {
  background: linear-gradient(135deg, #1a1510, #151210);
  border-radius: 12px;
  padding: 2rem;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--parchment);
  white-space: pre-wrap;
  font-family: 'Lexend', sans-serif;
}

.my-letters-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.my-letters-empty a {
  color: var(--gold);
  cursor: pointer;
}

/* ==============================
   LETTER VIEW PAGE (/letter/:id)
   ============================== */
.letter-view-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  text-align: center;
}

.lv-sealed {
  padding: 3rem 0;
}

.lv-sealed .lv-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.3));
}

.lv-sealed h1 {
  font-family: 'Abril Fatface', serif;
  font-size: 2rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.lv-sealed .lv-to {
  color: var(--gold-dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.lv-countdown-large {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.lv-countdown-large .cd-unit {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  min-width: 80px;
}

.lv-countdown-large .cd-number {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.lv-countdown-large .cd-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.lv-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

.lv-sealed-msg {
  font-family: 'Abril Fatface', serif;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-top: 3rem;
  font-weight: 400;
}

/* Unlocked view */
.lv-unlocked h1 {
  font-family: 'Abril Fatface', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.lv-unlocked .lv-to {
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.lv-unlocked .letter-body {
  background: linear-gradient(135deg, #1a1510, #151210);
  border: 1px solid rgba(255, 204, 0, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: left;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--parchment);
  white-space: pre-wrap;
  max-width: 600px;
  margin: 0 auto;
}

.lv-unlocked .lv-author {
  margin-top: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==============================
   UNLOCK ANIMATION
   ============================== */
.unlock-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 9, 16, 0.97);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.unlock-overlay.active {
  display: flex;
}

.unlock-seal {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--seal-red-light), var(--seal-red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: seal-break 2s ease forwards;
  position: relative;
}

@keyframes seal-break {
  0% { transform: scale(1); opacity: 1; }
  30% { transform: scale(1.1); }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 60px rgba(255, 204, 0, 0.5);
  }
  70% {
    transform: scale(1.2);
    opacity: 0.8;
    box-shadow: 0 0 100px rgba(255, 204, 0, 0.8);
  }
  100% {
    transform: scale(3);
    opacity: 0;
    box-shadow: 0 0 200px rgba(255, 204, 0, 1);
  }
}

.unlock-text {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 2rem;
  opacity: 0;
  animation: fade-in 0.8s ease 1.8s forwards;
}

/* ==============================
   PARTICLE BURST (for sealing)
   ============================== */
.particle-burst {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
}

.burst-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  animation: burst-fly 1.2s ease-out forwards;
}

@keyframes burst-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ==============================
   LOADING STATE
   ============================== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--card-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==============================
   SCROLLBAR
   ============================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #1a2030;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3040;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(7, 9, 16, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--card-border);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-countdown {
    gap: 1rem;
  }

  .hero-countdown .number {
    font-size: 2rem;
    min-width: 60px;
  }

  .stats-bar {
    gap: 2rem;
  }

  .vault-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .recipient-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .visibility-options {
    flex-direction: column;
  }

  .lv-countdown-large {
    gap: 0.8rem;
  }

  .lv-countdown-large .cd-unit {
    padding: 0.8rem 1rem;
    min-width: 65px;
  }

  .lv-countdown-large .cd-number {
    font-size: 1.5rem;
  }

  .modal {
    padding: 1.8rem;
  }

  .modal-countdown .cd-unit {
    padding: 0.5rem 0.6rem;
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .vault-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==============================
   AUTH - NAVBAR
   ============================== */
.nav-auth {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
}

.nav-signin-btn {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #000;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s;
  white-space: nowrap;
}

.nav-signin-btn:hover {
  box-shadow: 0 4px 20px rgba(255, 204, 0, 0.3);
  transform: translateY(-1px);
}

.nav-signin-btn svg {
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.3s;
}

.nav-user:hover {
  background: rgba(255, 204, 0, 0.05);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 204, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-avatar-initials {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 204, 0, 0.08);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-username {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==============================
   USER DROPDOWN
   ============================== */
.user-dropdown {
  display: none;
  position: fixed;
  z-index: 6000;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 160px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.2s ease;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.user-dropdown a:hover {
  background: rgba(255, 204, 0, 0.05);
  color: var(--text);
}

/* ==============================
   PAYMENT WALL MODAL
   ============================== */
.payment-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: rgba(7, 9, 16, 0.92);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.payment-overlay.active {
  display: flex;
}

.payment-modal {
  background: linear-gradient(145deg, #0d1117, #0f1520);
  border: 1px solid rgba(255, 204, 0, 0.12);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 3rem 2.5rem;
  position: relative;
  animation: modal-in 0.35s ease;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.payment-lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.4));
}

.payment-heading {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.payment-subtitle {
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.payment-copy {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.payment-copy strong {
  color: var(--gold);
}

.payment-features {
  text-align: left;
  margin-bottom: 1.5rem;
}

.payment-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.45rem 0;
  color: var(--text);
  font-size: 0.88rem;
}

.payment-feature .check {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.payment-breakdown {
  background: rgba(255, 204, 0, 0.03);
  border: 1px solid rgba(255, 204, 0, 0.08);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breakdown-total {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0 0.2rem;
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 600;
  border-top: 1px solid rgba(255, 204, 0, 0.1);
  margin-top: 0.3rem;
}

.payment-cta {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #000;
  font-family: 'Orbitron', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 25px rgba(255, 204, 0, 0.25);
  margin-bottom: 0.8rem;
}

.payment-cta:hover {
  box-shadow: 0 8px 40px rgba(255, 204, 0, 0.4);
  transform: translateY(-2px);
}

.payment-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.payment-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.5px;
}

.payment-signin-hint {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.payment-signin-hint a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 204, 0, 0.3);
  transition: border-color 0.3s;
}

.payment-signin-hint a:hover {
  border-color: var(--gold);
}

/* ==============================
   RESPONSIVE - AUTH ADDITIONS
   ============================== */
@media (max-width: 768px) {
  .nav-auth {
    margin-left: 0.5rem;
  }

  .nav-username {
    display: none;
  }

  .nav-signin-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .nav-signin-btn svg {
    display: none;
  }

  .payment-modal {
    padding: 2rem 1.5rem;
  }

  .payment-heading {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }
}
