/* ==========================================================================
   CHÚC MỪNG NGÀY PHỤ NỮ VIỆT NAM 20/10 - STYLESHEET
   Design: Modern Romantic Glassmorphism, Responsive & Fluid Animations
   ========================================================================== */

:root {
  --primary-pink: #ff758f;
  --primary-rose: #ff4d6d;
  --deep-rose: #c9184a;
  --wine-rose: #800f2f;
  --soft-pink: #fff0f3;
  --petal-pink: #ffccd5;
  --accent-gold: #ffb703;
  --accent-gold-light: #ffe8a1;
  --text-main: #2b1722;
  --text-muted: #6b4d5d;
  --bg-gradient: linear-gradient(135deg, #fff5f7 0%, #ffe5ec 35%, #ffd1dc 70%, #ffc2d1 100%);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 16px 36px rgba(201, 24, 74, 0.12);
  --glass-hover-shadow: 0 20px 42px rgba(201, 24, 74, 0.22);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 50px;
  --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Canvas Particles */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ambient Glowing Lights */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: orb-drift 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: #ffb3c6;
  top: -120px;
  left: -120px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: #ffd166;
  bottom: -80px;
  right: -80px;
  animation-delay: -5s;
}

.orb-3 {
  width: 380px;
  height: 380px;
  background: #ff758f;
  top: 45%;
  left: 60%;
  animation-delay: -9s;
}

@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Top Navigation Bar */
.top-nav-bar {
  position: fixed;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 1000;
}

.circle-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.circle-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: var(--deep-rose);
  box-shadow: var(--glass-hover-shadow);
}

.circle-btn.playing {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #ffffff;
  border-color: transparent;
  animation: pulse-music 2s infinite;
}

@keyframes pulse-music {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 77, 109, 0.4); }
  50% { box-shadow: 0 0 25px rgba(255, 77, 109, 0.8); }
}

/* Main Layout Wrapper */
.page-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  text-align: center;
  padding: 30px 10px 50px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--deep-rose);
  box-shadow: 0 6px 20px rgba(201, 24, 74, 0.12);
  margin-bottom: 24px;
  animation: badge-float 3.5s ease-in-out infinite;
}

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

.hero-main-title {
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #a4133c 0%, #c9184a 25%, #ff4d6d 55%, #ff758f 75%, #ffb703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  text-shadow: 0 10px 30px rgba(201, 24, 74, 0.1);
}

.recipient-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 2px dashed rgba(255, 77, 109, 0.4);
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  margin-bottom: 26px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.recipient-card:hover {
  border-color: var(--primary-rose);
  transform: scale(1.02);
}

.recipient-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.recipient-highlight {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--deep-rose);
  text-decoration: underline dotted var(--primary-pink);
}

.btn-edit-pill {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(201, 24, 74, 0.25);
  transition: var(--transition);
}

.btn-edit-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(201, 24, 74, 0.4);
}

.hero-quote {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 34px;
  font-style: italic;
  font-weight: 450;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Button Component Styles */
.btn {
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(201, 24, 74, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(201, 24, 74, 0.48);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--deep-rose);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.btn-glass:hover {
  background: #ffffff;
  transform: translateY(-3px);
  color: var(--primary-rose);
  box-shadow: var(--glass-hover-shadow);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   HEART ART SECTION (CANVAS)
   ========================================================================== */
.heart-art-section {
  margin-bottom: 40px;
}

.heart-canvas-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.art-card-header {
  margin-bottom: 15px;
}

.badge-small {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--deep-rose);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.art-card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--wine-rose);
}

.heart-canvas-box {
  width: 100%;
  max-width: 480px;
  height: 320px;
  margin: 0 auto 15px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

#heart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.heart-caption {
  font-weight: 600;
  color: var(--deep-rose);
  font-size: 1.05rem;
}

/* ==========================================================================
   GENERAL CONTENT SECTION
   ========================================================================== */
.content-section {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 45px 30px;
  margin-bottom: 40px;
  box-shadow: var(--glass-shadow);
  position: relative;
}

.section-heading {
  text-align: center;
  margin-bottom: 32px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--deep-rose);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ==========================================================================
   3D GIFT BOX SECTION
   ========================================================================== */
.gift-box-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0 30px;
  cursor: pointer;
  user-select: none;
}

