/* ==========================================================================
   LOVE MEMORY — Premium Romantic & Cute Design System
   Aesthetic: Vibrant Soft Pink, Rose Gold, Glassmorphism, Floating Hearts & Glow
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Charm:wght@400;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #ff477e;
  --primary-light: #ff7597;
  --primary-soft: #fff0f5;
  --primary-gradient: linear-gradient(135deg, #ff477e 0%, #ff7597 50%, #ffaaab 100%);
  --romantic-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  --rose-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 240, 245, 0.65));
  --secondary: #e84393;
  --accent: #ff85a2;
  --dark-rose: #7209b7;
  --dark-text: #2b2d42;
  --muted-text: #6c757d;
  --light-bg: #fff5f8;
  --cream: #fffaf0;
  --white: #ffffff;
  --card-shadow: 0 15px 35px rgba(255, 71, 126, 0.12);
  --hover-shadow: 0 25px 50px rgba(255, 71, 126, 0.22);
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 182, 193, 0.45);
  --font-main: 'Prompt', sans-serif;
  --font-cute: 'Mitr', sans-serif;
  --font-hand: 'Mitr', sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

body {
  font-family: var(--font-main);
  background-color: var(--light-bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 182, 193, 0.3) 0%, transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(255, 117, 140, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 222, 233, 0.2) 0%, transparent 50%);
  color: var(--dark-text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Floating Hearts Ambient Background */
.ambient-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart-particle {
  position: absolute;
  color: rgba(255, 71, 126, 0.15);
  font-size: 1.5rem;
  animation: floatHeart 12s infinite linear;
}

@keyframes floatHeart {
  0% {
    transform: translateY(105vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* Navbar Glassmorphism */
.navbar-love {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 1.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 182, 193, 0.15);
}

.navbar-brand-love {
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar-brand-love i {
  font-size: 1.8rem;
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
  animation: pulse-heart 1.5s infinite;
}

/* Prevent the logged-in action cluster (wallet / dashboard / logout) from
   overlapping the nav links when there isn't enough horizontal room —
   wrap onto its own row instead of squeezing/colliding. */
.navbar-collapse {
  row-gap: 10px;
}

.navbar-actions {
  flex-wrap: wrap;
  row-gap: 8px;
}

.navbar-dashboard-btn {
  min-width: 0;
}

.navbar-username {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (max-width: 991.98px) {
  .navbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Cute Buttons */
.btn-love {
  background: var(--primary-gradient);
  color: var(--white) !important;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 71, 126, 0.35);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.btn-love::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.btn-love:hover::before {
  left: 100%;
}

.btn-love:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(255, 71, 126, 0.45);
}

.btn-love-outline {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary) !important;
  border: 2px solid var(--primary-light);
  padding: 10px 26px;
  border-radius: 50px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.btn-love-outline:hover {
  background: var(--primary);
  color: var(--white) !important;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 71, 126, 0.3);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 100px 0 80px;
  background: radial-gradient(circle at 50% 30%, #fff0f5 0%, #fff5f8 70%);
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--light-bg), transparent);
}

.hero-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(255, 71, 126, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #3d0c24;
  line-height: 1.25;
  margin-bottom: 24px;
}

.hero-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-cute);
  font-size: 3.6rem;
  font-weight: 600;
  display: inline-block;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-text);
  margin-bottom: 40px;
  line-height: 1.7;
}

/* Category Pills Bar */
.category-chip {
  background: var(--white);
  color: var(--dark-text);
  border: 1.5px solid rgba(255, 182, 193, 0.4);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.category-chip:hover, .category-chip.active {
  background: var(--primary-gradient);
  color: var(--white) !important;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 71, 126, 0.3);
}

.category-chip:hover i, .category-chip.active i {
  color: var(--white) !important;
}

/* Template Card Design */
.template-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 182, 193, 0.35);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  backdrop-filter: blur(10px);
}

.template-card:hover {
  transform: translateY(-10px) scale(1.015);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-light);
}

.template-img-container {
  height: 250px;
  overflow: hidden;
  position: relative;
}

.template-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.template-card:hover .template-img {
  transform: scale(1.08);
}

