/* ===================================================
   STYLING FOR 20/10 PINK-RED QR CODE & GREETING CARD
   Ultra-luxurious, modern, romantic aesthetic
   =================================================== */

:root {
  --primary-pink: #ff2a7a;
  --primary-red: #e11d48;
  --dark-ruby: #be123c;
  --deep-wine: #881337;
  --soft-rose: #fff1f2;
  --rose-border: #fecdd3;
  --gold-accent: #d4af37;
  --gold-gradient: linear-gradient(135deg, #ffdf73 0%, #d4af37 50%, #aa771c 100%);
  --bg-gradient: radial-gradient(circle at 20% 20%, #fff0f5 0%, #ffe4e8 40%, #ffd1dc 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-blur: blur(20px);
  --shadow-lux: 0 20px 40px rgba(190, 18, 60, 0.15), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 25px 50px rgba(225, 29, 72, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-script: 'Great Vibes', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient);
  color: #374151;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Canvas for Falling Rose Petals */
#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Header & Navigation */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--card-blur);
  border-bottom: 1px solid var(--rose-border);
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.08);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-red));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.3);
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% { transform: scale(1); box-shadow: 0 6px 16px rgba(225, 29, 72, 0.3); }
  100% { transform: scale(1.05); box-shadow: 0 8px 24px rgba(225, 29, 72, 0.5); }
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-red), var(--deep-wine));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #9f1239;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 241, 242, 0.8);
  padding: 6px;
  border-radius: 40px;
  border: 1px solid var(--rose-border);
}

.nav-tab-btn {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #881337;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-red);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-ruby));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(190, 18, 60, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.music-btn {
  border: 1px solid var(--rose-border);
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--primary-red);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.music-btn:hover {
  transform: rotate(15deg) scale(1.08);
  border-color: var(--primary-pink);
}