.gift-box-3d {
  width: 150px;
  height: 150px;
  position: relative;
  top: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: gift-float 2.5s ease-in-out infinite alternate;
}

@keyframes gift-float {
  0% { top: 0; }
  100% { top: -8px; }
}

.gift-box-3d:hover {
  transform: scale(1.08) rotate(-2deg);
}

.gift-box-lid {
  width: 166px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  border-radius: 10px 10px 4px 4px;
  position: absolute;
  top: 0;
  left: -8px;
  z-index: 5;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
}

.lid-ribbon {
  width: 30px;
  height: 100%;
  background: linear-gradient(180deg, #ffe066, #ffb703);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gift-bow {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bow-petal {
  width: 34px;
  height: 26px;
  border: 5px solid #ffb703;
  border-radius: 50% 50% 10% 50%;
  background: #ffe066;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.bow-right {
  transform: scaleX(-1);
}

.bow-center {
  width: 16px;
  height: 16px;
  background: #ffb703;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  z-index: 6;
}

.gift-box-cube {
  width: 150px;
  height: 118px;
  background: linear-gradient(135deg, #ff758f, #e01e5a);
  position: absolute;
  bottom: 0;
  left: 0;
  border-radius: 4px 4px 16px 16px;
  box-shadow: 0 16px 30px rgba(201, 24, 74, 0.35);
  overflow: hidden;
}

.cube-ribbon-vertical {
  width: 30px;
  height: 100%;
  background: linear-gradient(180deg, #ffe066, #ffb703);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cube-ribbon-horizontal {
  width: 100%;
  height: 26px;
  background: linear-gradient(90deg, #ffe066, #ffb703);
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
}

/* Opened Gift State */
.gift-box-3d.opened .gift-box-lid {
  transform: translateY(-80px) rotate(-22deg) scale(0.9);
  opacity: 0.85;
}

.gift-box-hint {
  margin-top: 22px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--deep-rose);
  animation: pulse-hint 1.8s infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.7; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* Secret Letter Unfurl */
.secret-letter {
  max-width: 680px;
  margin: 30px auto 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 38px 34px;
  box-shadow: 0 20px 48px rgba(201, 24, 74, 0.22);
  border: 2px solid #ffd1dc;
  display: none;
  animation: letter-unfurl 0.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  position: relative;
}

@keyframes letter-unfurl {
  0% { opacity: 0; transform: translateY(35px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.letter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #ffe5ec;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.letter-recipient {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--deep-rose);
}

.letter-date {
  font-size: 0.95rem;
  color: #9c667a;
  font-style: italic;
}

.letter-body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #3b2230;
  margin-bottom: 28px;
}

.letter-body p {
  margin-bottom: 14px;
}

.letter-wish-image {
  display: block;
  max-width: min(100%, 480px);
  max-height: 360px;
  margin: 0 auto 24px;
  border: 4px solid #ffe5ec;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(201, 24, 74, 0.15);
  cursor: zoom-in;
}

.wish-image-lightbox {
  position: fixed;
  width: fit-content;
  max-width: 96vw;
  max-height: 96vh;
  padding: 48px 16px 16px;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: #24131f;
}

.wish-image-lightbox::backdrop {
  background: rgba(15, 8, 13, 0.88);
}

.wish-image-lightbox img {
  display: block;
  max-width: calc(96vw - 32px);
  max-height: calc(92vh - 64px);
  object-fit: contain;
}

.wish-image-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.letter-wish-image[hidden],
.image-upload-preview[hidden],
.image-upload-actions [hidden] {
  display: none;
}

.image-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.image-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.image-upload-actions label {
  cursor: pointer;
}

.image-upload-preview {
  display: block;
  max-width: min(100%, 240px);
  max-height: 180px;
  margin-top: 12px;
  border: 2px solid #ffd1dc;
  border-radius: 12px;
  object-fit: contain;
}

.letter-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #ffccd5;
  padding-top: 18px;
}

.letter-seal {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #e01e5a, #800f2f);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(128, 15, 47, 0.35);
}

.letter-sign {
  text-align: right;
}

.sign-label {
  display: block;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.sign-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-rose);
}

/* ==========================================================================
   WISHES SECTION & TABS
   ========================================================================== */
.tabs-slider {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
}

.occasion-tabs {
  margin-bottom: 16px;
}

.wish-category-tabs {
  margin-bottom: 30px;
}

.tab-chip[hidden] {
  display: none;
}

.tab-chip:hover {
  background: #ffffff;
  color: var(--deep-rose);
  transform: translateY(-2px);
}

.tab-chip.active {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(201, 24, 74, 0.35);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.wish-item-card {
  background: #ffffff;
  border: 1px solid #ffe5ec;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(201, 24, 74, 0.08);
  transition: var(--transition);
}

.wish-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(201, 24, 74, 0.18);
  border-color: var(--petal-pink);
}

.wish-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.wish-card-icon {
  font-size: 1.5rem;
}

.wish-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wine-rose);
}

.wish-card-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4a2e3d;
  margin-bottom: 20px;
  flex-grow: 1;
}

