@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Great+Vibes&display=swap');

:root {
    --primary-color: #ff4d6d;
    --secondary-color: #800f2f;
    --accent-color: #ffb3c1;
    --bg-gradient: linear-gradient(135deg, #1a0a1a 0%, #3e1a3e 50%, #1a0a1a 100%);
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-main: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a0a1a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Shared Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Opening Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: url('assets/images/cover_v2.png?v=2') center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Smooth dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-content img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(255, 77, 109, 0.5);
    object-fit: cover;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 77, 109, 0.8);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
    }
}

.hero-content h1 {
    font-size: 3rem;
    font-family: var(--font-serif);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-open {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.4);
}

.btn-open:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Letter Section */
.letter-section {
    min-height: 100vh;
    padding: 100px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 60px;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.letter-title {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-align: center;
}

.letter-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 2rem;
    min-height: 150px;
}

.signature {
    font-family: var(--font-script);
    font-size: 2.5rem;
    text-align: right;
    color: var(--primary-color);
}

/* Counter Section */
.counter-section {
    padding: 80px 20px;
    text-align: center;
}

.counter-section h2 {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    margin-bottom: 3rem;
}

.timer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.timer-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.timer-value {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
}

.timer-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 20px;
}

.gallery-section h2 {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 3px solid var(--primary-color);
}

.modal-message {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--accent-color);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

/* Final Message Section */
.final-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.final-text {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    max-width: 800px;
    margin-bottom: 3rem;
    color: var(--accent-color);
}

.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: floatUp 5s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

/* Audio Control */
.audio-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.audio-control:hover {
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .letter-title {
        font-size: 2.5rem;
    }

    .letter-container {
        padding: 30px;
    }

    .letter-text {
        font-size: 1.1rem;
    }

    .timer-value {
        font-size: 2rem;
    }

    .final-text {
        font-size: 1.8rem;
    }
}