:root {
    --primary-color: #ff4d6d;
    --secondary-color: #c9184a;
    --bg-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-color: #590d22;
    --white: #ffffff;
    --font-heading: 'Pacifico', cursive;
    --font-body: 'Nunito', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    min-height: 100vh;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
    color: var(--text-color);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.valentine-page,
.gallery-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-page {
    align-items: flex-start;
    padding-top: 40px;
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    /* Wider for gallery */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    text-align: center;
    position: relative;
    z-index: 10;
}

.question-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

/* Buttons */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    min-height: 80px;
    /* Space for movement */
    position: relative;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.yes-btn {
    background: linear-gradient(45deg, #ff4d6d, #ff758c);
    color: white;
}

.yes-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 20px rgba(255, 77, 109, 0.4);
}

.yes-btn:active {
    transform: translateY(-1px);
}

.no-btn {
    background: white;
    color: var(--secondary-color);
}

/* Typing Effect Cursor */
.typing-text {
    border-right: 3px solid var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    width: 0;
    animation: typing 3.5s steps(40, end) forwards, blink-caret .75s step-end infinite;
    max-width: 100%;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--secondary-color);
    }
}

/* Gallery Styles */
.gallery-title {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: 3rem;
    margin-bottom: 30px;
}

.section-title {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.8rem;
    margin: 40px 0 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 10px;
    display: inline-block;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.photo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.photo-gallery img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .question-content h1 {
        font-size: 2.2rem;
        white-space: normal;
        /* Disable typing effect wrap constraint on mobile */
        border-right: none;
        animation: none;
        width: auto;
    }

    .buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .glass-container {
        padding: 20px;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Mouse Trail Images */
.trail-image {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    /* Higher than everything */
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    transform-origin: center center;
}