.wish-card-buttons {
  display: flex;
  gap: 10px;
}

.btn-card-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-copy {
  background: var(--soft-pink);
  color: var(--deep-rose);
}

.btn-copy:hover {
  background: #ffd1dc;
}

.btn-use {
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-rose));
  color: #fff;
}

.btn-use:hover {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
}

/* ==========================================================================
   CARD CREATOR SECTION
   ========================================================================== */
.creator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.creator-controls {
  background: #ffffff;
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid #ffe5ec;
  box-shadow: 0 10px 30px rgba(201, 24, 74, 0.08);
}

.input-field {
  margin-bottom: 18px;
}

.input-field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--wine-rose);
  margin-bottom: 6px;
}

.input-field input,
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #ffd1dc;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  background: #fffbfa;
  font-family: inherit;
  transition: var(--transition);
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
  outline: none;
  border-color: var(--primary-rose);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.2);
}

.creator-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.canvas-card-frame {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(201, 24, 74, 0.2);
  background: #ffffff;
  border: 4px solid #ffffff;
}

#card-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.creator-controls .input-field .account-setting-hint {
  margin-bottom: 0;
}

/* ==========================================================================
   INTERACTIVE GARDEN SECTION
   ========================================================================== */
.flower-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.counter-badge {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #fff;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(201, 24, 74, 0.28);
}

.flower-buttons-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-spawn {
  background: #ffffff;
  border: 2px solid var(--petal-pink);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--wine-rose);
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.btn-spawn:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: var(--primary-rose);
  box-shadow: var(--glass-hover-shadow);
}

.btn-spawn-icon {
  font-size: 1.4rem;
}

/* Floating Flower Entity Spawned by Click */
.flying-flower-item {
  position: fixed;
  font-size: 2.2rem;
  pointer-events: none;
  z-index: 99999;
  user-select: none;
  animation: fly-up-fade 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fly-up-fade {
  0% {
    transform: translate(0, 0) scale(0.6) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translate(25px, -120px) scale(1.3) rotate(20deg);
    opacity: 0.95;
  }
  100% {
    transform: translate(45px, -240px) scale(0.9) rotate(-15deg);
    opacity: 0;
  }
}

/* ==========================================================================
   FORTUNE / COMPLIMENT SECTION
   ========================================================================== */
.fortune-section {
  text-align: center;
}

.fortune-card {
  background: #ffffff;
  border: 2px dashed #ffccd5;
  border-radius: var(--radius-md);
  padding: 30px;
  max-width: 650px;
  margin: 0 auto 24px;
  box-shadow: 0 10px 28px rgba(201, 24, 74, 0.08);
}

.fortune-quote {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--wine-rose);
  line-height: 1.7;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.page-footer {
  text-align: center;
  padding: 40px 10px 20px;
  color: var(--text-muted);
}

.footer-blessing {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-rose);
  margin-bottom: 6px;
}

