* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #B6D7FF;
    --light-blue: #C8E3FF;
    --pastel-purple: #D4C5F9;
    --pastel-sky: #A8DADC;
    --cream: #F7F9FB;
    --soft-white: #FAFAFA;
    --text-dark: #4A4A4A;
    --accent-blue: #6B9BD2;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-blue) 50%, var(--pastel-sky) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--pastel-purple) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.heart-loader svg {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart-loader svg path {
    fill: var(--accent-blue);
    filter: drop-shadow(0 0 10px rgba(107, 155, 210, 0.5));
}

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

.hero {
    text-align: center;
    padding: 80px 20px;
    position: relative;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 60px;
    overflow: hidden;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.heart {
    position: absolute;
    font-size: 2rem;
    animation: float 15s infinite ease-in-out;
    opacity: 0.3;
}

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

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(-5deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 1.5s ease-out;
}

.subtitle {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 15px;
    animation: fadeInUp 1.5s ease-out 0.3s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.date {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: 400;
    opacity: 0.9;
    animation: fadeInUp 1.5s ease-out 0.6s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.message-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 60px 20px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 30px;
    text-align: center;
}

.message-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: var(--text-dark);
}

.message-content .closing {
    text-align: center;
    font-weight: 500;
    color: var(--accent-blue);
    font-size: 1.2rem;
    margin-top: 30px;
}

.memories-section {
    padding: 60px 0;
}

.memories-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 20px;
}

.memories-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 50px;
    opacity: 0.8;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.memory-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.memory-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(107, 155, 210, 0.3);
}

.memory-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
}

.memory-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.memory-card:hover .memory-thumbnail img {
    transform: scale(1.1);
}

.memory-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: background 0.3s ease;
}

.memory-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.click-hint {
    font-size: 0.9rem;
    opacity: 0.8;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-blue) 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-blue);
}

.modal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 20px;
    text-align: center;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.modal-images img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.modal-images img.fullsize {
    grid-column: 1 / -1;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.modal-images.single-image {
    grid-template-columns: 1fr;
}

.modal-images.single-image img {
    max-height: 500px;
}

.modal-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin-top: 80px;
}

footer p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.footer-date {
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .message-section {
        padding: 40px 20px;
    }
    
    .memory-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-images {
        grid-template-columns: 1fr;
    }
}