/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background-color: #DB5A65;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Falling Background Images */
#falling-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.falling-image {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: falling linear infinite;
    opacity: 0.8;
}

@keyframes falling {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Cursor Trail */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.sparkle-trail {
    position: absolute;
    font-size: 20px;
    animation: sparkle-fade 1s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkle-fade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(180deg);
    }
}

/* Floating Element */
#floating-element {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 30px;
    animation: float 3s ease-in-out infinite;
    z-index: 5;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Main Content */
main {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Title Styles */
.main-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #fff;
    text-shadow: 
        3px 3px 0 #FF69B4,
        6px 6px 0 #FFB6C1,
        9px 9px 0 #FFC0CB;
    margin-bottom: 40px;
    animation: title-glow 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

@keyframes title-glow {
    0% {
        text-shadow: 
            3px 3px 0 #FF69B4,
            6px 6px 0 #FFB6C1,
            9px 9px 0 #FFC0CB,
            0 0 20px rgba(255, 105, 180, 0.5);
    }
    100% {
        text-shadow: 
            3px 3px 0 #FF69B4,
            6px 6px 0 #FFB6C1,
            9px 9px 0 #FFC0CB,
            0 0 30px rgba(255, 105, 180, 0.8),
            0 0 40px rgba(255, 182, 193, 0.6);
    }
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

/* Retro Button Styles */
.retro-button {
    position: relative;
    padding: 15px 30px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, #FF69B4, #FFB6C1, #FFC0CB);
    border: 3px solid #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 0 #FF1493,
        0 15px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    overflow: hidden;
    min-width: 200px;
}

.retro-button:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 13px 0 #FF1493,
        0 20px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #FF1493, #FF69B4, #FFB6C1);
}

.retro-button:active {
    transform: translateY(3px);
    box-shadow: 
        0 5px 0 #FF1493,
        0 10px 15px rgba(0, 0, 0, 0.3);
}

.retro-button .sparkle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.retro-button:hover .sparkle {
    opacity: 1;
    animation: sparkle-bounce 0.6s ease-in-out;
}

@keyframes sparkle-bounce {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.3);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border: 4px solid #FF69B4;
    border-radius: 20px;
    padding: 0;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    position: relative;
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #FF69B4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #FF1493;
    transform: scale(1.1);
}

.modal h2 {
    font-family: 'Luckiest Guy', cursive;
    color: #FF69B4;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
}

.modal-body {
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
}

.modal-body li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Passcode Input Styles */
.passcode-input-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.passcode-input {
    width: 200px;
    padding: 15px;
    font-size: 2rem;
    text-align: center;
    border: 3px solid #FFB6C1;
    border-radius: 15px;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    letter-spacing: 10px;
    transition: all 0.3s ease;
}

.passcode-input:focus {
    outline: none;
    border-color: #FF69B4;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
    transform: scale(1.05);
}

.passcode-message {
    font-weight: bold;
    font-size: 1.1rem;
    min-height: 30px;
}

.passcode-message.success {
    color: #4CAF50;
}

.passcode-message.error {
    color: #f44336;
}

/* Gallery Single Image */
.gallery-single {
    text-align: center;
    margin: 20px 0;
}

.gallery-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    border: 3px solid #FFB6C1;
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.4);
}

.gallery-caption {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* Gallery Grid - keeping for potential future use */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    text-align: center;
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border: 3px solid #FFB6C1;
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
}

.placeholder-image {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.gallery-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Guestbook Form */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #FF69B4;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 3px solid #FFB6C1;
    border-radius: 10px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF69B4;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

.guestbook-entries {
    margin-top: 30px;
    text-align: left;
}

.guestbook-entry {
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border: 2px solid #FFB6C1;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .button-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .retro-button {
        min-width: 180px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal {
        max-width: 600px;
    }
    
    .passcode-input-container {
        flex-direction: row;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px;
    }
    
    .main-title {
        font-size: 3rem;
        margin-bottom: 30px;
    }
    
    .retro-button {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 160px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .passcode-input {
        width: 150px;
        font-size: 1.5rem;
        letter-spacing: 5px;
    }
}

/* Special Click Me Button Animation */
#click-me-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347);
    animation: rainbow-pulse 2s ease-in-out infinite;
}

@keyframes rainbow-pulse {
    0%, 100% {
        background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347);
    }
    50% {
        background: linear-gradient(45deg, #FF6347, #FFD700, #FFA500);
    }
}

#click-me-btn:hover {
    animation: rainbow-pulse 0.5s ease-in-out infinite;
    transform: scale(1.1) translateY(-5px);
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    animation: fadeInUp 1s ease-out;
}