.footer-heart {
  color: #e01e5a;
  display: inline-block;
  animation: heart-beat 1.4s infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.footer-sub {
  font-size: 0.9rem;
}

/* ==========================================================================
   MODAL DIALOG (CÁ NHÂN HÓA NGƯỜI NHẬN)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 23, 34, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--wine-rose);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-input {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid #ffd1dc;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-main);
  background: #fffbfa;
  margin-bottom: 16px;
  font-family: inherit;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap > input {
  padding-right: 76px;
}

.password-input-wrap > input.modal-input {
  margin-bottom: 16px;
}

.password-visibility-toggle {
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 1;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--deep-rose);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-input:focus {
  outline: none;
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.25);
}

.preset-group {
  margin-bottom: 24px;
}

.preset-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-pill {
  background: var(--soft-pink);
  border: 1px solid #ffd1dc;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--deep-rose);
  cursor: pointer;
  transition: var(--transition);
}

.preset-pill:hover {
  background: var(--primary-rose);
  color: #fff;
  border-color: var(--primary-rose);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Music Modal Custom Styling */
.music-modal-dialog {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.music-option-card {
  background: #fff8f9;
  border: 1px solid #ffe0e6;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.music-option-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--wine-rose);
  margin-bottom: 10px;
}

.file-upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-name-display {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #ffe5ec;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.preset-song-item:hover {
  border-color: var(--primary-rose);
  background: var(--soft-pink);
  transform: translateX(3px);
}

.preset-song-item.active {
  border-color: var(--primary-rose);
  background: linear-gradient(135deg, #fff0f3, #ffe5ec);
  box-shadow: 0 4px 12px rgba(201, 24, 74, 0.12);
}

.preset-song-item .song-item-icon {
  font-size: 1.4rem;
}

.song-item-info {
  display: flex;
  flex-direction: column;
}

.song-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.preset-song-item.active .song-item-name {
  color: var(--deep-rose);
}

.song-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.url-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
}

/* User login and registration modal */
.auth-dialog {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.auth-status {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid #ffd1dc;
  border-radius: var(--radius-sm);
  background: var(--soft-pink);
  color: var(--deep-rose);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-status[hidden] {
  display: none;
}

.auth-status.error {
  border-color: #ffccc7;
  background: #fff2f0;
  color: #a8071a;
}

.auth-status.success {
  border-color: #b7eb8f;
  background: #f6ffed;
  color: #237804;
}

.auth-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid #ffe5ec;
  padding-bottom: 12px;
}

.auth-tab-btn {
  flex: 1;
  background: var(--soft-pink);
  border: 1px solid #ffd1dc;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn:hover,
.auth-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #ffffff;
  border-color: transparent;
}

.auth-form-pane {
  display: none;
}

.auth-form-pane.active {
  display: block;
}

.user-profile-dialog {
  max-height: 90vh;
  overflow-y: auto;
}

.account-settings[hidden] {
  display: none;
}

.account-settings {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid #ffe5ec;
  border-radius: var(--radius-md);
  background: #fff8f9;
}

.account-setting-form {
  padding-bottom: 16px;
  border-bottom: 1px solid #ffe5ec;
}

.account-setting-form:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.account-setting-form .input-field {
  margin-bottom: 10px;
}

.account-setting-form input {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #ffd1dc;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
}

.account-setting-form input:focus {
  outline: none;
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.2);
}

.account-setting-hint {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.wish-share-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ffd1dc;
  border-radius: var(--radius-sm);
  background: #fff8f9;
}

.wish-share-panel p {
  margin: 0;
}

.wish-share-result[hidden] {
  display: none;
}

.wish-share-result {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.wish-share-qr {
  display: inline-grid;
  width: min(100%, 512px);
  max-width: 100%;
  min-width: 320px;
  min-height: 320px;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
}

.wish-share-qr[hidden] {
  display: none;
}

.wish-share-qr img,
.wish-share-qr canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

@media (max-width: 420px) {
  .wish-share-qr {
    min-width: 0;
    min-height: 0;
  }
}

.wish-share-result > input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ffd1dc;
  border-radius: 10px;
  color: var(--text-main);
  font: inherit;
}

.wish-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.shared-wish-view .page-wrapper > :not(.heart-art-section):not(#gift-section):not(#card-creator-section):not(.fortune-section) {
  display: none;
}

body.shared-wish-view #gift-section {
  min-height: 100vh;
  padding-top: 32px;
}

body.shared-wish-view #card-creator-section .creator-controls,
body.shared-wish-view #btn-download-card {
  display: none;
}