.music-btn.playing {
  background: linear-gradient(135deg, #fecdd3, #ffe4e6);
  animation: music-spin 4s linear infinite;
}

@keyframes music-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Main Container */
.main-wrapper {
  max-width: 1300px;
  margin: 24px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* Tab Views */
.tab-view {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   VIEW 1: DIGITAL CARD EXPERIENCE (Thiệp Tương Tác)
   =================================================== */
.card-experience-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  text-align: center;
  padding: 20px 0;
}

.experience-hero-text {
  margin-bottom: 30px;
}

.badge-tag {
  display: inline-block;
  padding: 6px 18px;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.experience-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: #881337;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(136, 19, 55, 0.1);
}

.experience-subtitle {
  font-size: 1.15rem;
  color: #9f1239;
  font-style: italic;
}

/* 3D Envelope Container */
.envelope-stage {
  perspective: 1200px;
  margin: 20px auto 40px;
  width: 440px;
  max-width: 95vw;
}

.envelope-wrapper {
  position: relative;
  width: 100%;
  height: 290px;
  background: linear-gradient(145deg, #f43f5e, #be123c);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(190, 18, 60, 0.35);
  cursor: pointer;
  transition: transform 0.5s ease;
  overflow: visible;
}

.envelope-wrapper:hover {
  transform: translateY(-8px);
}

.envelope-front-fold {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 220px 170px 220px;
  border-color: transparent transparent #9f1239 transparent;
  border-radius: 0 0 16px 16px;
  z-index: 4;
}

.envelope-left-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 145px 0 145px 220px;
  border-color: transparent transparent transparent #be123c;
  border-radius: 16px 0 0 16px;
  z-index: 3;
}

.envelope-right-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 145px 220px 145px 0;
  border-color: transparent #be123c transparent transparent;
  border-radius: 0 16px 16px 0;
  z-index: 3;
}

.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 160px 220px 0 220px;
  border-color: #e11d48 transparent transparent transparent;
  border-radius: 16px 16px 0 0;
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.envelope-wrapper.open .envelope-top-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.wax-seal {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: radial-gradient(circle, #e11d48, #881337);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffdf73;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 0.9rem;
  border: 3px dashed #aa771c;
  z-index: 6;
  transition: opacity 0.5s ease;
}

.envelope-wrapper.open .wax-seal {
  opacity: 0;
  pointer-events: none;
}

/* Sliding Letter Card Inside */
.letter-card {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #fecdd3;
  padding: 24px;
  z-index: 2;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.envelope-wrapper.open .letter-card {
  transform: translateY(-240px);
  height: 480px;
  z-index: 10;
  box-shadow: 0 30px 60px rgba(136, 19, 55, 0.3);
}

.letter-content {
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
  width: 100%;
}

.envelope-wrapper.open .letter-content {
  opacity: 1;
}

.letter-header {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #881337;
  font-weight: 800;
  margin-bottom: 10px;
}

.letter-rose {
  font-size: 2.2rem;
  margin-bottom: 8px;
  animation: bounce 2s infinite;
}

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

.letter-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 16px;
  white-space: pre-line;
  text-align: left;
  background: #fff5f7;
  padding: 16px 20px;
  border-radius: 10px;
  border-left: 4px solid var(--primary-red);
}

.letter-signature {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: #be123c;
  text-align: right;
  margin-top: 10px;
}

.card-action-bar {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Luxury Button Styles */
.btn-lux {
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-red));
  color: #fff;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(225, 29, 72, 0.5);
}

.btn-secondary {
  background: #ffffff;
  color: #881337;
  border: 1px solid var(--rose-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #fff1f2;
  border-color: var(--primary-pink);
  transform: translateY(-2px);
}

/* ===================================================
   VIEW 2: QR CODE STUDIO (Bộ Tùy Biến Mã QR Hồng Đỏ)
   =================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 980px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

.studio-panel {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rose-border);
  padding: 32px;
  box-shadow: var(--shadow-lux);
}

.panel-header {
  margin-bottom: 24px;
  border-bottom: 1px solid #ffe4e6;
  padding-bottom: 16px;
}

.panel-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #881337;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header p {
  color: #9f1239;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Form Groups */
.form-section {
  margin-bottom: 24px;
}

.section-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #881337;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* Preset selector tags */
.preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #fecdd3;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9f1239;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-btn:hover {
  background: #ffe4e6;
  border-color: var(--primary-pink);
}

.tag-btn.active {
  background: #be123c;
  color: #fff;
  border-color: #be123c;
}

/* Text Inputs */
.custom-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: #ffffff;
  color: #374151;
  transition: all 0.2s ease;
}

.custom-input:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.textarea-wrapper {
  position: relative;
}

textarea.custom-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.char-counter {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 6px;
}

.char-counter .density-ok {
  color: #059669;
  font-weight: 600;
}

.char-counter .density-warn {
  color: #d97706;
  font-weight: 600;
}

/* Color Palettes Grid */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.palette-card {
  padding: 12px;
  border: 2px solid #fecdd3;
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.palette-card:hover {
  border-color: var(--primary-pink);
  transform: translateY(-2px);
}

.palette-card.active {
  border-color: var(--primary-red);
  background: #fff5f7;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.palette-swatch {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.palette-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #881337;
}

.palette-info p {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Center Logo Selector */
.icon-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.icon-choice-btn {
  padding: 12px 8px;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.icon-choice-btn:hover {
  border-color: var(--primary-pink);
  background: #fff1f2;
}

.icon-choice-btn.active {
  border-color: var(--primary-red);
  background: #ffe4e6;
}

.icon-choice-btn .choice-emoji {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 4px;
}

.icon-choice-btn .choice-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #881337;
}

/* Shape Selector (Heart vs Square) */
.shape-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.shape-choice-btn {
  padding: 14px 16px;
  border: 2px solid #fecdd3;
  border-radius: var(--radius-md);
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.shape-choice-btn:hover {
  border-color: var(--primary-pink);
  background: #fff1f2;
  transform: translateY(-2px);
}

.shape-choice-btn.active {
  border-color: var(--primary-red);
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.22);
  transform: translateY(-2px);
}

.shape-choice-btn .shape-emoji {
  font-size: 2rem;
  line-height: 1;
}

.shape-choice-btn .shape-text {
  font-size: 0.92rem;
  font-weight: 800;
  color: #881337;
}

.shape-choice-btn .shape-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff2a7a, #be123c);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(190, 18, 60, 0.3);
}

/* QR Code Preview Card (Right Column) */
.preview-sticky {
  position: sticky;
  top: 90px;
}

.qr-display-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rose-border);
  padding: 28px;
  box-shadow: var(--shadow-lux);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.qr-display-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--primary-pink), var(--primary-red), var(--dark-ruby));
}

