/* Romantic Rose & Botanical Theme (Botanical Olive) */
:root {
    --bg-color: #faf5f5;
    --card-bg: #ffffff;
    --primary-color: #5a3a40; /* Soft Velvet Wine */
    --accent-rose: #b76e79;   /* Rose Gold */
    --accent-light: #f7e6e8;
    --rose-dark: #8c4a54;
    --text-color: #4a383b;
    --text-muted: #806c70;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, sans-serif;
    --shadow-soft: 0 10px 30px rgba(183, 110, 121, 0.1);
    --shadow-card: 0 15px 35px rgba(90, 58, 64, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: radial-gradient(#e0c3c8 0.6px, transparent 0.6px);
    background-size: 24px 24px;
}

#petalCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Floating Audio Control */
.music-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--accent-rose);
    box-shadow: 0 4px 15px rgba(90, 58, 64, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.disc-icon.playing {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ENVELOPE OVERLAY */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(90, 58, 64, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.envelope-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-wrapper {
    text-align: center;
    perspective: 1200px;
    max-width: clamp(340px, 90vw, 560px);
    width: 90vw;
    margin: 0 auto;
}

.envelope {
    width: 100%;
    min-height: clamp(280px, 42vh, 350px);
    height: auto;
    background: linear-gradient(145deg, #ffffff 0%, #fdfaf5 50%, #f7f2e8 100%);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.45), 0 0 0 1px rgba(212, 175, 55, 0.3);
    border: 1.5px solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.envelope-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #ffffff 0%, #f7e8ea 100%);
    padding: 15px;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: #ebd2d5;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 0.6s ease;
    z-index: 2;
}

.wax-seal {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(140, 74, 84, 0.4);
    cursor: pointer;
    z-index: 3;
    animation: pulseSeal 2s infinite ease-in-out;
    background: #fff;
    padding: 2px;
    border: 2px solid var(--accent-rose);
}

.seal-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes pulseSeal {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.envelope-text {
    margin-top: 18px;
    z-index: 3;
}

.invite-to {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.invite-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.open-btn {
    margin-top: 22px;
    background: linear-gradient(135deg, var(--accent-rose) 0%, var(--rose-dark) 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(183, 110, 121, 0.4);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.envelope.opening .wax-seal {
    transform: scale(1.4);
    opacity: 0;
}

/* MAIN CONTAINER */
.invitation-container {
    max-width: 640px;
    margin: 20px auto;
    padding: 35px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(183, 110, 121, 0.25);
    position: relative;
    z-index: 2;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.invitation-container.hidden {
    opacity: 0;
    transform: translateY(30px);
}

.header-section {
    margin-bottom: 30px;
}

.luxury-seal-wrapper {
    display: inline-block;
    margin-bottom: 12px;
    position: relative;
}

.header-seal-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border: 3px solid var(--accent-rose);
}

.subtitle-tag {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--accent-rose);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.couple-names {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.15;
}

.divider-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.divider-line::before,
.divider-line::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--accent-rose), transparent);
}

.heart-icon {
    color: var(--accent-rose);
    font-size: 0.8rem;
    margin: 0 10px;
}

.main-quote {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-color);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* CARD BOX */
.card-box {
    background: #fcf7f8;
    border: 1px solid rgba(183, 110, 121, 0.2);
    border-radius: 16px;
    padding: 24px 18px;
    margin-bottom: 30px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 18px;
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.family-side {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-rose);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.parents-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 600;
}

.parents-name small {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
}

.family-surname {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-rose);
    letter-spacing: 1px;
    margin-top: 2px;
}

.family-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--accent-rose), transparent);
}

/* VENUE IMAGE */
.venue-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(183, 110, 121, 0.3);
}

.venue-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.venue-img:hover {
    transform: scale(1.05);
}

.venue-img-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(90, 58, 64, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* EVENTS SECTION */
.section-intro {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.event-card {
    background: #ffffff;
    border: 1px solid rgba(183, 110, 121, 0.2);
    border-radius: 16px;
    padding: 24px 20px;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.event-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent-rose);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.badge-rose { background: var(--rose-dark); }

.event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px stroke rgba(0,0,0,0.05);
}

.event-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-rose);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.event-type {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-color);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.detail-row i {
    color: var(--accent-rose);
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.date-highlight {
    font-size: 1.05rem;
    color: var(--primary-color);
    display: block;
}

.address-text {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 2px;
}

/* COUNTDOWN */
.countdown-wrapper {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    margin-bottom: 20px;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rose-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.time-block span {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.time-block label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* BUTTONS */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    width: 100%;
    min-height: 44px;
}

.btn-primary {
    background: var(--accent-rose);
    color: #ffffff;
}

.btn-secondary {
    background: #4a383b;
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent-rose);
    color: var(--accent-rose);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.hidden { display: none; }

.lightbox img {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 12px;
    border: 2px solid var(--accent-rose);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
}

/* FOOTER */
.footer-section {
    margin-top: 30px;
    border-top: 1px stroke #eee;
    padding-top: 25px;
}

.share-box {
    background: var(--accent-light);
    border: 1px dashed var(--accent-rose);
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 25px;
}

.share-box h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.share-box p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-share {
    padding: 12px 20px;
    border-radius: 30px;
}

.btn-wa-share {
    background: #25D366;
    color: #fff;
}

.btn-copy {
    background: var(--accent-rose);
    color: #fff;
}

.brand-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.platform-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent-rose);
    text-decoration: none;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-color);
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (min-width: 601px) {
    .invitation-container {
        margin: 40px auto;
        padding: 45px 35px;
    }

    .card-actions {
        flex-direction: row;
    }

    .card-actions .btn {
        flex: 1;
    }

    .share-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .share-buttons .btn {
        width: auto;
    }
}