body.shared-wish-view #card-creator-section .creator-preview {
  justify-items: center;
}

/* ==========================================================================
   ADMIN LOGIN & DASHBOARD STYLES
   ========================================================================== */
.admin-dialog {
  max-width: 440px;
}

.admin-dashboard-dialog {
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-status-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: #237804;
  font-weight: 700;
  background: #f6ffed;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid #b7eb8f;
  margin-top: 4px;
}

.admin-hint-box {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #ad6800;
  margin-top: 12px;
  line-height: 1.5;
}

.admin-profiles-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.admin-profile-item {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #ffd1dc;
  border-radius: var(--radius-sm);
  background: #fff8f9;
}

.admin-profile-item h4,
.admin-profile-item p {
  margin: 0;
}

.admin-profile-image-section {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.admin-profile-image-label {
  color: var(--wine-rose);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-profile-image {
  display: block;
  max-width: min(100%, 260px);
  max-height: 220px;
  border: 2px solid #ffd1dc;
  border-radius: 12px;
  background: #ffffff;
  object-fit: contain;
}

.admin-profile-image[hidden] {
  display: none;
}

.admin-profile-image-status {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.admin-wish-preview {
  padding: 12px 14px;
  border-left: 3px solid var(--primary-rose);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-main);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-profile-item textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px 12px;
  border: 1.5px solid #ffd1dc;
  border-radius: 12px;
  color: var(--text-main);
  font: inherit;
  resize: vertical;
}

.admin-profile-item textarea:focus {
  outline: none;
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.2);
}

.admin-delete-account {
  color: #c9184a;
  border-color: #ffccd5;
}

.admin-delete-account:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid #ffe5ec;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  background: var(--soft-pink);
  border: 1px solid #ffd1dc;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab-btn:hover {
  background: #ffffff;
  color: var(--deep-rose);
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-rose), var(--deep-rose));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(201, 24, 74, 0.25);
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

.circle-btn.admin-logged {
  background: linear-gradient(135deg, #ffb703, #fb8500);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(255, 183, 3, 0.55);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100000;
  pointer-events: none;
}

.toast-item {
  background: rgba(43, 23, 34, 0.92);
  color: #ffffff;
  backdrop-filter: blur(10px);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: toast-in 0.35s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-item.hide {
  animation: toast-out 0.3s forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-15px);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ========================================================================== */
@media (max-width: 860px) {
  .creator-container {
    grid-template-columns: 1fr;
  }
  .content-section {
    padding: 35px 20px;
  }
  .secret-letter {
    padding: 26px 20px;
  }
}

@media (max-width: 580px) {
  .top-nav-bar {
    top: 12px;
    right: 12px;
  }
  .circle-btn .btn-text {
    display: none;
  }
  .circle-btn {
    padding: 10px;
    border-radius: 50%;
  }
  .hero-main-title {
    font-size: 2.3rem;
  }
  .hero-cta-group {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
  .heart-canvas-box {
    height: 250px;
  }
  .wishes-grid {
    grid-template-columns: 1fr;
  }
  .modal-footer {
    flex-direction: column;
  }
}