.qr-canvas-holder {
  width: 320px;
  height: 320px;
  margin: 16px auto;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(190, 18, 60, 0.15);
  border: 1px solid #ffe4e6;
  padding: 12px;
  position: relative;
}

.qr-canvas-holder svg,
.qr-canvas-holder canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: block;
}

.qr-tagline {
  font-size: 0.95rem;
  font-weight: 600;
  color: #881337;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.download-success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #10b981;
  border-radius: 16px;
  padding: 12px 18px;
  margin: 14px 0 10px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
  animation: bannerFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.download-success-banner .banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.download-success-banner .banner-text strong {
  display: block;
  color: #065f46;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.download-success-banner .banner-text span {
  font-size: 0.85rem;
  color: #047857;
}

.pulse-download-btn {
  font-size: 1.05rem !important;
  padding: 14px 24px !important;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.38) !important;
}

.pulse-download-highlight {
  animation: downloadPulseGlow 1.8s infinite ease-in-out !important;
  transform: scale(1.02);
}

@keyframes downloadPulseGlow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 32px rgba(225, 29, 72, 0.65), 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1.03);
  }
}

/* ===================================================
   VIEW 3: GALLERY & PRE-GENERATED ASSETS (Bộ Sưu Tập)
   =================================================== */
.gallery-section-title {
  text-align: center;
  margin-bottom: 36px;
}

.gallery-section-title h2 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: #881337;
}

.gallery-section-title p {
  color: #9f1239;
  font-size: 1.1rem;
  margin-top: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.gallery-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rose-border);
  box-shadow: var(--shadow-lux);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.gallery-media {
  position: relative;
  background: #fff5f7;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
  overflow: hidden;
}

.gallery-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-media img {
  transform: scale(1.04);
}

.gallery-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-red));
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.gallery-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #881337;
  font-weight: 700;
  margin-bottom: 6px;
}

.gallery-desc {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

/* ===================================================
   MODAL: PHONE SCAN SIMULATOR
   =================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.phone-mockup {
  width: 360px;
  height: 680px;
  background: #111827;
  border-radius: 48px;
  border: 10px solid #374151;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 140px;
  height: 24px;
  background: #111827;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  padding: 40px 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.scanner-viewfinder {
  border: 2px dashed #f43f5e;
  border-radius: 20px;
  height: 200px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(244, 63, 94, 0.08);
}

.laser-beam {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #ff2a7a;
  box-shadow: 0 0 12px #ff2a7a;
  animation: scan-laser 2.5s infinite ease-in-out alternate;
}

@keyframes scan-laser {
  0% { top: 10px; }
  100% { top: 190px; }
}

.scanned-result-popup {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease;
  margin-top: auto;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #be123c;
  font-weight: 700;
  font-size: 0.95rem;
}

.result-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-line;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  background: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Floating Confetti Hearts */
.floating-heart {
  position: fixed;
  bottom: -40px;
  pointer-events: none;
  font-size: 24px;
  animation: floatUp 4s linear forwards;
  z-index: 999;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-110vh) scale(1.3) rotate(360deg); opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  .experience-title {
    font-size: 2rem;
  }
  .envelope-wrapper {
    height: 240px;
  }
  .palette-grid {
    grid-template-columns: 1fr;
  }
  .icon-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================================
   STUDIO 2.0 ADVANCED CONTROLS (BOUQUET, MUSIC, RAIN WISHES & PHOTOS)
   =================================================== */

/* QR Target Mode Toggle */
.qr-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.mode-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid #fecdd3;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}

.mode-tab-btn:hover {
  border-color: var(--primary-pink);
  background: #fff5f7;
}

.mode-tab-btn.active {
  border-color: var(--primary-red);
  background: #fff1f2;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.15);
}

.mode-icon {
  font-size: 1.8rem;
}

.mode-details h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #881337;
}

