/* ============================================
   PHYSICAL WEDDING INVITATION CARD (ZERO SCROLL)
   Theme: Ultra-Luxury Royal Gold & Platinum Silver Foil
   ============================================ */

:root {
    --bg-dark: #070609;
    --card-bg: linear-gradient(145deg, #16131c 0%, #09070d 100%);
    --card-border: #e0c283;

    /* Metallic Gold Palette */
    --gold-primary: #e0c283;
    --gold-light: #f9ebd2;
    --gold-dark: #a8823b;
    --gold-gradient: linear-gradient(135deg, #f9ebd2 0%, #e0c283 50%, #a8823b 100%);

    /* Metallic Silver Palette */
    --silver-primary: #e2e8f0;
    --silver-light: #ffffff;
    --silver-dark: #94a3b8;
    --silver-gradient: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #78889b 100%);

    /* Dual-Tone Gold & Silver Gradient */
    --gold-silver-gradient: linear-gradient(135deg, #f9ebd2 0%, #e0c283 35%, #e2e8f0 70%, #ffffff 100%);
    --glow-dual: rgba(224, 194, 131, 0.2);

    /* Text Colors */
    --text-light: #ffffff;
    --text-muted: #e2e8f0;
    --text-gold-subtle: #ebd8b5;
    --text-dim: #94a3b8;

    --font-cinzel: 'Cinzel', serif;
    --font-script: 'Pinyon Script', cursive;
    --font-garamond: 'Cormorant Garamond', serif;
    --font-montserrat: 'Montserrat', sans-serif;
}

/* Reset & Lock Body Viewport (No Scroll) */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden !important;
    font-family: var(--font-montserrat);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 50% 25%, rgba(60, 45, 80, 0.35) 0%, transparent 65%),
        radial-gradient(circle at 20% 85%, rgba(224, 194, 131, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 85%, rgba(226, 232, 240, 0.1) 0%, transparent 50%);
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* ============================================
   ENVELOPE COVER
   ============================================ */
.envelope-cover {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-cover.fade-out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

.envelope-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.envelope-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.38) contrast(1.15) saturate(0.8);
}

.envelope-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(12, 10, 16, 0.55) 0%, rgba(7, 6, 9, 0.96) 100%);
}

.envelope-card {
    max-width: 420px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--gold-primary);
    border-radius: 14px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px var(--glow-dual);
}

.vip-badge-large {
    display: inline-block;
    font-family: var(--font-cinzel);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 8px;
    background: var(--gold-silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border: 1.5px solid var(--gold-primary);
    padding: 4px 24px;
    border-radius: 40px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(224, 194, 131, 0.25);
    text-indent: 8px;
}

.envelope-subtitle {
    font-family: var(--font-cinzel);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--silver-primary);
    margin-bottom: 8px;
}

.envelope-names {
    font-family: var(--font-script);
    font-size: 3.6rem;
    background: var(--gold-silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin: 4px 0 8px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.envelope-names.stacked-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 4px 0 12px;
}

.stacked-names .name-line {
    font-family: var(--font-script);
    font-size: 3.6rem;
    background: var(--gold-silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.05;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.stacked-names .amp-line {
    font-family: var(--font-garamond);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--silver-light);
    line-height: 1;
    margin: -2px 0;
}

.envelope-names .amp {
    font-family: var(--font-garamond);
    font-size: 2.4rem;
    color: var(--silver-light);
}

.envelope-date {
    font-family: var(--font-garamond);
    font-size: 1.15rem;
    color: var(--text-gold-subtle);
    margin-bottom: 24px;
}

.envelope-guest {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(224, 194, 131, 0.35);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 24px;
}

.guest-to {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.guest-name {
    font-family: var(--font-cinzel);
    font-size: 1.25rem;
    color: var(--silver-light);
    font-weight: 600;
    margin-top: 2px;
}

.btn-open-envelope {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-silver-gradient);
    color: #070609;
    font-family: var(--font-cinzel);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 13px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(224, 194, 131, 0.35);
    transition: all 0.3s ease;
}

.btn-open-envelope:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 194, 131, 0.5);
}

/* ============================================
   PHYSICAL CARD MAIN SCREEN
   ============================================ */
.physical-card-screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
}

.physical-card-container {
    width: 100%;
    max-width: 880px;
    height: 100%;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.physical-card {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border: 1px solid var(--gold-primary);
    border-radius: 14px;
    padding: 22px 24px 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(224, 194, 131, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 4px;
}

.bismillah {
    font-family: var(--font-garamond);
    font-size: 1.5rem;
    color: var(--gold-primary);
    direction: rtl;
    line-height: 1.2;
    margin-bottom: 2px;
}

.card-sub-title {
    font-family: var(--font-cinzel);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--silver-primary);
}

/* Pages Layout */
.physical-pages {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    overflow: hidden;
    padding: 6px 0;
}

.physical-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(224, 194, 131, 0.2);
    border-radius: 10px;
    padding: 16px 20px;
    overflow: hidden;
}

