* { box-sizing: border-box; }

:root {
  --bg-1: #f4f0ff;
  --bg-2: #ece4ff;
  --bg-3: #dcd0f7;
  --ink: #2d2348;
  --muted: #6f5f8a;
  --accent: #6b4ee8;
  --accent-2: #9a7cf2;
  --card: #ffffff;
  --soft: #f0eaff;
  --border: #d8ccf2;
  --shadow: 0 16px 48px rgba(107, 78, 232, 0.18);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Comfortaa', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  min-height: 100vh;
  color: var(--ink);
  overflow-x: hidden;
}

.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hearts-bg::before,
.hearts-bg::after {
  content: "";
  position: absolute;
  font-size: 26px;
  letter-spacing: 80px;
  white-space: nowrap;
  opacity: 0.35;
  animation: float 30s linear infinite;
  top: 10%;
  left: -20%;
  width: 200%;
  line-height: 200px;
}
.hearts-bg::after {
  top: 50%;
  animation-duration: 45s;
  animation-direction: reverse;
  opacity: 0.22;
}
.hearts-bg.sad::before,
.hearts-bg.sad::after {
  content: "";
  opacity: 0.2;
}

@keyframes float {
  from { transform: translateX(0) translateY(0); }
  to   { transform: translateX(-40%) translateY(-20px); }
}

.card {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 40px auto;
  background: var(--card);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}

.title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 24px;
  text-transform: lowercase;
}
.accent { color: var(--accent); }

.subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 24px;
}

.countdown-box {
  background: linear-gradient(135deg, var(--soft), #e3d9ff);
  border-radius: 20px;
  padding: 16px;
  margin: 24px 0;
}
.countdown-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.countdown {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.dates-section { margin: 24px 0; }
.dates-label {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 600;
}
.dates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.date-btn {
  font-family: inherit;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.date-btn:hover { background: var(--soft); transform: translateY(-2px); }
.date-btn.selected {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(107, 78, 232, 0.35);
}

.dates-grid.shake { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.25s ease;
  text-transform: lowercase;
}
.btn-yes {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 22px;
  padding: 16px 48px;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(107, 78, 232, 0.38);
}
.btn-yes:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 28px rgba(107, 78, 232, 0.48); }

.btn-no {
  background: #fff;
  color: var(--muted);
  border: 2px solid var(--border);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 16px;
}

textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  background: #faf7ff;
  color: var(--ink);
}
textarea:focus { outline: none; border-color: var(--accent); }

[hidden] { display: none !important; }

.success-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.5s;
}
.success-inner {
  text-align: center;
  padding: 40px;
}
.big-heart {
  font-size: 120px;
  animation: pulse 1.2s infinite;
}
.success-inner h2 {
  font-size: 36px;
  color: var(--accent);
  margin: 16px 0 8px;
  text-transform: lowercase;
}
.success-inner p {
  font-size: 20px;
  color: var(--ink);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--ink);
  padding: 14px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(107, 78, 232, 0.28);
  font-weight: 600;
  z-index: 200;
  animation: toastIn 0.3s;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
  .card { margin: 16px; padding: 24px 18px; border-radius: 22px; }
  .title { font-size: 19px; }
  .dates-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-yes { font-size: 19px; padding: 14px 36px; }
  .countdown { font-size: 18px; }
  .big-heart { font-size: 90px; }
  .success-inner h2 { font-size: 28px; }
}
