/* ===== TEMPLATE 7: LOVETIFY (Spotify-inspired) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: #121212; color: #fff; overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

:root {
  --green: #1DB954;
  --green-dark: #1aa34a;
  --dark: #121212;
  --dark2: #1a1a1a;
  --dark3: #282828;
  --white: #ffffff;
  --gray: #b3b3b3;
  --gold: #1DB954;
  --gold-dark: #1aa34a;
  --gold-light: #1ed760;
  --radius: 12px;
  --transition: all 0.3s ease;
  --font-heading: 'Montserrat', sans-serif;
}

/* ===== SPLIT LAYOUT ===== */
.split-layout { display: flex; height: 100vh; }

/* LEFT PANEL */
.left-panel {
  width: 55%; height: 100vh; position: relative; flex-shrink: 0;
  background: linear-gradient(180deg, #1a3a2a 0%, #0a1a10 100%);
  display: flex; align-items: center; justify-content: center;
}
.lp-content { text-align: center; z-index: 2; }
.lp-photo {
  width: 180px; height: 180px; margin: 0 auto 1.5rem;
  border-radius: 8px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.lp-photo img { width: 100%; height: 100%; object-fit: cover; }
.lp-label { font-size: 0.65rem; letter-spacing: 0.4em; color: var(--gray); margin-bottom: 0.5rem; }
.lp-names {
  font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--green); font-weight: 700;
}
.lp-guest { margin-top: 2rem; }
.lp-guest p { font-size: 0.8rem; color: var(--gray); }
.lp-guest-name { font-weight: 700; color: var(--white); font-size: 1rem; margin-top: 0.2rem; }
.lp-guest-city { font-size: 0.7rem; color: var(--gray); }
.music-btn {
  position: absolute; top: 1rem; left: 1rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.1); color: var(--green); font-size: 0.8rem; cursor: pointer;
}

/* RIGHT PANEL */
.right-panel {
  width: 45%; height: 100vh; overflow-y: auto; background: var(--dark2);
}
.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--dark3); border-radius: 4px; }

/* ===== SECTIONS ===== */
.lv-section { padding: 2rem 1.5rem; border-bottom: 1px solid var(--dark3); }
.lv-tag { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--gray); margin-bottom: 1rem; font-weight: 600; }
.lv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 0.4rem; vertical-align: middle; }

/* HEADER/QUOTE */
.lv-header { padding: 0; }
.lv-header-bg { position: relative; height: 200px; overflow: hidden; }
.lv-header-bg img { width: 100%; height: 100%; object-fit: cover; }
.lv-header-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--dark2) 100%); }
.lv-header-content { position: absolute; bottom: 1.5rem; left: 1.5rem; }
.lv-header-label { font-size: 0.7rem; color: var(--gray); }
.lv-header-names { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: white; }
.lv-quote { padding: 1.5rem; }
.lv-arabic { font-size: 0.85rem; line-height: 2; text-align: center; color: var(--gray); margin-bottom: 1rem; direction: rtl; }
.lv-translation { font-size: 0.8rem; color: var(--gray); line-height: 1.7; text-align: center; }
.lv-source { font-size: 0.8rem; color: var(--green); text-align: center; margin-top: 0.8rem; font-weight: 700; }

/* COUPLE */
.lv-couple { background: var(--dark2); }
.lv-artist {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; background: var(--dark3); border-radius: var(--radius);
  margin-bottom: 0.8rem;
}
.lv-artist img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lv-artist h4 { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; color: white; }
.lv-role { font-size: 0.7rem; color: var(--gray); }
.lv-parents { font-size: 0.75rem; color: var(--gray); margin-top: 0.2rem; }

