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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    background: #f8c8dc; 
    color: #2c2c2c;
    line-height: 1.6;
}

.birthday-finished-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8c8dc 0%, #ffd1dc 50%, #f8c8dc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    animation: gentleFloat 3s ease-in-out infinite;
}

.birthday-finished-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.birthday-finished-message {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-width: 500px;
    margin: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.birthday-finished-message h2 {
    font-size: 2.8rem;
    color: #000;
    margin-bottom: 25px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: heartbeat 2s ease-in-out infinite;
}

.birthday-finished-message p {
    font-size: 1.3rem;
    color: #2c2c2c;
    margin-bottom: 18px;
    line-height: 1.6;
    font-weight: 500;
}

.heart-icon {
    font-size: 4.5rem;
    margin-top: 25px;
    animation: bounce 2s infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.desktop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f8c8dc; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.desktop-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.desktop-message {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 20px;
}

.desktop-message h2 {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.desktop-message p {
    font-size: 1.2rem;
    color: #2c2c2c;
    margin-bottom: 15px;
    line-height: 1.6;
}

.mobile-icon {
    font-size: 4rem;
    margin-top: 20px;
    animation: bounce 2s infinite;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f8c8dc;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-text {
    font-size: 2rem;
    font-weight: 300;
    color: #000; 
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1s ease;
    will-change: opacity;
}

.background-image.fade-out {
    opacity: 0;
}

.music-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #f8c8dc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.music-player.hidden {
    transform: translateY(-100%);
}

.music-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.music-btn:hover {
    background: rgba(0,0,0,0.1);
    transform: scale(1.05);
}

.music-btn:active {
    transform: scale(0.95);
}

.track-info {
    font-size: 0.9rem;
    color: #000;
    font-weight: 500;
    margin-left: 20px;
}

.main-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
    top: 60px;
    height: calc(100vh - 60px);
}

.main-container.hidden {
    display: none;
}

.snap-section {
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.welcome-section {
    text-align: center;
    background: rgba(248, 200, 220, 0.8);
    backdrop-filter: blur(10px);
}

.welcome-content {
    max-width: 600px;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.welcome-title {
    font-size: 3rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.scroll-hint {
    font-size: 1.2rem;
    color: #2c2c2c;
    font-weight: 300;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.message-section {
    align-items: flex-end;
    padding-bottom: 0;
}

.message-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(248, 200, 220, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: none;
    padding: 40px 20px 0px 20px;
    min-height: 50vh;
    overflow: visible;
    
    mask-image: linear-gradient(to top, 
        rgba(0,0,0,1) 0%,          
        rgba(0,0,0,1) 15%,         
        rgba(0,0,0,0.95) 85%,       
        rgba(0,0,0,0.8) 92%,        
        rgba(0,0,0,0.3) 97%,        
        rgba(0,0,0,0) 100%          
    );
    -webkit-mask-image: linear-gradient(to top, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,1) 15%, 
        rgba(0,0,0,0.95) 85%, 
        rgba(0,0,0,0.8) 92%, 
        rgba(0,0,0,0.3) 97%, 
        rgba(0,0,0,0) 100%
    );
}

.message-content {
    max-width: 800px;
    margin: 0 auto;
    color: #f5f5dc; 
    font-size: 1.1rem;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: fadeInUp 0.8s ease;
    padding-bottom: 40px;   
}

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

.message-content h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

.message-content p {
    margin-bottom: 15px;
}

.message-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 8px;
    list-style-type: none;
    position: relative;
}

.message-content li:before {
    content: "•";
    color: #fff;
    font-size: 1.2rem;
    position: absolute;
    left: -15px;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1001;
    pointer-events: none;
}

@media (max-width: 768px) {
    .desktop-overlay {
        display: none; 
    }
    
    .welcome-title {
        font-size: 2.2rem;
    }
    
    .scroll-hint {
        font-size: 1rem;
    }
    
    .music-player {
        height: 50px;
        padding: 0 15px;
        gap: 15px;
    }
    
    .music-btn {
        font-size: 1.2rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .track-info {
        font-size: 0.8rem;
        margin-left: 10px;
    }
    
    .main-container {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    .message-content {
        font-size: 1rem;
    }
    
    .message-content h2 {
        font-size: 1.5rem;
    }
    
    .message-overlay {
        padding: 30px 15px 0px 15px;
        min-height: 45vh;
    }
    
    .message-content {
        padding-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .welcome-content {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .music-player {
        gap: 10px;
    }
    
    .track-info {
        display: none;
    }
    
    .message-content {
        padding-bottom: 25px;
    }
}

.background-image,
.message-overlay,
.music-player {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.main-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

button {
    min-width: 44px;
    min-height: 44px;
}

.music-player,
.welcome-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}