/* ═══════════════════════════════════════════
   Felicidades — Pure Web SPA Styles
   ═══════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --cream: #FFF8E7;
  --purple: #6B21A8;
  --purple-light: #9333EA;
  --purple-dark: #4C1D95;
  --gold: #F59E0B;
  --gold-light: #FBBF24;
  --white: #FFFFFF;
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --error: #DC2626;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-dark);
  background: var(--cream);
  min-height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.dark-bg {
  background: linear-gradient(160deg, #0c0118 0%, #1a0a3e 35%, #0d0b2e 65%, #0c0118 100%);
  color: var(--white);
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ─── Typography ─── */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ─── Layout ─── */
#balloons-bg {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: none;
}

#balloons-bg.active {
  display: block;
  /* pointer-events stays none — individual .bl-balloon have pointer-events:auto */
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-sm {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── Loading ─── */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(107,33,168,0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.white {
  border-color: rgba(255,255,255,0.2);
  border-top-color: white;
}

.spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

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

/* ─── Cards ─── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body { padding: 24px; }

.card.dark {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.5;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) {
  background: var(--purple-light);
}

.btn-gold {
  background: var(--gold);
  color: var(--text-dark);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-light);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(107,33,168,0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--purple);
  padding: 8px 16px;
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(107,33,168,0.06);
}

.btn-danger {
  background: var(--error);
  color: var(--white);
}

.btn-white {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  backdrop-filter: blur(8px);
}
.btn-white:hover:not(:disabled) {
  background: rgba(255,255,255,0.25);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.btn-full { width: 100%; }

/* ─── Inputs ─── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(107,33,168,0.15);
}

.form-input.error, .form-textarea.error {
  border-color: var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 4px;
}

.form-input-prefix {
  display: flex;
  align-items: center;
}

.form-input-prefix .prefix {
  padding: 12px 0 12px 16px;
  color: var(--text-muted);
  font-size: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.form-input-prefix .form-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Checkbox */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.checkbox-item:hover {
  background: rgba(107,33,168,0.04);
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

.checkbox-label {
  flex: 1;
}

.checkbox-label .title {
  font-weight: 500;
}

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

/* ─── Divider ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Alert ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin: 12px 0;
}

.alert-error {
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid #FECACA;
}

/* ─── AppBar ─── */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-bar h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.app-bar-actions {
  display: flex;
  gap: 8px;
}

/* ═══════════════════════════════════════════
   Page: Landing
   ═══════════════════════════════════════════ */
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 24px 20px;
  position: relative;
  overflow: hidden;
  gap: 6px;
}

/* ─── Floating sparkles ─── */
.landing-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  animation: landing-float 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
  opacity: 0;
}

.landing-spark:nth-child(odd)  { background: var(--gold-light); }
.landing-spark:nth-child(even) { background: rgba(206, 147, 216, 0.8); }
.landing-spark:nth-child(1)  { top: 8%;  left: 12%; width: 5px; height: 5px; }
.landing-spark:nth-child(2)  { top: 15%; right: 10%; width: 3px; height: 3px; }
.landing-spark:nth-child(3)  { top: 22%; left: 6%; }
.landing-spark:nth-child(4)  { top: 35%; right: 15%; width: 6px; height: 6px; }
.landing-spark:nth-child(5)  { top: 50%; left: 10%; width: 3px; height: 3px; }
.landing-spark:nth-child(6)  { top: 60%; right: 8%; }
.landing-spark:nth-child(7)  { top: 70%; left: 18%; width: 5px; height: 5px; }
.landing-spark:nth-child(8)  { top: 78%; right: 20%; width: 3px; height: 3px; }
.landing-spark:nth-child(9)  { top: 85%; left: 8%; }
.landing-spark:nth-child(10) { top: 12%; left: 50%; width: 3px; height: 3px; }
.landing-spark:nth-child(11) { top: 45%; right: 5%; width: 5px; height: 5px; }
.landing-spark:nth-child(12) { top: 90%; right: 12%; }

@keyframes landing-float {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
  20%      { opacity: 1; transform: translateY(-8px) scale(1); }
  50%      { opacity: 0.8; transform: translateY(-20px) scale(1.2); }
  80%      { opacity: 0.3; transform: translateY(-35px) scale(0.8); }
}

/* ─── Cake SVG ─── */
.landing-emoji {
  margin-bottom: 4px;
  animation: bounce-in 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.35)) drop-shadow(0 0 40px rgba(147, 51, 234, 0.15));
  position: relative;
  z-index: 1;
}

