/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: 'Playfair Display', serif;
    overflow: hidden;
    height: 100vh;
    background: linear-gradient(135deg, #f4f0e8 0%, #e6dace 40%, #d1c0a0 80%, #c4b088 100%);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-attachment: fixed;
    background-size: 100% 100%;
}

/* Library-themed background */
.library-background {
    position: relative;
    width: 100%;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 82, 45, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #f4f0e8 0%, #e6dace 40%, #d1c0a0 80%, #c4b088 100%);
    
    /* Add a subtle paper texture */
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-opacity='0.04'%3E%3Cpolygon fill='%23000' points='0 40 40 0 40 40'/%3E%3C/g%3E%3C/svg%3E");
    
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
}

/* Floating book elements */
.floating-book {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

.book1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.book2 {
    top: 20%;
    right: 20%;
    animation-delay: 2s;
}

.book3 {
    bottom: 25%;
    left: 10%;
    animation-delay: 4s;
}

.book4 {
    bottom: 15%;
    right: 15%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Main container */
.main-container {
    text-align: center;
    z-index: 10;
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 69, 19, 0.1);
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    font-weight: 700;
    color: #8b4513;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #a0522d;
    margin-bottom: 2.5rem;
    font-style: italic;
}

/* Buttons container */
.buttons-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* Love buttons base styles */
.love-button {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Escaping button (I LOVE YOU) */
.escaping {
    background: linear-gradient(45deg, #ff6b9d, #ff8fab);
    color: white;
    border: 2px solid #ff6b9d;
    position: absolute;
    transition: all 0.2s ease;
    z-index: 100;
}

.escaping:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

/* Static button (I LOVE YOU MORE) */
.static {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: 2px solid #4ecdc4;
    position: relative;
}

.static:hover {
    background: linear-gradient(45deg, #3db5ad, #3a8f7a);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

.static:active {
    transform: scale(1.05);
}

/* Floating hearts */
.floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: heartFloat 8s linear infinite;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.heart:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
}

.heart:nth-child(3) {
    left: 70%;
    animation-delay: 4s;
}

.heart:nth-child(4) {
    left: 90%;
    animation-delay: 6s;
}

@keyframes heartFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #fff 0%, #f8f6f0 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid #8b4513;
    animation: modalAppear 0.5s ease-out;
}

@keyframes modalAppear {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1.1rem;
    color: #a0522d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.museum-quote {
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-hearts {
    font-size: 1.5rem;
    margin: 1.5rem 0;
    animation: pulse 2s ease-in-out infinite;
}

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

.close-button {
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #8b4513, #a0522d);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.close-button:hover {
    background: linear-gradient(45deg, #a0522d, #8b4513);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

/* Photo Gallery Section */
.photo-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-photo {
    max-width: 180px;
    max-height: 180px;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(139, 69, 19, 0.18), 0 0 0 4px #fff;
    object-fit: cover;
    border: 2px solid #ff6b9d;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
}

.gallery-photo:hover {
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.25);
    border-color: #ff8fab;
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2.2rem;
    }
    
    .main-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .love-button {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        min-width: 150px;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 2rem;
    }
    
    .floating-book {
        font-size: 1.5rem;
    }
}