:root {
    --bg-color: #ffe6ea;
    --text-color: #4a4a4a;
    --accent-color: #ff4d6d;
    --card-bg: #fff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ffdde1 0%, #ee9ca7 100%);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
}

/* Hearts Background */
#hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -10vh;
    transform: translateY(0);
    animation: floatUp linear forwards;
    opacity: 0;
    color: var(--accent-color);
    cursor: crosshair;
    pointer-events: auto;
    user-select: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Header */
header {
    text-align: center;
    padding: 50px 20px 20px;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 4.5rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

p {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 25px;
}

/* Music Button */
.music-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid #fff;
    color: var(--accent-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
}

.music-btn:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.music-btn i {
    margin-right: 8px;
}

/* Gallery Grid */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Polaroid Card */
.polaroid {
    background: var(--card-bg);
    padding: 15px 15px 45px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    width: 300px;
    border-radius: 4px;
    position: relative;
}

.polaroid:nth-child(1) { transform: rotate(-4deg); }
.polaroid:nth-child(2) { transform: rotate(3deg); }
.polaroid:nth-child(3) { transform: rotate(-2deg); }
.polaroid:nth-child(4) { transform: rotate(5deg); }
.polaroid:nth-child(5) { transform: rotate(-3deg); }

.polaroid:hover {
    transform: scale(1.12) rotate(0deg) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 10;
}

.polaroid img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border: 1px solid #eaeaea;
    border-radius: 2px;
}

.caption {
    font-family: 'Dancing Script', cursive;
    text-align: center;
    font-size: 1.8rem;
    margin-top: 15px;
    color: var(--text-color);
    position: absolute;
    bottom: 10px;
    width: calc(100% - 30px);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

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

/* Responsive Styles */
@media (max-width: 768px) {
    h1 { font-size: 3.5rem; }
    .polaroid { width: 100%; max-width: 340px; }
    .gallery { gap: 30px; }
}

/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #ffdde1 0%, #ee9ca7 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease, visibility 1s ease, transform 1s ease;
}

.intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(1.05);
}

.intro-content {
    text-align: center;
    color: var(--accent-color);
}

.intro-title {
    font-family: 'Dancing Script', cursive;
    font-size: 5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.intro-text {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.heart-btn {
    font-size: 6rem;
    cursor: pointer;
    animation: pulseHeart 1.5s infinite;
    display: inline-block;
    transition: transform 0.3s ease;
    user-select: none;
    text-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.heart-btn:hover {
    transform: scale(1.1) !important;
    animation: none;
}

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

@media (max-width: 768px) {
    .intro-title { font-size: 3.5rem; }
    .heart-btn { font-size: 5rem; }
}

/* Counter */
.counter {
    margin: 20px auto 30px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border: 2px solid #fff;
    border-radius: 15px;
    padding: 15px 25px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    max-width: 100%;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.time-block span {
    font-size: 2.5rem;
    font-family: 'Dancing Script', cursive;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.counter-label {
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.6);
    padding-top: 10px;
    font-weight: 600;
}

/* Score Board */
.score-board {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 50;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.score-board.bump {
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .counter { gap: 10px; padding: 10px; }
    .time-block span { font-size: 1.8rem; }
    .score-board { top: auto; bottom: 20px; left: 50%; transform: translateX(-50%); }
    .score-board.bump { transform: translateX(-50%) scale(1.15); }
}
