:root {
    --soft-pink: #fce4ec;
    --deep-pink: #f06292;
    --card-shadow: rgba(0, 0, 0, 0.15);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-image: linear-gradient(rgba(252, 228, 236, 0.7), rgba(252, 228, 236, 0.7)), url('images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Quicksand', sans-serif;
    transition: cursor 0.3s ease;
}

.hide-cursor {
    cursor: none !important;
}

.main-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 10;
}

/* LEFT PANEL */
.left-panel {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 5vw 0 8vw; 
    z-index: 1000; 
}

/* Increased font-size and adjusted margins for better visibility */
.sub-event {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.8vw; /* Increased from 1.4vw to 2vw */
    color: #5d4037;
    letter-spacing: 3px; /* Increased slightly to maintain elegance */
    text-transform: uppercase;
    margin-bottom: 30px; /* Adjusted for the larger font size */
    font-weight: 500;
    opacity: 0.9;
}

.main-name {
    position: relative; 
    display: inline-block;
    font-family: 'Dancing Script', cursive;
    font-size: 7.6vw;
    color: var(--deep-pink);
    margin: 0;
    line-height: 1.1;
    text-shadow: 3px 3px 10px rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.text-sparkle {
    position: absolute;
    pointer-events: none;
    /* Soft champagne gold color */
    color: #fff9c4; 
    font-size: 0.8vw;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Layered gold glow: white center for brightness, gold outer for warmth */
    text-shadow: 0 0 4px #ffffff, 0 0 8px #ffca28, 0 0 12px rgba(255, 202, 40, 0.4);
    animation: gentle-twinkle 3s ease-in-out forwards;
    z-index: 11;
}

@keyframes gentle-twinkle {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    50% { transform: scale(1.1) rotate(45deg); opacity: 0.9; }
    100% { transform: scale(0.3) rotate(90deg); opacity: 0; }
}

/* 3. Reduced the divider margin slightly to keep the overall look tight */
.divider {
    width: 120px;
    height: 5px;
    background: var(--deep-pink);
    margin: 15px 0 25px 0; 
    border-radius: 50px;
}

#dynamic-text {
    font-size: 2.6vw;
    color: #5d4037;
    font-weight: 500;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    max-width: 80%;
}

/* RIGHT PANEL */
.right-panel {
    flex: 1;
    display: flex;
    justify-content: center; 
    align-items: center;
    position: relative;
}

#card-container {
    width: 32vw; 
    height: 42vw; 
    position: relative;
    perspective: 2000px;
    margin-top: -20px; 
}

.photo-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    padding: 20px 20px 60px 20px;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    
    /* ENTRY ANIMATION */
    transform: translate3d(200px, -200px, 300px) rotate(20deg) scale(1.1);
    
    will-change: transform, opacity;
    backface-visibility: hidden;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
}

.photo-card.active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(var(--rotation));
}

/* FADE OUT STATE */
.photo-card.fade-out {
    opacity: 0 !important;
    transform: translate3d(0, 0, 0) scale(0.95) rotate(var(--rotation));
}

.photo-card img, 
.photo-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #fff;
    border-radius: 2px;
}

/* Fullscreen Controls */
.fullscreen-trigger {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fullscreen-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid var(--deep-pink);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.fullscreen-trigger:hover #fullscreen-btn {
    opacity: 1;
    transform: scale(1);
}

#fullscreen-btn:hover { background: var(--deep-pink); }
#fullscreen-btn:hover svg { fill: white; }
#fullscreen-btn svg { width: 24px; height: 24px; fill: var(--deep-pink); }

#particleCanvas { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 0; 
    pointer-events: none; 
}

/* --- Left-Aligned Device Blocker --- */
#device-blocker {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--soft-pink);
    z-index: 99999;
    justify-content: center; /* Centers the content block horizontally */
    align-items: center;     /* Centers the content block vertically */
    padding: 40px;
    box-sizing: border-box;
}

.blocker-content {
    text-align: left;        /* Aligns text to the left */
    max-width: 500px;
    width: 100%;
}

.blocker-content span {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

.blocker-content h1 {
    color: var(--deep-pink);
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    margin: 0 0 10px 0;
}

.blocker-content p {
    color: #5d4037;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
}

/* Trigger for Mobile/Tablets */
@media only screen and (max-width: 1023px) {
    #device-blocker {
        display: flex;
    }
    .main-layout, #particleCanvas, .decor {
        display: none !important;
    }
}

#thank-you-screen {
    display: none; /* Hidden until triggered */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 245, 248, 0.9); /* Soft fade over the background */
    z-index: 10000;
    justify-content: center;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 2s ease;
}

.thank-you-content h1 {
    font-size: 8vw !important;
}

.thank-you-content p {
    font-family: 'Quicksand', sans-serif;
    font-size: 2vw;
    color: #5d4037;
    margin-top: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Blackout Mode */
body.blackout .main-layout, 
body.blackout #particleCanvas, 
body.blackout .decor {
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* Ensure the body stays pink even when everything else is hidden */
body {
    background-color: var(--soft-pink);
    transition: background-color 1.5s ease;
}

body.blackout {
    background-color: #000;
}

#hud-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--soft-pink);
    border-radius: 50px;
    color: var(--deep-pink);
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#hud-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}

#blackout-header {
    position: fixed;
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    /* Soft Gray for the event title */
    color: #757575; 
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1vw;
    letter-spacing: 2px;
    z-index: 11000;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    text-transform: uppercase;
}

#blackout-header span {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8vw;
    display: block;
    margin-top: 5px;
    /* Deep Pink for her name */
    color: var(--deep-pink); 
    text-transform: none; /* Keeps the cursive natural */
    letter-spacing: 0;
    text-shadow: 0 0 10px rgba(240, 98, 146, 0.3);
}

/* Blackout State */
body.blackout {
    background-color: #000 !important;
}

body.blackout #blackout-header {
    opacity: 1;
}

/* Hide everything except particles and the tiny header */
body.blackout .main-layout, 
body.blackout .decor,
body.blackout #card-container,
body.blackout #dynamic-text,
body.blackout #fullscreen-btn {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

/* Ensure particles remain visible in the background */
#particleCanvas {
    z-index: 1;
}
