:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e2e8f0;
  background: #020617;
  accent-color: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(244, 63, 245, 0.12), transparent 26%),
    #020617;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 32px 0 80px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8b93a6;
  font-size: 0.82rem;
  margin: 0 0 12px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  line-height: 1.05;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-weight: 700;
}

.panel {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.panel-copy,
.panel-preview,
.share-copy,
.recipient-shell {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 28px;
  padding: 28px;
}

.panel-copy h2,
.share-copy h2,
.recipient-shell h2 {
  margin-top: 0;
}

.panel-copy p,
.share-copy p,
.recipient-shell p {
  color: #cbd5e1;
  line-height: 1.75;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

small {
  color: #94a3b8;
}

.option-group {
  margin-bottom: 18px;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.option {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  border-radius: 16px;
  padding: 12px 18px;
  cursor: pointer;
}

.option.active,
.option:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.primary-btn,
.secondary-btn,
.tertiary-btn {
  border: none;
  border-radius: 16px;
  padding: 16px 22px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #020617;
}

.secondary-btn {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.tertiary-btn {
  background: transparent;
  color: #f8fafc;
}

.hidden {
  display: none;
}

.card-preview,
.message-card {
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 22px;
  min-height: 260px;
}

.preview-label {
  margin: 0 0 14px;
  color: #94a3b8;
}

.preview-header,
.preview-footer {
  margin-bottom: 20px;
}

.preview-header {
  font-size: 1.65rem;
  font-weight: 700;
}

.preview-footer {
  color: #f8fafc;
}

.preview-body {
  color: #cbd5e1;
  line-height: 1.7;
  min-height: 120px;
}

.share-box {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.share-box input {
  background: rgba(15, 23, 42, 0.96);
}

.interactive-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.scene-panel {
  display: grid;
  gap: 28px;
  align-items: center;
}

.cake-card {
  position: relative;
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 36px 24px 24px;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(248, 250, 252, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.cake-top {
  position: relative;
  height: 180px;
  display: grid;
  justify-items: center;
}

.candle-base {
  width: 24px;
  height: 120px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbbf24, #ea580c);
  position: absolute;
  bottom: 0;
}

.flame {
  position: absolute;
  top: -54px;
  width: 28px;
  height: 48px;
  border-radius: 50% 50% 60% 60%;
  background: radial-gradient(circle at 50% 30%, #fee2b3, #f59e0b 35%, transparent 68%);
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.8));
  animation: flicker 0.15s infinite ease-in-out;
  cursor: pointer;
}

@keyframes flicker {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.05) translateY(-1px); }
}

.cake-layer,
.cake-layer-2 {
  width: 100%;
  height: 42px;
  border-radius: 24px;
  margin-top: 12px;
  background: linear-gradient(180deg, #111827, #1f2937);
}

.cake-layer-2 {
  background: linear-gradient(180deg, #1f2937, #111827);
}

.action-controls {
  text-align: center;
}

.action-controls .hint-text {
  color: #94a3b8;
  margin-top: 10px;
}

.reveal-panel {
  margin-top: 24px;
}

.message-card {
  position: relative;
}

.message-card .to-label,
.message-card .from-label {
  color: #fbbf24;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.message-card h3 {
  margin: 0 0 18px;
  font-size: 1.75rem;
}

.message-card p {
  margin: 0 0 16px;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .panel {
    grid-template-columns: 1fr;
  }

  .interactive-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100%, calc(100% - 18px));
    padding: 24px 0 48px;
  }

  .site-header {
    flex-direction: column;
  }

  .action-controls {
    display: grid;
    gap: 14px;
  }
}