.landing-emoji svg {
  width: 130px;
  height: 130px;
}

/* ─── Title with shimmer ─── */
.landing-title {
  font-family: 'Dancing Script', cursive;
  font-size: 4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  background: linear-gradient(
    120deg,
    #FFF8E7 0%,
    #FBBF24 25%,
    #FFE082 50%,
    #FBBF24 75%,
    #FFF8E7 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite, bounce-in 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  text-shadow: none;
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ─── Subtitle ─── */
.landing-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 420px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s 0.3s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Feature pills ─── */
.landing-features {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.landing-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  animation: pill-in 0.5s calc(0.5s + var(--delay) * 0.12s) both;
  transition: transform 0.2s, background 0.2s;
}

.landing-pill:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.18);
}

.landing-pill-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
}

.landing-pill-icon svg {
  width: 24px;
  height: 24px;
}

@keyframes pill-in {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Buttons ─── */
.landing-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s 0.6s both;
}

.landing-cta {
  font-size: 1.1rem;
  padding: 14px 32px;
  animation: cta-pulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(107, 33, 168, 0.3);
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(107, 33, 168, 0.3); }
  50%      { box-shadow: 0 0 30px rgba(107, 33, 168, 0.5), 0 0 60px rgba(147, 51, 234, 0.2); }
}

/* ─── Footer badges ─── */
.landing-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  margin-top: 8px;
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s 0.8s both;
}

@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════
   Page: Login
   ═══════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.login-header p {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   Page: Dashboard
   ═══════════════════════════════════════════ */
.dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 32px;
}

.dashboard-empty .emoji { margin-bottom: 16px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 16px;
}

.felicitacion-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.felicitacion-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.felicitacion-card .card-body {
  display: flex;
  flex-direction: column;
  min-height: 160px;
}

.felicitacion-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.felicitacion-card .card-header h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.felicitacion-card .card-title {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: auto;
}

.felicitacion-card .slug-badge {
  display: inline-block;
  background: rgba(107,33,168,0.08);
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  margin-top: 12px;
}

.felicitacion-card .card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Menu dropdown */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1.2rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: background 0.15s;
}

.menu-btn:hover { background: rgba(0,0,0,0.05); }

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}

.dropdown-menu.show { display: block; }

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: background 0.15s;
}

.dropdown-item:hover { background: rgba(0,0,0,0.04); }
.dropdown-item.danger { color: var(--error); }
.dropdown-item.danger:hover { background: #FEF2F2; }

/* FAB */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
}

/* ═══════════════════════════════════════════
   Page: Create / Edit
   ═══════════════════════════════════════════ */
.create-edit-page {
  min-height: 100vh;
  padding: 0 16px 80px;
  position: relative;
}

.create-edit-page.create-mode {
  padding-top: 0;
}

.create-edit-page .container {
  max-width: 600px;
}

/* ─── Back button ─── */
.create-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  transition: background 0.2s, transform 0.2s;
  animation: fade-up 0.5s both;
}

.create-back-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateX(-2px);
}

/* ─── Festive Header ─── */
.create-header {
  text-align: center;
  padding: 60px 24px 24px;
  position: relative;
  overflow: hidden;
}

.create-header--edit {
  padding: 70px 24px 16px;
}

.create-emoji {
  animation: bounce-in 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.35)) drop-shadow(0 0 40px rgba(147, 51, 234, 0.15));
  margin-bottom: 8px;
}

.create-emoji svg {
  width: 100px;
  height: 100px;
}

.create-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  background: linear-gradient(120deg, #FFF8E7 0%, #FBBF24 25%, #FFE082 50%, #FBBF24 75%, #FFF8E7 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite, bounce-in 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.create-title--edit {
  font-family: var(--font-heading);
  font-size: 2rem;
  animation: fade-up 0.6s both;
}

.create-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 360px;
  margin: 0 auto;
  animation: fade-up 0.8s 0.3s both;
}

/* ─── Sparkles ─── */
.create-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.create-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  animation: landing-float 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.4s);
  opacity: 0;
}

