@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500;1,600;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Great+Vibes&display=swap');

:root {
  --primary: #ff3366;
  --primary-light: #ff6b8b;
  --primary-dark: #d81b4c;
  --secondary: #ff85a2;
  --accent: #ffd166;
  --bg-romantic: #fff5f7;
  --romantic-gradient: linear-gradient(135deg, #ff4d6d 0%, #ff758f 50%, #ff8fa3 100%);
  --gold-gradient: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%);
  --dark: #1f1220;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #fffafc;
  color: #2b1828;
  overflow-x: hidden;
  position: relative;
}

/* Font chữ lãng mạn, sang trọng, tinh tế hỗ trợ tiếng Việt hoàn hảo */
.font-romantic {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.02em;
}

.font-script {
  font-family: 'Dancing Script', 'Great Vibes', cursive;
}

/* Glassmorphism effects */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 182, 193, 0.35);
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.08);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 182, 193, 0.25);
}

.glass-dropdown {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 182, 193, 0.4);
  box-shadow: 0 16px 40px rgba(255, 77, 109, 0.15);
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 25px rgba(255, 77, 109, 0.35);
}

.glow-hover:hover {
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.4);
  transform: translateY(-3px);
}

/* Floating Hearts Background Container */
#heart-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  color: rgba(255, 77, 109, 0.25);
  animation: floatUp linear infinite;
  user-select: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(105vh) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-10vh) scale(1.1) rotate(360deg);
    opacity: 0;
  }
}

/* Animations */
@keyframes pulseSubtle {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.animate-pulse-subtle {
  animation: pulseSubtle 2.5s ease-in-out infinite;
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spinSlow 12s linear infinite;
}

/* Gradient text */
.text-gradient-romantic {
  background: linear-gradient(135deg, #e61f53 0%, #ff4d6d 50%, #c9184a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #fff0f3;
}

::-webkit-scrollbar-thumb {
  background: #ffb3c1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff758f;
}

/* Modal Transitions */
.modal-overlay {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-overlay.hidden .modal-content {
  transform: scale(0.95) translateY(15px);
  opacity: 0;
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Video demo frame */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
}

.video-responsive iframe,
.video-responsive video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Polaroid Card Effect */
.polaroid-card {
  background: #ffffff;
  padding: 12px 12px 24px 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.polaroid-card:hover {
  transform: translateY(-6px) rotate(1deg);
  box-shadow: 0 18px 35px rgba(255, 77, 109, 0.25);
}

/* Badges */
.badge-hot {
  background: linear-gradient(135deg, #ff4d6d, #e63946);
  color: white;
  animation: pulseSubtle 2s infinite;
}

.badge-coming-soon {
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Package selection: thinner border, no clipping */
.package-option {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  user-select: none;
  border-width: 1.5px !important;
}

.package-option.is-selected {
  border-color: #ff3366 !important;
  background-color: #fff5f7 !important;
  box-shadow: inset 0 0 0 1px #ff3366, 0 2px 8px rgba(255, 51, 102, 0.1) !important;
}

.package-option:not(.is-selected) {
  border-color: #e5e7eb !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}

.package-option:not(.is-selected):hover {
  border-color: #fca5a5 !important;
  background-color: #fffafb !important;
}

.tip-pill.active {
  background: #ff3366 !important;
  color: #ffffff !important;
  border-color: #ff3366 !important;
  box-shadow: 0 2px 8px rgba(255, 51, 102, 0.3);
}

/* QR Code Display Canvas */
#payment-qrcode img,
#generated-gift-qr img {
  margin: 0 auto;
  border-radius: 12px;
  padding: 8px;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Custom Audio Player */
.vinyl-disc {
  border-radius: 50%;
  background: radial-gradient(circle, #2b1828 0%, #111111 60%, #333 70%, #111 85%, #ff4d6d 90%, #fff 92%, #ff4d6d 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Google Sign In Button Container styling */
.g_id_signin {
  display: inline-block;
  margin: 0 auto;
}

/* ============================================================
   GIFT BUILDER v2 - Recipient pill styles
   ============================================================ */

/* Default state */
.recipient-label {
  border-color: #fecdd3; /* rose-200 */
  color: #374151;        /* gray-700 */
  background: #fff;
}

/* Selected state (driven by JS via .is-selected class or directly) */
.recipient-type-btn input[type="radio"]:checked + .recipient-label {
  background: #f43f5e;   /* rose-500 */
  border-color: #f43f5e;
  color: #fff;
}

.recipient-type-btn:hover .recipient-label {
  border-color: #fb7185; /* rose-400 */
}

/* Letter line rows */
.letter-line-row:focus-within .btn-remove-line {
  opacity: 1;
}

/* Photo preview grid thumbnails */
#photo-preview-grid .group:hover img {
  opacity: 0.85;
}

/* ============================================================
   FIX: Đường viền focus ring bị cắt trong dialog tạo mẫu
   ============================================================ */

/* Tắt hoàn toàn Tailwind ring system trong modal, dùng box-shadow thay thế */
#gift-builder-modal input:focus,
#gift-builder-modal select:focus,
#gift-builder-modal textarea:focus {
  outline: none !important;
  --tw-ring-shadow: none !important;
  --tw-ring-offset-shadow: none !important;
  box-shadow: inset 0 0 0 1px #f43f5e !important;  /* viền mỏng 1px bên trong */
  border-color: #f43f5e !important;
}

/* Đảm bảo modal content không clip bất cứ gì */
#gift-builder-modal > .modal-content {
  overflow: visible !important;
}

/* Step 1 cho phép scroll-y nhưng không clip ngang */
#gift-builder-modal #gift-builder-step-1 {
  overflow-y: auto !important;
  overflow-x: visible !important;
}

/* Mỗi field wrapper cũng không clip */
#gift-builder-modal #gift-builder-step-1 > div {
  overflow: visible !important;
}

/* QR Heart dialog animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