/* GALLERY */
.lv-gallery { background: var(--dark2); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-item { aspect-ratio: 4/3; overflow: hidden; border-radius: 8px; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-del-btn { display: none; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #e74c3c; border: none; color: white; font-size: 0.55rem; cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.gallery-overlay { display: none; }

/* COUNTDOWN */
.lv-countdown { background: var(--dark2); }
.lv-cd-card { background: var(--dark3); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; }
.lv-cd-tag { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--gray); margin-bottom: 1.2rem; }
.countdown-timer { display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.cd-item { text-align: center; }
.cd-item span { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: white; display: block; }
.cd-item p { font-size: 0.6rem; letter-spacing: 0.15em; color: var(--gray); text-transform: capitalize; }
.cd-sep { font-size: 1.5rem; color: var(--gray); }
.lv-cd-sub { font-size: 0.8rem; color: var(--gray); margin-top: 1rem; font-style: italic; }

/* EVENT */
.lv-event { background: var(--white); color: var(--dark); }
.lv-event .lv-tag { color: var(--dark); }
.lv-event-card { background: var(--white); border: 1px solid #e0e0e0; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.lv-event-card h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--dark); }
.lv-event-card p { font-size: 0.82rem; color: #555; margin-bottom: 0.4rem; }
.lv-event-card p i { color: var(--green); margin-right: 0.4rem; }
.lv-btn-green {
  display: block; margin-top: 0.8rem; padding: 0.7rem; text-align: center;
  background: var(--green); color: white; border-radius: 50px; font-size: 0.82rem;
  font-weight: 600; transition: var(--transition);
}
.lv-btn-green:hover { background: var(--green-dark); }
.map-embed-wrap { display: none; margin-top: 0.8rem; border-radius: 8px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 160px; border: none; }

/* RSVP */
.lv-rsvp { background: var(--dark2); }
.lv-rsvp-card { background: var(--green); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; }
.lv-rsvp-icon { font-size: 1.8rem; color: white; margin-bottom: 0.5rem; }
.lv-rsvp-card h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 900; color: white; margin-bottom: 0.5rem; }
.lv-rsvp-card p { font-size: 0.82rem; color: rgba(255,255,255,0.8); margin-bottom: 1.2rem; }
.lv-rsvp-btns { display: flex; flex-direction: column; gap: 0.6rem; }
.lv-rsvp-choice input { display: none; }
.lv-rsvp-choice span {
  display: block; padding: 0.8rem; border-radius: 50px; text-align: center;
  border: 2px solid white; color: white; font-size: 0.88rem; cursor: pointer; transition: var(--transition);
}
.lv-rsvp-choice.hadir span { background: var(--dark); border-color: var(--dark); }
.lv-rsvp-choice input:checked + span { background: white; color: var(--green); font-weight: 700; }

/* LOVE STORY */
.lv-story { background: var(--dark2); }
.lv-story-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.timeline { position: relative; padding-left: 1rem; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--dark3); }
.timeline-item { position: relative; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.timeline-item.left, .timeline-item.right { display: block; flex-direction: unset; }
.timeline-dot { display: none; }
.timeline-content { width: 100%; margin: 0; padding: 1.2rem; background: var(--dark3); border-radius: var(--radius); border: none; box-shadow: none; }
.timeline-date { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--gray); display: block; margin-bottom: 0.3rem; }
.timeline-content h4 { font-family: var(--font-heading); font-size: 0.95rem; color: white; margin-bottom: 0.3rem; font-weight: 700; }
.timeline-content p { font-size: 0.8rem; color: var(--gray); line-height: 1.6; }
.tl-btns { position: absolute; top: 4px; right: 4px; display: none; gap: 3px; }
.tl-edit-btn, .tl-del-btn { width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer; font-size: 0.55rem; display: flex; align-items: center; justify-content: center; }
.tl-edit-btn { background: var(--green); color: white; }
.tl-del-btn { background: #e74c3c; color: white; }

/* GIFT */
.lv-gift { background: var(--white); color: var(--dark); }
.lv-gift h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--dark); }
.lv-gift-desc { font-size: 0.82rem; color: #555; line-height: 1.6; margin-bottom: 1.5rem; }
.lv-gift-card { border: 1px solid #e0e0e0; border-radius: var(--radius); padding: 1.2rem; text-align: center; margin-bottom: 0.8rem; }
.lv-gift-card h4 { font-size: 0.72rem; letter-spacing: 0.1em; color: #555; margin-bottom: 0.3rem; }
.gift-account { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--dark); }
.gift-holder { font-size: 0.75rem; color: #888; }
.gift-qris { margin: 0.5rem 0; }
.qris-img { max-width: 100px; margin: 0 auto; border-radius: 6px; }

/* WISHES */
.lv-wishes { background: var(--dark2); }
.lv-wishes h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
#wishForm textarea { width: 100%; padding: 0.8rem; border: 1px solid var(--dark3); border-radius: 8px; background: var(--dark3); color: white; font-size: 0.88rem; font-family: inherit; outline: none; resize: vertical; margin-bottom: 0.8rem; }
#wishForm textarea:focus { border-color: var(--green); }
.lv-btn-green-full { width: 100%; padding: 0.8rem; background: var(--green); color: white; border: none; border-radius: 50px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.lv-btn-green-full:hover { background: var(--green-dark); }
.wishes-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.wish-item { background: var(--dark3); border-radius: var(--radius); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.wish-header { margin-bottom: 0.3rem; }
.wish-avatar { display: none; }
.wish-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem; color: white; }
.wish-time { display: none; }
.wish-text { font-size: 0.8rem; color: var(--gray); line-height: 1.5; }

/* CLOSING */
.lv-closing { padding: 0; border: none; }
.lv-closing-bg { position: relative; height: 250px; overflow: hidden; border-radius: var(--radius); margin: 1rem; }
.lv-closing-bg img { width: 100%; height: 100%; object-fit: cover; }
.lv-closing-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.lv-closing-content { position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 2; }
.lv-closing-content p { font-size: 0.7rem; color: var(--gray); }
.lv-closing-content h2 { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: white; }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.1); border: none; color: white; font-size: 1rem; cursor: pointer; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* TOAST */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--green); color: white; padding: 0.7rem 1.4rem; border-radius: 50px; font-size: 0.8rem; z-index: 99999; opacity: 0; transition: all 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* NAV hidden */
.floating-nav { display: none !important; }

/* EDITOR FIX */
body.editor-active .right-panel { width: calc(45% - 320px); }
#editorPanel { z-index: 10001; }

/* RESPONSIVE */
@media (max-width: 900px) {
  body { overflow: auto; }
  .split-layout { flex-direction: column; height: auto; }
  .left-panel { width: 100%; height: 100vh; flex-shrink: 0; }
  .right-panel { width: 100%; height: auto; overflow: visible; }
  body.editor-active .right-panel { width: 100%; }
}