.create-spark:nth-child(odd)  { background: var(--gold-light); }
.create-spark:nth-child(even) { background: rgba(206, 147, 216, 0.8); }
.create-spark:nth-child(1)  { top: 10%; left: 8%;  width: 5px; height: 5px; }
.create-spark:nth-child(2)  { top: 18%; right: 6%; width: 3px; height: 3px; }
.create-spark:nth-child(3)  { top: 30%; left: 12%; }
.create-spark:nth-child(4)  { top: 5%;  right: 18%; width: 6px; height: 6px; }
.create-spark:nth-child(5)  { top: 55%; left: 5%;  width: 3px; height: 3px; }
.create-spark:nth-child(6)  { top: 40%; right: 10%; }
.create-spark:nth-child(7)  { top: 65%; left: 15%; width: 5px; height: 5px; }
.create-spark:nth-child(8)  { top: 75%; right: 8%;  width: 3px; height: 3px; }
.create-spark:nth-child(9)  { top: 25%; left: 50%; }
.create-spark:nth-child(10) { top: 50%; right: 20%; width: 4px; height: 4px; }

/* ─── Glass Card ─── */
.create-card {
  animation: create-card-in 0.6s 0.2s both;
}

@keyframes create-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.create-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.create-card-icon {
  font-size: 1.4rem;
}

.create-card-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}

.create-card-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* ─── Dark form overrides ─── */
.create-edit-page .form-label {
  color: rgba(255,255,255,0.85);
}

.create-edit-page .form-optional {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.create-edit-page .form-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.create-edit-page .form-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.create-edit-page .form-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.create-edit-page .form-input:disabled {
  opacity: 0.5;
}

.create-edit-page .form-input-prefix .prefix {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-right: none;
  color: rgba(255,255,255,0.4);
}

.create-edit-page .form-hint {
  color: rgba(255,255,255,0.4);
}

/* ─── Staggered field entrance ─── */
.create-field {
  animation: create-field-in 0.5s calc(0.3s + var(--fi) * 0.08s) both;
}

@keyframes create-field-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Content type cards ─── */
.create-types-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.create-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.create-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}

.create-type-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.create-type-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: color 0.25s, transform 0.25s;
}

.create-type-icon svg {
  width: 26px;
  height: 26px;
}

.create-type-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transition: color 0.25s;
}

.create-type-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  transition: color 0.25s;
}

.create-type-check {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  transition: all 0.25s;
}

/* Active state */
.create-type-card.active {
  background: rgba(107, 33, 168, 0.2);
  border-color: var(--purple-light);
  box-shadow: 0 0 16px rgba(147, 51, 234, 0.15);
}

.create-type-card.active .create-type-icon {
  color: var(--gold-light);
  transform: scale(1.1);
}

.create-type-card.active .create-type-name {
  color: var(--white);
}

.create-type-card.active .create-type-desc {
  color: rgba(255,255,255,0.55);
}

.create-type-card.active .create-type-check {
  background: var(--purple-light);
  border-color: var(--purple-light);
  color: var(--white);
}

.create-type-card:hover:not(.active) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ─── Submit button ─── */
.create-submit {
  margin-top: 24px;
  font-size: 1.05rem;
  padding: 14px 24px;
  animation: create-field-in 0.5s calc(0.3s + var(--fi) * 0.08s) both, cta-pulse 2.5s 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(107, 33, 168, 0.3);
}

/* ─── Legacy section titles ─── */
.section-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* Block list */
.block-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.block-list-item:last-child { border-bottom: none; }

.block-list-item .block-icon {
  color: var(--gold-light);
  font-size: 1.2rem;
}

.block-list-item .block-info {
  flex: 1;
  min-width: 0;
}

.block-list-item .block-author {
  font-weight: 500;
  color: var(--white);
}

.block-list-item .block-preview {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.block-list-item .block-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

.block-list-item .btn-delete {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.block-list-item .btn-delete:hover { opacity: 1; }

/* Share link */
.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.share-link-box span {
  color: rgba(255,255,255,0.7);
}

.share-link-box code {
  flex: 1;
  font-size: 0.8rem;
  color: var(--gold-light);
  word-break: break-all;
}

.share-link-box .btn-ghost {
  color: var(--white);
  font-size: 0.8rem;
  padding: 6px 10px;
}

.share-link-box .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
}

/* ─── Dark text overrides ─── */
.create-edit-page .text-muted {
  color: rgba(255,255,255,0.5);
}

/* ─── Dark alert override ─── */
.create-edit-page .alert-error {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #FCA5A5;
}

/* ─── Mobile adjustments ─── */
@media (max-width: 400px) {
  .create-types-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .create-type-card {
    flex-direction: row;
    padding: 12px 16px;
    gap: 12px;
    text-align: left;
  }
  .create-type-desc { display: none; }
  .create-title { font-size: 2.2rem; }
}

/* ═══════════════════════════════════════════
   Page: Public View — FIESTA
   ═══════════════════════════════════════════ */
:root {
  --font-fiesta: 'Dancing Script', cursive;
}

.public-view {
  min-height: 100vh;
  padding-bottom: 100px;
  position: relative;
  overflow-x: hidden;
}

/* ─── Confetti Rain (CSS only) ─── */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall linear infinite;
}