.badge-love {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.badge-popular {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
}

.badge-new {
  background: linear-gradient(135deg, #2ed573, #1e90ff);
  color: #fff;
}

.badge-featured {
  background: linear-gradient(135deg, #ffa502, #ff7f50);
  color: #fff;
}

/* Section Titles */
.section-title-wrap {
  position: relative;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #3d0c24;
}

.section-subtitle {
  color: var(--muted-text);
  font-size: 1.05rem;
}

/* Feature Step Box */
.step-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  transition: all 0.35s ease;
  height: 100%;
}

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

.step-badge {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(255, 71, 126, 0.3);
}

/* Split Screen Card Builder */
.builder-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

.builder-form-panel {
  width: 50%;
  padding: 35px;
  background: #ffffff;
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  height: calc(100vh - 70px);
}

.builder-preview-panel {
  width: 50%;
  background: radial-gradient(circle at 50% 50%, #ffeaf2 0%, #ffd6e5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 25px;
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
}

/* Device Frame Switcher */
/* Device Frame Container & Switcher (Mobile Phone, Tablet, Notebook) */
.device-frame-container {
  position: relative;
  background: #1e1e24;
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* 1. MOBILE PHONE FRAME (iPhone / Smartphone) */
.device-frame-container.mobile {
  width: 385px;
  height: 720px;
  border-radius: 48px;
  padding: 12px;
  border: 4px solid #3a3a42;
}

.device-frame-container.mobile .device-notch {
  width: 100px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.device-frame-container.mobile .camera-lens {
  width: 10px;
  height: 10px;
  background: #0f172a;
  border-radius: 50%;
  border: 1px solid #334155;
}

.device-frame-container.mobile .speaker-grill {
  width: 40px;
  height: 4px;
  background: #1e293b;
  border-radius: 4px;
}

.device-frame-container.mobile .device-screen {
  border-radius: 38px;
}

.device-frame-container.mobile .notebook-base {
  display: none;
}

/* 2. TABLET FRAME (iPad / Tablet) */
.device-frame-container.tablet {
  width: 650px;
  height: 740px;
  border-radius: 32px;
  padding: 14px;
  border: 4px solid #3a3a42;
}

.device-frame-container.tablet .device-notch {
  width: 12px;
  height: 12px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 50%;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.device-frame-container.tablet .speaker-grill {
  display: none;
}

.device-frame-container.tablet .device-screen {
  border-radius: 22px;
}

.device-frame-container.tablet .notebook-base {
  display: none;
}

/* 3. DESKTOP / NOTEBOOK LAPTOP FRAME */
.device-frame-container.desktop {
  width: 100%;
  max-width: 820px;
  height: 660px;
  border-radius: 18px 18px 0 0;
  padding: 12px 12px 0 12px;
  border: 4px solid #3a3a42;
  border-bottom: none;
  background: #1e1e24;
}

.device-frame-container.desktop .device-notch {
  width: 12px;
  height: 12px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 50%;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.device-frame-container.desktop .speaker-grill {
  display: none;
}

.device-frame-container.desktop .device-screen {
  border-radius: 12px 12px 0 0;
}

/* NOTEBOOK BASE KEYBOARD DECK */
.device-frame-container.desktop .notebook-base {
  display: block;
  width: calc(100% + 40px);
  height: 24px;
  margin-left: -20px;
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 60%, #6b7280 100%);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
}

.device-frame-container.desktop .notebook-notch {
  width: 110px;
  height: 8px;
  background: #4b5563;
  margin: 0 auto;
  border-radius: 0 0 8px 8px;
}

/* INNER DEVICE SCREEN CONTAINER */
.device-screen {
  width: 100%;
  height: 100%;
  background: #ffffff;
  overflow-y: auto;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* Digital Card Interactive Presentation */
.envelope-wrapper {
  perspective: 1000px;
  cursor: pointer;
}

.envelope-card {
  width: 360px;
  height: 250px;
  background: linear-gradient(135deg, #ffb6c1, #ff85a2);
  position: relative;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(255, 71, 126, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s ease;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  border-left: 180px solid transparent;
  border-right: 180px solid transparent;
  border-top: 140px solid #ff99aa;
  transform-origin: top;
  transition: transform 0.6s ease;
}

.envelope-open .envelope-flap {
  transform: rotateX(180deg);
}

/* Animations */
@keyframes pulse-heart {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes glow-pulse {
  0% { box-shadow: 0 0 15px rgba(255, 71, 126, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 71, 126, 0.6); }
  100% { box-shadow: 0 0 15px rgba(255, 71, 126, 0.3); }
}

/* Line Clamp Utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .builder-layout {
    flex-direction: column;
  }
  .builder-form-panel, .builder-preview-panel {
    width: 100%;
    height: auto;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .hero-title span {
    font-size: 2.8rem;
  }
}

/* Custom SweetAlert2 LOVE MEMORY Theme Styling */
.love-swal-popup {
  border-radius: 28px !important;
  padding: 24px !important;
  box-shadow: 0 20px 60px rgba(255, 71, 126, 0.25) !important;
  border: 2px solid rgba(255, 182, 193, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  font-family: 'Prompt', sans-serif !important;
}

.love-swal-title {
  font-family: 'Mitr', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.4rem !important;
  color: #3d0c24 !important;
}

.love-swal-text {
  font-size: 1.05rem !important;
  color: #4a5568 !important;
}

.swal2-timer-progress-bar {
  background: linear-gradient(135deg, #ff477e, #ff7597) !important;
}

.swal2-confirm.btn-love-swal {
  background: linear-gradient(135deg, #ff477e, #ff7597) !important;
  color: #fff !important;
  border-radius: 50px !important;
  padding: 10px 30px !important;
  box-shadow: 0 6px 18px rgba(255, 71, 126, 0.3) !important;
}