.mode-details p {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Bouquet Grid */
.bouquet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .bouquet-grid {
    grid-template-columns: 1fr;
  }
}

.bouquet-choice-card {
  position: relative;
  border: 2px solid #fecdd3;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: all 0.25s ease;
}

.bouquet-choice-card:hover {
  border-color: var(--primary-pink);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.15);
}

.bouquet-choice-card.active {
  border-color: var(--primary-red);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.25);
  background: #fff5f7;
}

.bouquet-thumb-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.bouquet-info-box {
  padding: 8px 10px;
  text-align: center;
}

.bouquet-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #881337;
}

.bouquet-custom-upload {
  margin-top: 8px;
}

.upload-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1.5px dashed #f43f5e;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #be123c;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-file-btn:hover {
  background: #ffe4e8;
  border-color: #be123c;
}

/* Music Selector Grid */
.music-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .music-selector-grid {
    grid-template-columns: 1fr;
  }
}

.music-choice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.music-choice-card:hover {
  border-color: var(--primary-pink);
  background: #fff5f7;
}

.music-choice-card.active {
  border-color: var(--primary-red);
  background: #ffe4e6;
}

.music-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-card-info .music-icon {
  font-size: 1.3rem;
}

.music-card-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #881337;
}

.music-card-info p {
  font-size: 0.72rem;
  color: #9ca3af;
}

.preview-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #be123c;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.preview-play-btn:hover {
  transform: scale(1.15);
}

.preview-play-btn.playing {
  background: #10b981;
  animation: pulseGreen 1.2s infinite;
}

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

/* Rain of Wishes Editor */
.wishes-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px 0;
}

.wish-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff1f2;
  border: 1px solid #fda4af;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9f1239;
}

.wish-chip .remove-chip-btn {
  background: none;
  border: none;
  color: #be123c;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.wish-chip .remove-chip-btn:hover {
  color: #881337;
  font-weight: bold;
}

.add-wish-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-add-wish {
  padding: 0 18px;
  background: #be123c;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.quick-wish-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sugg-chip {
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px dashed #fda4af;
  background: #fff;
  color: #9f1239;
  cursor: pointer;
}

.sugg-chip:hover {
  background: #ffe4e8;
  border-style: solid;
}

/* Rain Photos Gallery Editor */
.photo-upload-container {
  margin-bottom: 12px;
}

.photo-thumbnails-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.photo-thumb-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #fda4af;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-item .remove-photo-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(190, 18, 60, 0.85);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Generated Card Link Banner in Preview */
.generated-web-card-box {
  background: #fff5f7;
  border: 1.5px solid #fda4af;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.generated-web-card-box h4 {
  font-size: 0.88rem;
  color: #881337;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.link-input-group {
  display: flex;
  gap: 6px;
}

.link-input-group input {
  flex-grow: 1;
  font-size: 0.8rem;
  padding: 6px 10px;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  background: #fff;
  color: #374151;
}

.btn-copy-link, .btn-open-link {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.btn-copy-link {
  background: #be123c;
  color: #fff;
}

.btn-open-link {
  background: #10b981;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Mobile Connect Top Bar */
.mobile-connect-bar {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-bottom: 1px solid #fecdd3;
  padding: 10px 16px;
  position: relative;
  z-index: 90;
}

.mobile-connect-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mobile-connect-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #881337;
}

.mobile-connect-info .mobile-icon {
  font-size: 1.4rem;
}

.mobile-url-text {
  font-family: monospace;
  background: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #fda4af;
  color: #be123c;
  font-weight: 700;
  margin-left: 6px;
  word-break: break-all;
}

.mobile-connect-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-mobile-url, .btn-show-qr-mobile {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-copy-mobile-url {
  background: #fff;
  color: #be123c;
  border: 1px solid #f43f5e;
}

.btn-copy-mobile-url:hover {
  background: #ffe4e6;
}

.btn-show-qr-mobile {
  background: #be123c;
  color: #fff;
}

.btn-show-qr-mobile:hover {
  background: #9f1239;
  transform: translateY(-1px);
}