.confetti:nth-child(1)  { left: 5%;  width: 8px; height: 12px; background: #FF6B8A; border-radius: 2px; animation-duration: 4.2s; animation-delay: 0s; }
.confetti:nth-child(2)  { left: 12%; width: 6px; height: 6px; background: #FFD54F; border-radius: 50%; animation-duration: 5.1s; animation-delay: 0.3s; }
.confetti:nth-child(3)  { left: 22%; width: 10px; height: 6px; background: #4FC3F7; border-radius: 1px; animation-duration: 4.5s; animation-delay: 0.8s; }
.confetti:nth-child(4)  { left: 30%; width: 7px; height: 10px; background: #AED581; border-radius: 2px; animation-duration: 5.8s; animation-delay: 0.2s; }
.confetti:nth-child(5)  { left: 40%; width: 8px; height: 8px; background: #CE93D8; border-radius: 50%; animation-duration: 4.8s; animation-delay: 1.2s; }
.confetti:nth-child(6)  { left: 50%; width: 12px; height: 5px; background: #FF8A65; border-radius: 1px; animation-duration: 5.3s; animation-delay: 0.5s; }
.confetti:nth-child(7)  { left: 58%; width: 6px; height: 10px; background: #FBBF24; border-radius: 2px; animation-duration: 4.1s; animation-delay: 1.5s; }
.confetti:nth-child(8)  { left: 68%; width: 9px; height: 9px; background: #F48FB1; border-radius: 50%; animation-duration: 5.6s; animation-delay: 0.1s; }
.confetti:nth-child(9)  { left: 75%; width: 7px; height: 12px; background: #81D4FA; border-radius: 2px; animation-duration: 4.7s; animation-delay: 0.9s; }
.confetti:nth-child(10) { left: 85%; width: 10px; height: 6px; background: #A5D6A7; border-radius: 1px; animation-duration: 5.4s; animation-delay: 0.6s; }
.confetti:nth-child(11) { left: 92%; width: 8px; height: 8px; background: #FFB74D; border-radius: 50%; animation-duration: 4.4s; animation-delay: 1.8s; }
.confetti:nth-child(12) { left: 17%; width: 6px; height: 11px; background: #EF5350; border-radius: 2px; animation-duration: 5.0s; animation-delay: 2.1s; }
.confetti:nth-child(13) { left: 45%; width: 11px; height: 7px; background: #AB47BC; border-radius: 1px; animation-duration: 4.6s; animation-delay: 1.0s; }
.confetti:nth-child(14) { left: 63%; width: 7px; height: 7px; background: #FFEE58; border-radius: 50%; animation-duration: 5.2s; animation-delay: 0.4s; }

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 0; }
  5%   { opacity: 0.9; }
  70%  { opacity: 0.7; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0.4); opacity: 0; }
}

/* ─── Header ─── */
.public-header {
  text-align: center;
  padding: 50px 24px 24px;
  position: relative;
}

.public-header .party-emojis {
  margin-bottom: 8px;
  animation: bounce-in 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.public-header .cake {
  display: inline-block;
  animation: cake-bounce 1s cubic-bezier(0.22, 1, 0.36, 1), cake-float 3s ease-in-out 1s infinite;
  filter: drop-shadow(0 8px 24px rgba(251, 191, 36, 0.3));
}

@keyframes cake-bounce {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  50%  { transform: scale(1.3) rotate(5deg); }
  70%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

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

.public-header .title {
  font-family: var(--font-fiesta);
  font-size: 2.2rem;
  color: var(--gold-light);
  font-weight: 600;
  margin: 12px 0 4px;
  animation: fade-up 0.6s ease-out 0.3s both;
}

.public-header .name {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(251, 191, 36, 0.25), 0 0 60px rgba(147, 51, 234, 0.2);
  animation: name-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  line-height: 1.15;
}

@keyframes name-reveal {
  0%   { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.public-header .fiesta-badge {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 50px;
  font-family: var(--font-fiesta);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.5), rgba(251, 191, 36, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  animation: badge-glow 2s ease-in-out infinite, fade-up 0.6s ease-out 0.5s both;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.2), 0 0 30px rgba(147, 51, 234, 0.1); }
  50%      { box-shadow: 0 0 25px rgba(251, 191, 36, 0.4), 0 0 50px rgba(147, 51, 234, 0.2); }
}

/* ─── Sparkle decorations around header ─── */
.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: sparkle-twinkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 25%; right: 12%; animation-delay: 0.5s; width: 6px; height: 6px; }
.sparkle:nth-child(3) { top: 40%; left: 8%; animation-delay: 1s; width: 3px; height: 3px; }
.sparkle:nth-child(4) { top: 10%; right: 20%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { top: 50%; right: 8%; animation-delay: 0.3s; width: 5px; height: 5px; }
.sparkle:nth-child(6) { top: 60%; left: 15%; animation-delay: 0.8s; width: 3px; height: 3px; }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50%      { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--gold-light), 0 0 12px rgba(251, 191, 36, 0.3); }
}

/* ─── Public blocks ─── */
.public-blocks {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
}

.public-block {
  margin-bottom: 24px;
  animation: block-appear 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.public-block:nth-child(1) { animation-delay: 0.6s; }
.public-block:nth-child(2) { animation-delay: 0.75s; }
.public-block:nth-child(3) { animation-delay: 0.9s; }
.public-block:nth-child(4) { animation-delay: 1.05s; }
.public-block:nth-child(5) { animation-delay: 1.2s; }
.public-block:nth-child(n+6) { animation-delay: 1.3s; }

@keyframes block-appear {
  0%   { opacity: 0; transform: translateY(30px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Text block card ─── */
.text-block-card {
  padding: 28px;
  position: relative;
}

.text-block-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(251,191,36,0.3), rgba(147,51,234,0.3), rgba(251,191,36,0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.text-block-card .quote-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--gold-light), #FF8A65);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.text-block-card .message {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
  margin: 8px 0 20px;
  white-space: pre-wrap;
}

.text-block-card .author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.text-block-card .author {
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--gold-light), #FFD54F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-block-card .time {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* ─── Image block card ─── */
.image-block-card {
  position: relative;
}

.image-block-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(79,195,247,0.3), rgba(206,147,216,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.image-block-card img {
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 500px;
  object-fit: cover;
}

.image-block-card .card-footer {
  padding: 16px 20px;
}

.image-block-card .caption {
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}

.image-block-card .author-row {
  display: flex; align-items: center; justify-content: space-between;
}
.image-block-card .author { font-weight: 600; color: var(--gold-light); font-size: 0.9rem; }
.image-block-card .time { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ─── Video block card ─── */
.video-block-card {
  position: relative;
}

.video-block-card .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-block-card .video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.video-block-card .card-footer {
  padding: 16px 20px;
}

.video-block-card .author-row {
  display: flex; align-items: center; justify-content: space-between;
}
.video-block-card .author { font-weight: 600; color: var(--gold-light); font-size: 0.9rem; }
.video-block-card .time { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ─── Native video player in cards ─── */
.video-player-wrapper {
  position: relative;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.video-player {
  display: block;
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ─── Message Balloon Hint ─── */
.msg-balloon-hint {
  text-align: center;
  font-family: var(--font-fiesta);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  padding: 20px 24px 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(147, 51, 234, 0.3);
  animation: hint-pulse 2.5s ease-in-out infinite, fade-up 0.8s ease-out 0.5s both;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.03); }
}

/* ─── Revealed messages container ─── */
.revealed-messages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 16px;
}

/* ─── Premium Card ─── */
.premium-card-wrapper {
  animation: msg-card-settle 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.premium-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  max-width: 500px;
  margin: 0 auto;
}

/* Gradient border shimmer */
.premium-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, var(--pc-grad-start), var(--pc-grad-end), var(--pc-grad-start));
  background-size: 200% 200%;
  animation: card-border-shimmer 3s ease-in-out infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Ambient glow */
.premium-card::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--pc-grad-start), var(--pc-grad-end));
  opacity: 0.08;
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}

@keyframes card-border-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.premium-card-inner {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-card-inner--media {
  padding: 0;
}

.premium-card-inner--media .premium-card-body {
  padding: 20px 24px;
}

/* Quote mark */
.premium-quote {
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--pc-grad-start, var(--gold-light)), var(--pc-grad-end, #FF8A65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Message text */
.premium-message {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  margin: 8px 0 24px;
  white-space: pre-wrap;
}

/* Image in premium card */
.premium-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  display: block;
}

/* Video in premium card */
.premium-video-wrapper {
  position: relative;
  background: #000;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.premium-video-wrapper--yt {
  padding-bottom: 56.25%;
  height: 0;
}

.premium-video-wrapper--yt iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.premium-video {
  display: block;
  width: 100%;
  max-height: 350px;
}

.premium-caption {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  font-size: 1rem;
}

/* Author row */
.premium-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.premium-author-name {
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--gold-light), #FFD54F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Floater (card appears at balloon pos, then settles) ─── */
.msg-reveal-floater {
  position: fixed;
  z-index: 1000;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  max-width: 500px;
  width: calc(100% - 32px);
  transition: none;
}

.msg-reveal-floater--visible {
  animation: floater-appear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.msg-reveal-floater--settling {
  animation: floater-settle 0.5s ease-in forwards;
}

@keyframes floater-appear {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes floater-settle {
  0%   { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}

@keyframes msg-card-settle {
  0%   { opacity: 0; transform: translateY(20px) scale(0.95); }
  60%  { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── All revealed badge ─── */
.all-revealed-badge {
  text-align: center;
  font-family: var(--font-fiesta);
  font-size: 1.4rem;
  color: var(--gold-light);
  padding: 20px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(251, 191, 36, 0.2));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  animation: badge-celebrate 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes badge-celebrate {
  0%   { opacity: 0; transform: scale(0.5) rotate(-5deg); }
  50%  { transform: scale(1.1) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Premium card responsive */
@media (max-width: 640px) {
  .premium-card-inner { padding: 24px; }
  .premium-quote { font-size: 3rem; }
  .premium-message { font-size: 1rem; }
  .msg-balloon-hint { font-size: 1.5rem; }
  .all-revealed-badge { font-size: 1.1rem; padding: 16px; }
}

/* Reduced motion for premium cards */
@media (prefers-reduced-motion: reduce) {
  .premium-card::before { animation: none; }
  .premium-card-wrapper { animation-duration: 0.01s; }
  .msg-reveal-floater--visible { animation-duration: 0.01s; }
  .msg-reveal-floater--settling { animation-duration: 0.01s; }
  .msg-balloon-hint { animation: fade-up 0.3s ease both; }
  .all-revealed-badge { animation-duration: 0.01s; }
}

/* Public FAB row */
.public-fabs {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 40;
}

.fab-share {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--text-dark);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}

.fab-share:hover { transform: scale(1.1); }

.fab-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 28px;
  background: var(--purple);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, background 0.2s;
}

.fab-add:hover {
  background: var(--purple-light);
  transform: scale(1.03);
}

/* Public 404 */
.public-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.public-404 .emoji { margin-bottom: 16px; }
.public-404 h2 { color: var(--white); margin-bottom: 8px; }
.public-404 p { color: rgba(255,255,255,0.6); margin-bottom: 24px; }

/* ═══════════════════════════════════════════
   Modal
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 0.2s ease;
}

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

.modal-sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  animation: slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #D1D5DB;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-sheet h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.3rem;
}

/* Type option in modal */
.type-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.15s, border-color 0.15s;
}

.type-option:hover {
  background: rgba(107,33,168,0.04);
  border-color: var(--purple);
}

.type-option .type-icon {
  font-size: 1.5rem;
  color: var(--purple);
}

.type-option .type-label h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}

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

.type-option .arrow {
  margin-left: auto;
  color: var(--text-muted);
}

/* Confirm dialog */
.confirm-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-dialog .dialog-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog h3 { margin-bottom: 8px; }
.confirm-dialog p { color: var(--text-muted); margin-bottom: 24px; }
.confirm-dialog .actions { display: flex; gap: 12px; justify-content: flex-end; }

/* Image preview */
.image-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}

.file-input-wrapper:hover {
  border-color: var(--purple);
  background: rgba(107,33,168,0.04);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-input-wrapper .upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.file-input-wrapper p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* YouTube preview */
.yt-preview {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 12px 0;
}

.yt-preview iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── Video recording UI ─── */
.video-input-tabs {
  display: flex;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 12px;
}
.video-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.video-tab.active {
  background: var(--purple);
  color: var(--white);
}

.video-preview-container {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.recording-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.6);
  padding: 4px 10px;
  border-radius: 20px;
}
.recording-indicator {
  width: 10px;
  height: 10px;
  background: #DC2626;
  border-radius: 50%;
  animation: rec-blink 1s infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.recording-timer {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.video-record-controls {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}
.btn-record {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid var(--text-dark);
  background: #fff;
  font-size: 28px;
  color: #DC2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.btn-record:hover { transform: scale(1.08); }
.btn-record.recording {
  background: #DC2626;
  color: #fff;
  border-color: #DC2626;
  animation: rec-pulse 1.2s infinite;
}
@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
}
.btn-record:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.video-result-preview {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 300px;
  background: #000;
}
.video-result-actions {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .landing-title { font-size: 3rem; }
  .landing-emoji svg { width: 100px; height: 100px; }
  .landing-subtitle { font-size: 1rem; }
  .landing-pill { padding: 10px 14px; font-size: 0.8rem; }
  .landing-pill-icon { width: 22px; height: 22px; }
  .landing-pill-icon svg { width: 20px; height: 20px; }
  .landing-features { gap: 8px; }
  .public-header .title { font-size: 1.6rem; }
  .public-header .name { font-size: 3rem; }
  .public-header .cake svg { width: 90px; height: 90px; }
  .age-candles svg { width: 46px; }
  .public-header .fiesta-badge { font-size: 1.1rem; padding: 8px 20px; }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .landing-buttons { flex-direction: column; width: 100%; }
  .landing-buttons .btn { width: 100%; }
}

@media (max-height: 700px) {
  .landing { padding: 12px 20px 8px; gap: 2px; }
  .landing-emoji svg { width: 80px; height: 80px; }
  .landing-title { font-size: 2.5rem; }
  .landing-subtitle { font-size: 0.9rem; margin-bottom: 4px; }
  .landing-pill { padding: 8px 12px; }
  .landing-features { margin-bottom: 6px; }
  .landing-cta { padding: 12px 24px; font-size: 1rem; }
  .landing-badges { margin-top: 4px; }
}

@media (min-width: 641px) {
  .modal-sheet {
    border-radius: var(--radius);
    margin-bottom: 10vh;
  }
  .modal-overlay {
    align-items: center;
  }
}

/* ═══════════════════════════════════════════
   SVG Icons sizing
   ═══════════════════════════════════════════ */

/* Landing cake */
.landing-emoji svg {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 8px 20px rgba(251, 191, 36, 0.3));
}

/* Dashboard empty cake */
.dashboard-empty .emoji.svg-cake svg {
  width: 80px;
  height: 80px;
}

/* 404 / not-found balloon */
.emoji.svg-balloon svg {
  width: 64px;
  height: 80px;
}

/* Public header — cake */
.public-header .cake svg {
  width: 120px;
  height: 120px;
}

/* Public header — party poppers */
.party-emojis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.party-svg svg {
  width: 48px;
  height: 48px;
}

/* Badge sparkle */
.badge-sparkle {
  display: inline-flex;
  vertical-align: middle;
}

.badge-sparkle svg {
  width: 18px;
  height: 18px;
  fill: var(--gold-light);
  color: var(--gold-light);
  animation: sparkle-twinkle 2s ease-in-out infinite;
}

.badge-sparkle:last-child svg {
  animation-delay: 0.5s;
}

/* FAB icons */
.fab-share svg {
  width: 20px;
  height: 20px;
}

.fab-icon {
  display: inline-flex;
}

.fab-icon svg {
  width: 20px;
  height: 20px;
  color: var(--white);
  fill: var(--white);
}

/* Block list icons */
.block-icon svg {
  width: 22px;
  height: 22px;
  color: var(--purple);
}

/* Block list delete */
.btn-delete svg {
  width: 18px;
  height: 18px;
}

/* Modal type option icons */
.type-icon.svg-icon svg {
  width: 28px;
  height: 28px;
  color: var(--purple);
}

/* ─── Age Candles ─── */
.age-candles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin: 18px 0;
}

.age-candles svg {
  width: 62px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.1));
  animation: candle-appear 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.age-candles svg:nth-child(1) { animation-delay: 0.3s; }
.age-candles svg:nth-child(2) { animation-delay: 0.5s; }
.age-candles svg:nth-child(3) { animation-delay: 0.7s; }

@keyframes candle-appear {
  0%   { opacity: 0; transform: translateY(24px) scale(0.7); }
  60%  { transform: translateY(-4px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════ */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

/* ═══════════════════════════════════════════
   Gift Intro Animation
   ═══════════════════════════════════════════ */
.gift-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #2d1065 0%, #1a0a3e 40%, #0c0118 100%);
  overflow: hidden;
}

/* Floating sparkle dots in background */
.gift-intro-overlay::before,
.gift-intro-overlay::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: gift-float 3s ease-in-out infinite;
}
.gift-intro-overlay::before {
  width: 6px; height: 6px;
  background: #FBBF24;
  top: 20%; left: 15%;
  box-shadow:
    60vw 10vh 0 #FF6B8A,
    20vw 60vh 0 #4FC3F7,
    70vw 50vh 0 #AED581,
    40vw 80vh 0 #CE93D8,
    80vw 25vh 0 #FFD54F,
    10vw 40vh 0 #FF8A65;
}
.gift-intro-overlay::after {
  width: 4px; height: 4px;
  background: #81D4FA;
  top: 35%; right: 20%;
  animation-delay: 0.5s;
  box-shadow:
    -50vw 15vh 0 #F48FB1,
    -30vw -10vh 0 #FBBF24,
    -60vw 40vh 0 #CE93D8,
    10vw -20vh 0 #AED581,
    -20vw 50vh 0 #FF6B8A;
}

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

/* Gift container */
.gift-intro-box {
  position: relative;
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 20px 60px rgba(147, 51, 234, 0.5));
}

/* Shake phase */
.gift-intro-box.shaking {
  animation: gift-shake 0.12s ease-in-out infinite alternate;
}
.gift-intro-box.shaking-hard {
  animation: gift-shake-hard 0.08s ease-in-out infinite alternate;
}

@keyframes gift-shake {
  0%   { transform: translate(-2px, 0) rotate(-1deg); }
  25%  { transform: translate(2px, -1px) rotate(1deg); }
  50%  { transform: translate(-1px, 1px) rotate(-0.5deg); }
  75%  { transform: translate(1px, -1px) rotate(0.5deg); }
  100% { transform: translate(2px, 0) rotate(1deg); }
}

@keyframes gift-shake-hard {
  0%   { transform: translate(-5px, -2px) rotate(-3deg) scale(1.02); }
  25%  { transform: translate(5px, 2px) rotate(3deg) scale(0.98); }
  50%  { transform: translate(-4px, 3px) rotate(-2deg) scale(1.03); }
  75%  { transform: translate(4px, -3px) rotate(2deg) scale(0.97); }
  100% { transform: translate(-5px, 1px) rotate(-3deg) scale(1.02); }
}

/* Explode phase */
.gift-intro-box.exploding {
  animation: gift-explode 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-explode {
  0%   { transform: scale(1); opacity: 1; }
  30%  { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

/* Explosion particles */
.gift-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
.gift-particle.active {
  animation: gift-particle-fly 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-particle-fly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { opacity: 0; }
}

/* Confetti rectangles */
.gift-confetti {
  position: absolute;
  width: 8px;
  height: 16px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
}
.gift-confetti.active {
  animation: gift-confetti-fly 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-confetti-fly {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { opacity: 0; }
}

/* Stars that pop */
.gift-star {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  color: #FFD54F;
}
.gift-star.active {
  animation: gift-star-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-star-pop {
  0%   { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Shockwave ring */
.gift-shockwave {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, 0.8);
  opacity: 0;
  pointer-events: none;
}
.gift-shockwave.active {
  animation: gift-shockwave-expand 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gift-shockwave-expand {
  0%   { transform: scale(0); opacity: 0.9; }
  100% { transform: scale(18); opacity: 0; }
}

/* Second ring delayed */
.gift-shockwave-2.active {
  animation: gift-shockwave-expand 0.7s 0.08s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  border-color: rgba(206, 147, 216, 0.6);
}

/* Hint text */
.gift-intro-hint {
  margin-top: 32px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
  animation: gift-hint-pulse 1.5s ease-in-out infinite;
}

@keyframes gift-hint-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* Flash on explosion */
.gift-flash {
  position: fixed;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
}
.gift-flash.active {
  animation: gift-flash-bang 0.4s ease-out forwards;
}

@keyframes gift-flash-bang {
  0%   { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Overlay fade out */
.gift-intro-overlay.fade-out {
  animation: gift-overlay-fade 0.6s 0.3s ease-out forwards;
}

@keyframes gift-overlay-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* Glow pulse behind gift */
.gift-glow {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147,51,234,0.4) 0%, transparent 70%);
  animation: gift-glow-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gift-glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.2); opacity: 0.8; }
}
