/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Courier+Prime:wght@400;700&family=Inter:wght@300;400;600;800&family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --navy: #19345e;
  --maroon: #681121;
  --green: #1a472a;
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --white: #ffffff;
  --off-white: #f8fafc;
  --paper: #fcfaf5;
  
  --passport-color: var(--maroon); /* Will be overridden dynamically if needed */
}

html, body { margin: 0; padding: 0; overflow-x: hidden; background: #e0e5ec; min-height: 100vh; font-family: 'Inter', sans-serif; color: #333; }
* { box-sizing: border-box; }

.mono { font-family: 'Courier Prime', monospace; }
.serif { font-family: 'Playfair Display', serif; }
.script { font-family: 'Great Vibes', cursive; }
.cinzel { font-family: 'Cinzel', serif; }

/* APP CONTAINER */
.app-container {
  width: 100%; max-width: 480px; min-height: 100vh; height: auto;
  margin: 0 auto; background: var(--paper);
  position: relative; z-index: 10;
  box-shadow: 0 0 40px rgba(0,0,0,0.15); display: block; overflow: hidden;
}

/* COVER OVERLAY */
.intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; justify-content: center; align-items: center;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
  perspective: 1000px;
}

.passport-book {
  width: 320px; height: 450px;
  background-color: var(--passport-color);
  background-image: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%);
  border-radius: 4px 16px 16px 4px;
  box-shadow: inset 10px 0 20px rgba(0,0,0,0.3), 5px 5px 25px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--gold);
  border-left: 2px solid rgba(0,0,0,0.4);
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 1.5s ease;
  transform-origin: left center;
}

.passport-emblem { width: 120px; margin-bottom: 20px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.passport-title { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 900; letter-spacing: 4px; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.passport-subtitle { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 2px; margin-top: 5px; opacity: 0.8; text-transform: uppercase; }

.btn-open {
  margin-top: 40px; background: transparent; border: 1px solid var(--gold);
  color: var(--gold); padding: 12px 30px; font-family: 'Cinzel', serif;
  font-size: 14px; letter-spacing: 2px; border-radius: 30px;
  cursor: pointer; transition: all 0.3s;
}
.btn-open:hover { background: rgba(212, 175, 55, 0.1); box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); }

/* MAIN CONTENT */
.passport-page {
  position: relative; padding: 30px 20px; min-height: 100vh;
  background-color: var(--paper);
  background-image: 
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(0,0,0,0.03) 100%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 2px, transparent 2px, transparent 4px);
  box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
}
.passport-page::before {
  content: ''; position: absolute; top:0; bottom:0; left:0; width: 15px;
  background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 100%);
}

.page-header { text-align: center; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 15px; margin-bottom: 25px; }
.page-header h2 { font-family: 'Cinzel', serif; color: var(--navy); margin: 0; font-size: 20px; letter-spacing: 2px; }
.page-header p { margin: 5px 0 0; font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }

/* BIODATA (HERO) */
.biodata-wrap { background: #fff; border-radius: 8px; padding: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.05); }
.bio-top { display: flex; gap: 15px; margin-bottom: 20px; }
.bio-photo { width: 110px; height: 140px; border-radius: 4px; overflow: hidden; position: relative; border: 1px solid #ddd; }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.2) contrast(1.1); }
.bio-info { flex: 1; }
.bio-row { margin-bottom: 12px; }
.bio-label { font-size: 9px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 2px; }
.bio-val { font-size: 14px; font-weight: 700; color: var(--navy); margin: 0; text-transform: uppercase; }

/* MRZ CODE */
.mrz-wrap { background: rgba(0,0,0,0.02); padding: 10px; border-radius: 4px; font-family: 'Courier Prime', monospace; font-size: 13px; line-height: 1.5; color: #111; word-break: break-all; letter-spacing: 2px; }

/* WATERMARK */
.watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.05; width: 80%; pointer-events: none; z-index: 0; }

/* STAMPS */
.stamp { position: absolute; opacity: 0.7; mix-blend-mode: multiply; transform: rotate(-15deg); z-index: 5; font-family: 'Cinzel', serif; font-weight: 900; border: 3px solid; padding: 5px 10px; border-radius: 8px; font-size: 16px; letter-spacing: 2px; }
.stamp.red { color: #b91c1c; border-color: #b91c1c; }
.stamp.blue { color: #1d4ed8; border-color: #1d4ed8; }

/* SLIDESHOW */
.slide-wrap { position: relative; width: 100%; height: 250px; border-radius: 8px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.slide-item { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; }
.slide-item.active { opacity: 1; }

/* COUNTDOWN */
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.cd-box { background: rgba(25, 52, 94, 0.05); border: 1px solid rgba(25, 52, 94, 0.1); border-radius: 6px; padding: 10px; text-align: center; }
.cd-box span { font-size: 20px; font-weight: 800; color: var(--navy); display: block; }
.cd-box small { font-size: 9px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }

/* TEXTS */
.sec-title { font-family: 'Cinzel', serif; color: var(--navy); font-size: 22px; text-align: center; margin-bottom: 20px; position: relative; z-index: 2; }
.desc-text { font-size: 14px; line-height: 1.8; text-align: center; color: #444; position: relative; z-index: 2; }

/* EVENTS */
.event-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 15px; position: relative; z-index: 2; border-left: 4px solid var(--gold); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.ev-badge { display: inline-block; background: var(--navy); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; letter-spacing: 1px; }
.ev-title { font-size: 18px; color: var(--navy); margin: 0 0 10px; font-family: 'Cinzel', serif; font-weight: 700; }
.ev-detail { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; margin-bottom: 8px; }
.ev-detail i { color: var(--gold); }

/* LUGGAGE TAG (GIFTS) */
.luggage-tag { background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 20px; position: relative; margin-top: 20px; z-index: 2; }
.luggage-tag::before { content: ''; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); width: 40px; height: 10px; background: #fff; border: 2px solid var(--navy); border-radius: 5px; border-bottom: none; }
.tag-hole { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; background: var(--paper); border-radius: 50%; border: 2px solid var(--navy); }
.gift-item { margin-top: 30px; text-align: center; }
.btn-copy { background: var(--navy); color: #fff; border: none; padding: 8px 15px; border-radius: 4px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; transition: 0.3s; }
.btn-copy:active { transform: scale(0.95); }
.btn-outline { display: inline-block; border: 1px solid var(--navy); color: var(--navy); padding: 8px 15px; border-radius: 4px; text-decoration: none; font-size: 12px; margin-top: 10px; }

/* RSVP MANIFEST */
.manifest-form { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); position: relative; z-index: 2; border: 1px solid rgba(0,0,0,0.05); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; color: var(--gray); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; }
.form-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; background: #fdfdfd; }
.form-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(25, 52, 94, 0.1); }
.btn-submit { width: 100%; background: var(--gold); color: #fff; border: none; padding: 14px; border-radius: 6px; font-size: 14px; font-weight: 700; letter-spacing: 1px; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { background: #c5a028; }

/* WISHES */
.wish-list { margin-top: 20px; max-height: 400px; overflow-y: auto; background: #fff; border-radius: 8px; border: 1px solid rgba(0,0,0,0.05); }
.wish-item { padding: 15px; border-bottom: 1px solid #eee; }
.wish-item:last-child { border-bottom: none; }
.wish-name { font-weight: 700; color: var(--navy); font-size: 14px; margin: 0 0 5px; }
.wish-badge { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }
.wish-badge.hadir { background: #dcfce7; color: #166534; }
.wish-badge.ragu { background: #fef08a; color: #854d0e; }
.wish-badge.tidak { background: #fee2e2; color: #991b1b; }
.wish-msg { font-size: 13px; color: #555; margin: 0; line-height: 1.5; }

/* MUSIC TOGGLE */
.music-toggle { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; border-radius: 50%; background: var(--gold); color: #fff; border: 2px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; z-index: 1000; cursor: pointer; transition: all 0.3s; opacity: 0.8; }
.music-toggle.playing { animation: pulsate-fwd 2s ease-in-out infinite both; opacity: 1; }
@keyframes pulsate-fwd { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); } 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } }
