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

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #ffa07a;
    --bg-gradient-1: #0f0c29;
    --bg-gradient-2: #302b63;
    --bg-gradient-3: #24243e;
    --text-light: #ffffff;
    --text-glow: #ffd700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

/* Floating hearts background */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: float-up 8s linear infinite;
    opacity: 0;
}

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

/* Main container */
.main-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Welcome section */
.welcome-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.2);
}

.glowing-text {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.date-container {
    margin: 40px 0;
}

.years-together {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4); }
    50% { box-shadow: 0 10px 60px rgba(255, 107, 157, 0.8); }
}

.years-together .number {
    display: block;
    font-size: 5rem;
    font-weight: bold;
    line-height: 1;
}

.years-together .label {
    display: block;
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

.start-button {
    position: relative;
    margin-top: 40px;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5);
}

.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: button-shine 3s linear infinite;
}

@keyframes button-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Section styles */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fade-in-down 0.8s ease;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Game section */
.game-section {
    min-height: 100vh;
    padding: 80px 20px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat span {
    font-weight: bold;
    color: var(--primary-color);
}

.reset-button {
    padding: 12px 30px;
    font-size: 1rem;
    background: rgba(255, 107, 157, 0.2);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.reset-button:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.memory-card {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    animation: match-pulse 0.6s ease;
}

@keyframes match-pulse {
    0%, 100% { transform: scale(1) rotateY(180deg); }
    50% { transform: scale(1.1) rotateY(180deg); }
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: rotateY(180deg);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 3rem;
}

/* Gallery section */
.gallery-section {
    min-height: 100vh;
    padding: 80px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    animation: fade-in-up 0.6s ease backwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    margin: 0;
    font-size: 1.1rem;
}

/* Message section */
.message-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 40px;
    max-width: 800px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.2);
    text-align: center;
}

.message-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.message-text p {
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.signature {
    font-size: 1.5rem !important;
    font-style: italic;
    margin-top: 40px !important;
    color: var(--accent-color) !important;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fade-in 0.3s ease;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 107, 157, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 3rem;
    padding: 20px 30px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.3rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
}

/* Navigation button */
.nav-button {
    display: block;
    margin: 50px auto 0;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5);
}

/* Utility classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fade-in 1s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-down {
    animation: fade-in-down 0.8s ease;
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.6s ease;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .glowing-text {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .years-together .number {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .game-board {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

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

    .message-text p {
        font-size: 1.1rem;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 15px 20px;
    }

    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
}