.page-content {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    text-align: center;
}

/* Page 1 (Left Side: Mempelai) */
.salam-text {
    font-family: var(--font-cinzel);
    font-size: 0.75rem;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.invite-intro {
    font-family: var(--font-garamond);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.couple-compact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}

.couple-box {
    width: 100%;
}

.couple-name {
    font-family: var(--font-script);
    font-size: 1.9rem;
    background: var(--gold-silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
    margin-bottom: 2px;
    white-space: nowrap;
}

.couple-parents {
    font-family: var(--font-cinzel);
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.45;
    letter-spacing: 0.5px;
}

.couple-parents strong {
    font-family: var(--font-cinzel);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--silver-light);
    letter-spacing: 1px;
}

.couple-ampersand {
    font-family: var(--font-garamond);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gold-primary);
}

.verse-compact {
    border-top: 1px solid rgba(224, 194, 131, 0.25);
    padding-top: 8px;
}

.verse-arabic {
    font-family: var(--font-garamond);
    font-size: 1.05rem;
    color: var(--gold-light);
    direction: rtl;
    line-height: 1.3;
}

.verse-quote {
    font-family: var(--font-garamond);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-dim);
    line-height: 1.25;
    margin-top: 2px;
}

/* Page 2 (Right Side: Acara & Lokasi) */
.event-compact-card,
.honor-compact-box {
    background: rgba(224, 194, 131, 0.06);
    border: 1px solid rgba(224, 194, 131, 0.28);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 6px 0;
    width: 100%;
}

.event-badge {
    display: inline-block;
    background: var(--gold-silver-gradient);
    color: #070609;
    font-family: var(--font-cinzel);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 15px;
    margin-bottom: 6px;
}

.event-title {
    font-family: var(--font-cinzel);
    font-size: 1.05rem;
    color: var(--silver-light);
    font-weight: 700;
    margin-bottom: 3px;
}

.event-time,
.event-venue,
.event-address {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.event-address {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.btn-compact-maps {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(226, 232, 240, 0.12);
    border: 1px solid var(--silver-primary);
    color: var(--silver-light);
    font-family: var(--font-cinzel);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 6px;
    transition: all 0.2s ease;
}

.btn-compact-maps:hover {
    background: var(--silver-gradient);
    color: #070609;
    box-shadow: 0 4px 15px rgba(226, 232, 240, 0.3);
}

.honor-label {
    font-family: var(--font-cinzel);
    font-size: 0.72rem;
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.store-brand {
    font-family: var(--font-cinzel);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--silver-light);
    margin-bottom: 2px;
}

.store-sub {
    font-size: 0.65rem;
    color: var(--gold-primary);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.inayah-mini-logo {
    width: 48px;
    height: 48px;
    max-width: 100%;
    object-fit: contain;
    margin-top: 2px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.closing-compact {
    margin-top: 8px;
}

.closing-compact p,
.promo-text {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.8px;
    font-style: italic;
    opacity: 0.85;
}

.closing-names {
    font-family: var(--font-script);
    font-size: 2.2rem;
    background: var(--gold-silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-top: 2px;
}

/* Page Navigation Tabs (Mobile Viewport) */
.card-page-tabs {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
}

.tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(224, 194, 131, 0.3);
    color: var(--text-muted);
    font-family: var(--font-cinzel);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--gold-silver-gradient);
    color: #070609;
    font-weight: 700;
    border-color: var(--gold-primary);
    box-shadow: 0 4px 15px rgba(224, 194, 131, 0.35);
}

/* Floating Audio Control */
.music-toggle-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 990;
    width: 42px;
    height: 42px;
    background: rgba(14, 12, 18, 0.92);
    border: 1px solid var(--gold-primary);
    border-radius: 50%;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 10px rgba(224, 194, 131, 0.2);
}

.music-toggle-btn.playing .disc-icon {
    animation: spinDisc 3s linear infinite;
}

@keyframes spinDisc {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE (MOBILE VIEWPORT ADAPTATION)
   ============================================ */
@media (max-width: 768px) {
    .physical-pages {
        grid-template-columns: 1fr;
        position: relative;
    }

    .physical-page {
        display: none;
        height: 100%;
    }

    .physical-page.page-active {
        display: flex;
    }

    .card-page-tabs {
        display: flex;
    }

    .envelope-names {
        font-size: 2.8rem;
    }

    .stacked-names .name-line {
        font-size: 3.2rem;
    }

    .couple-name {
        font-size: clamp(1.8rem, 5.2vw, 1.8rem);
        line-height: 1.15;
        white-space: nowrap;
    }
}