/* ===== GLOBAL ===== */
:root {
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #9a7a2e;
  --ivory: #fdf8f0;
  --dark-bg: #1a1209;
  --panel-bg: #fff9f0;
  --text-dark: #2d1f00;
  --accent: #c9a84c;
}

* { box-sizing: border-box; }

body {
  font-family: 'Lato', sans-serif;
  background: #f5f0e8;
  color: var(--text-dark);
  padding-top: 70px;
}

.page { min-height: calc(100vh - 70px); }

/* ===== NAVBAR ===== */
.lux-nav {
  background: linear-gradient(135deg, #1a1209 0%, #2d1f00 100%) !important;
  border-bottom: 2px solid var(--gold);
  backdrop-filter: blur(10px);
}
.lux-brand {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem !important;
  color: var(--gold) !important;
  letter-spacing: 1px;
}
.navbar-nav .nav-link {
  color: var(--gold-light) !important;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: color 0.3s;
  padding: 0.5rem 1rem !important;
}
.navbar-nav .nav-link:hover { color: var(--gold) !important; }

/* ===== HERO ===== */
.lux-hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1209 0%, #2d1f00 40%, #3d2b10 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(201,168,76,0.15) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 2; }
.hero-tag {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: #fff;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.gold-text { color: var(--gold); }
.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  line-height: 1.8;
}

/* Floating petals */
.hero-petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50% 0;
  opacity: 0.6;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== BUTTONS ===== */
.lux-btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #e8c35a 50%, var(--gold-dark) 100%);
  color: #1a1209;
  border: none;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(201,168,76,0.3);
}
.lux-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,168,76,0.5);
  color: #1a1209;
}
.lux-btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0;
  transition: all 0.3s;
}
.lux-btn-outline:hover {
  background: var(--gold);
  color: #1a1209;
  transform: translateY(-2px);
}
.lux-btn-save {
  background: linear-gradient(135deg, #2d1f00, #3d2b10);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0;
  transition: all 0.3s;
}
.lux-btn-save:hover { background: var(--gold); color: #1a1209; }

/* ===== SECTIONS ===== */
.features-section { background: var(--ivory); }
.templates-preview-section { background: #fff; }

.section-tag {
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.gold-divider {
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-bottom: 2rem;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
  background: #fff;
  border: 1px solid rgba(201,168,76,0.2);
  padding: 2rem 1.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.5rem;
  color: #1a1209;
  box-shadow: 0 5px 15px rgba(201,168,76,0.3);
}
.feature-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.feature-card p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== TEMPLATE PREVIEWS ===== */
.template-preview-card {
  height: 200px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}
.template-preview-card:hover { transform: scale(1.03); }
.template-preview-card:hover .tp-overlay { opacity: 1; }
.classic-preview { background: linear-gradient(135deg, #1a1209 0%, #3d2b10 100%); border: 3px solid var(--gold); }
.floral-preview { background: linear-gradient(135deg, #fff8f8 0%, #fce4ec 100%); border: 3px solid #e8b4d8; }
.modern-preview { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border: 3px solid #a8c5da; }
.royal-preview { background: linear-gradient(135deg, #2d1b69 0%, #11998e 100%); border: 3px solid #9b8dc4; }
.tp-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.tp-overlay span {
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #1a1209, #2d1f00, #3d2b10);
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--gold);
}
.page-title {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}
.page-sub {
  color: rgba(255,255,255,0.6);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  margin: 0;
}

/* ===== PANEL ===== */
.lux-panel {
  background: #fff;
  border: 1px solid rgba(201,168,76,0.3);
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.panel-title {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-size: 1.1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--gold);
}

/* ===== FORM INPUTS ===== */
.lux-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.3rem;
}
.lux-input {
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 0;
  background: var(--ivory);
  color: var(--text-dark);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}
.lux-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
  background: #fff;
  outline: none;
}
.lux-color-pick {
  width: 40px; height: 40px;
  border-radius: 50%;
  padding: 2px;
  border: 2px solid var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== COLOR SWATCHES ===== */
.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.color-swatch:hover, .color-swatch.active {
  border-color: var(--text-dark);
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ===== TEMPLATE GRID ===== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 0.5rem;
}
.tmpl-thumb {
  height: 55px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
}
.tmpl-thumb:hover, .tmpl-thumb.active { border-color: var(--gold); transform: scale(1.05); }
.tmpl-thumb span {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 1;
  position: relative;
}

/* ===== CARD PREVIEW ===== */
.card-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  background: #f0ebe0;
  padding: 1.5rem;
}
.card-preview {
  width: 100%;
  max-width: 560px;
  min-height: 750px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ===== VIDEO PREVIEW ===== */
.video-preview-wrap canvas {
  width: 100%;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  background: #000;
  display: block;
}

/* ===== GALLERY ===== */
.gallery-card {
  background: #fff;
  border: 1px solid rgba(201,168,76,0.2);
  overflow: hidden;
  transition: all 0.3s;
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  border-color: var(--gold);
}
.gallery-thumb {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1209, #3d2b10);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumb canvas { width: 100% !important; height: 100% !important; object-fit: cover; }
.gallery-info { padding: 1rem; }
.gallery-info h6 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}
.gallery-info p { font-size: 0.8rem; color: #888; margin: 0; }
.gallery-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}
.badge-card { background: rgba(201,168,76,0.2); color: var(--gold-dark); }
.badge-video { background: rgba(100,149,237,0.2); color: cornflowerblue; }

/* ===== FOOTER ===== */
.lux-footer {
  background: linear-gradient(135deg, #1a1209, #2d1f00);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  border-top: 2px solid var(--gold);
  font-size: 0.9rem;
}

/* ===== TOAST ===== */
#luxToast {
  background: linear-gradient(135deg, #2d1f00, #1a1209);
  border: 1px solid var(--gold) !important;
  color: var(--gold);
}

/* ===== BLINK ANIMATION ===== */
.blink { animation: blink 1s infinite; }
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0; } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f0ebe0; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ===== CARD TEMPLATES ===== */

/* Template 1: Classic Gold */
.tpl-classic {
  background: linear-gradient(160deg, #1a1209 0%, #2d1f00 40%, #1a1209 100%);
  color: #e8d5a3;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}
.tpl-classic .card-border-deco {
  position: absolute; inset: 12px;
  border: 1px solid rgba(201,168,76,0.4);
  pointer-events: none;
}
.tpl-classic .card-inner-border {
  position: absolute; inset: 20px;
  border: 1px solid rgba(201,168,76,0.2);
  pointer-events: none;
}

/* Template 2: Floral White */
.tpl-floral {
  background: linear-gradient(160deg, #fff8f8 0%, #fce4ec 50%, #fff8f8 100%);
  color: #5c2b3d;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 3: Midnight Blue */
.tpl-midnight {
  background: linear-gradient(160deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 100%);
  color: #e0e8f0;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 4: Ivory Blush */
.tpl-ivory {
  background: linear-gradient(160deg, #fdf8f0 0%, #fef3e6 50%, #fdf8f0 100%);
  color: #4a3728;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 5: Royal Purple */
.tpl-royal {
  background: linear-gradient(160deg, #1a0533 0%, #2d1156 50%, #1a0533 100%);
  color: #e8daf5;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 6: Forest Green */
.tpl-forest {
  background: linear-gradient(160deg, #0a1e0f 0%, #1a3a22 50%, #0a1e0f 100%);
  color: #d4e8c2;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 7: Rose Gold */
.tpl-rose {
  background: linear-gradient(160deg, #2d0d18 0%, #4a1728 50%, #2d0d18 100%);
  color: #f5d5dc;
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Template 8: Modern Mono */
.tpl-mono {
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: 'Lato', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 2rem;
  min-height: 750px;
}

/* Shared card elements */
.card-ornament {
  font-size: 1.8rem;
  margin: 0.5rem 0;
  opacity: 0.8;
}
.card-couple-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.2;
  text-align: center;
}
.card-and {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
  display: block;
  margin: 0.3rem 0;
}
.card-divider {
  width: 120px; height: 1px;
  margin: 1rem auto;
}
.card-invite-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-align: center;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 85%;
  opacity: 0.9;
}
.card-date-block {
  text-align: center;
  margin: 1rem 0;
  padding: 0.75rem 1.5rem;
  border-left: 2px solid;
  border-right: 2px solid;
}
.card-date-main {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  display: block;
}
.card-time {
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
}
.card-venue-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
}
.card-venue-addr {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
  font-style: italic;
}
.card-rsvp {
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.6;
  margin-top: 1rem;
}

/* Decorative elements */
.deco-diamonds {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0.5rem 0;
}
.deco-diamond {
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: currentColor;
  opacity: 0.6;
}
.deco-diamond.lg {
  width: 10px; height: 10px;
  opacity: 0.9;
}

/* Corner decorations */
.card-corner {
  position: absolute;
  width: 40px; height: 40px;
  opacity: 0.6;
}
.card-corner.tl { top: 15px; left: 15px; border-top: 2px solid; border-left: 2px solid; }
.card-corner.tr { top: 15px; right: 15px; border-top: 2px solid; border-right: 2px solid; }
.card-corner.bl { bottom: 15px; left: 15px; border-bottom: 2px solid; border-left: 2px solid; }
.card-corner.br { bottom: 15px; right: 15px; border-bottom: 2px solid; border-right: 2px solid; }

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .card-preview { min-height: 600px; }
  .card-preview-wrap { padding: 0.5rem; }
  .template-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== ENHANCED TEMPLATE STYLES ===== */
.tpl-classic    { background: linear-gradient(135deg,#1a1209,#3d2b10); color: #e8d5a3; }
.tpl-floral     { background: linear-gradient(135deg,#fff8f8,#fce4ec); color: #8b3a52; }
.tpl-midnight   { background: linear-gradient(135deg,#0d1b2a,#1b263b); color: #b8d4e8; }
.tpl-ivory      { background: linear-gradient(135deg,#fdf8f0,#fef3e6); color: #7a5c3a; }
.tpl-royal      { background: linear-gradient(135deg,#1a0533,#2d1156); color: #d4b8f5; }
.tpl-forest     { background: linear-gradient(135deg,#0a1e0f,#1a3a22); color: #b8d4a0; }
.tpl-rose       { background: linear-gradient(135deg,#2d0d18,#4a1728); color: #f5c5d0; }
.tpl-mono       { background: linear-gradient(135deg,#0a0a0a,#1a1a1a); color: #e0e0e0; }
.tpl-celestial  { background: linear-gradient(135deg,#0b0c2a,#1a1545); color: #c8d8ff; }
.tpl-blush      { background: linear-gradient(135deg,#f9eef3,#f5d7e3); color: #8a4060; }
.tpl-emerald    { background: linear-gradient(135deg,#003d2b,#015a40); color: #9de8c8; }
.tpl-sunset     { background: linear-gradient(135deg,#2d0a00,#8b2500); color: #ffcba4; }
.tpl-lavender   { background: linear-gradient(135deg,#1e0a3c,#3b1a6e); color: #e0ccff; }
.tpl-arctic     { background: linear-gradient(135deg,#e8f4f8,#cde8f5); color: #1a5c7a; }
.tpl-obsidian   { background: linear-gradient(135deg,#111111,#2c2c2c); color: #d4a017; }
.tpl-roseGold   { background: linear-gradient(135deg,#2a1015,#5c2030); color: #e8a090; }

/* Ensure card text adapts to template */
.tpl-arctic .card-invite-text,
.tpl-ivory .card-invite-text,
.tpl-floral .card-invite-text,
.tpl-blush .card-invite-text {
  color: inherit;
  opacity: 0.85;
}

/* AI badge animation */
.ai-badge {
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); }
  50% { box-shadow: 0 0 10px 4px rgba(99,102,241,0.3); }
}
