/* ═══════════════════════════════════════════════════════════
   Achalugo — Valentine's Day 2026
   A playful, pink, mobile-first stylesheet
   ═══════════════════════════════════════════════════════════ */

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

[hidden] {
  display: none !important;
}

:root {
  --pink-light: #fff0f3;
  --pink: #ff6b8a;
  --pink-dark: #e84574;
  --red: #e63946;
  --rose: #f4a0b3;
  --white: #ffffff;
  --text: #2b2b2b;
  --text-light: #6b6b6b;
  --shadow: 0 8px 32px rgba(230, 57, 70, 0.15);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, var(--pink-light) 0%, #ffe0e6 50%, #ffd6e0 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  position: relative;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* ── Floating Hearts Background ───────────────────────────── */
.hearts-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.08;
  animation: floatHeart 6s ease-in-out infinite;
}
.h1 { top: 10%; left: 5%;  animation-delay: 0s; }
.h2 { top: 25%; right: 8%; animation-delay: 1.2s; }
.h3 { bottom: 15%; left: 12%; animation-delay: 2.5s; }
.h4 { top: 60%; right: 15%; animation-delay: 0.8s; }
.h5 { bottom: 30%; left: 70%; animation-delay: 3.5s; }

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(10deg); }
}

/* ── Typography ───────────────────────────────────────────── */
.title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pink-dark);
  margin-bottom: 0.25rem;
}

.heart-icon {
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

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

/* ── Countdown Badge ──────────────────────────────────────── */
.countdown-badge {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.countdown-warning {
  background: #fff3cd;
  color: #856404;
}

.countdown-urgent {
  background: #fee2e2;
  color: #dc2626;
  animation: pulse 1.5s ease-in-out infinite;
}

.highlight {
  color: var(--pink-dark);
  font-weight: 700;
}

/* ── Flash Message ─────────────────────────────────────────── */
.flash-message {
  margin-top: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  position: relative;
  animation: flashSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flash-message.flash-error {
  background: #fff0f3;
  color: var(--pink-dark);
  border: 2px solid var(--rose);
}

.flash-message.flash-info {
  background: #f0f4ff;
  color: #4361ee;
  border: 2px solid #bbd0ff;
}

.flash-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
}

.flash-close:hover {
  opacity: 1;
}

@keyframes flashSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Form ─────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  text-align: left;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.2s;
  outline: none;
}

.field input:focus {
  border-color: var(--pink);
}

.field input::placeholder {
  color: #bbb;
}

.optional-tag {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.8rem;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}

.youtube-embed {
  margin-top: 1.2rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  color: var(--white);
  width: 100%;
}

.btn-secondary {
  background: var(--pink-light);
  color: var(--pink-dark);
}

.btn-copy {
  background: var(--pink-dark);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ── Yes/No Buttons ───────────────────────────────────────── */
.valentine-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  position: relative;
  min-height: 70px;
}

.btn-yes {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  color: white;
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
  border-radius: 14px;
  z-index: 2;
}

.btn-yes:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 24px rgba(22, 163, 74, 0.3);
}

.btn-no {
  background: linear-gradient(135deg, #f87171 0%, var(--red) 100%);
  color: white;
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
  border-radius: 14px;
  position: relative;
  transition: none; /* JS controls movement */
  z-index: 1;
  user-select: none;
}

/* ── Link Box ─────────────────────────────────────────────── */
.link-box {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.link-box input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--pink);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--pink-dark);
  background: var(--pink-light);
  outline: none;
}

/* ── Result / Success States ──────────────────────────────── */
.result h2 {
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.5rem 0 1.5rem;
}

.success-msg {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  color: #166534;
}

/* ── Valentine Interaction Page ───────────────────────────── */
.valentine-page {
  max-width: 520px;
}

.valentine-interaction {
  padding: 3rem 2rem;
}

.valentine-title {
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.valentine-question {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.valentine-hint {
  font-size: 0.85rem;
  color: #c06;
  opacity: 0.75;
  margin-top: 0.25rem;
  font-style: italic;
}

.valentine-ask {
  font-size: 1.5rem;
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
}

/* ── Celebration ──────────────────────────────────────────── */
.celebration {
  padding: 3rem 2rem;
  position: relative;
}

.celebration h1 {
  font-size: 2.5rem;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.celebration-content {
  position: relative;
  z-index: 2;
}

.celebration-sub {
  font-size: 1.2rem;
  color: var(--rose);
  margin-top: 1rem;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* ── Closed Page ──────────────────────────────────────────── */
.closed-page {
  text-align: center;
}

.closed-hero {
  margin: 1.5rem 0 2rem;
}

.closed-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.closed-hero h2 {
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
}

.closed-notice {
  background: var(--pink-light);
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.waitlist-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f0d0d8;
}

.waitlist-section h3 {
  color: var(--pink-dark);
  margin-bottom: 0.25rem;
}

/* ── Loading ──────────────────────────────────────────────── */
.loading-text {
  font-size: 1.1rem;
  color: var(--text-light);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ── Footer ───────────────────────────────────────────────── */

/* ── Success Page ─────────────────────────────────────────── */
.success-page {
  text-align: center;
}

.success-hero {
  margin-bottom: 1.5rem;
}

.success-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.success-hero h1 {
  font-size: 1.75rem;
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
}

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

.share-section {
  margin: 1.5rem 0;
}

.share-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-share {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  border-radius: 10px;
  text-decoration: none;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}

.btn-twitter {
  background: #1d9bf0;
  color: white;
}

.success-actions {
  margin-top: 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ── Turnstile widget centering ───────────────────────────── */
.cf-turnstile {
  display: flex;
  justify-content: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.25rem;
  }
  .title {
    font-size: 1.6rem;
  }
  .valentine-buttons {
    flex-direction: column;
    align-items: center;
  }
}
