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

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 20%, #ff9a9e 40%, #f093fb 60%, #f5576c 80%, #d4af37 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 223, 0, 0.5) 50%, transparent 100%);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.particle:nth-child(odd) {
    animation-duration: 12s;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 185, 15, 0.5) 50%, transparent 100%);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.particle:nth-child(3n) {
    animation-duration: 15s;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.8) 0%, rgba(255, 192, 203, 0.4) 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.3);
}

.particle:nth-child(4n) {
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(255, 223, 186, 1) 0%, rgba(255, 235, 205, 0.6) 50%, transparent 100%);
    animation-duration: 10s;
    box-shadow: 0 0 4px rgba(255, 223, 186, 0.5);
}

.particle:nth-child(5n) {
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.9) 0%, rgba(255, 215, 0, 0.4) 50%, transparent 100%);
    animation: twinkle 6s infinite ease-in-out;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 1) 0%, rgba(255, 215, 0, 0) 100%);
    border-radius: 50%;
    animation: shoot 4s infinite linear;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.8) 50%, rgba(255, 215, 0, 1) 100%);
}

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

.gallery-container {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(255, 248, 220, 0.96), rgba(255, 239, 213, 0.94));
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(20px);
    padding: 40px 40px 120px 40px;
    position: relative;
    border: 2px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
}

.photo-display {
    flex: 1;
    display: flex;
    gap: 40px;
    align-items: center;
    position: relative;
}

.photo-wrapper {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}

.photo-wrapper::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, 
        rgba(212, 175, 55, 0.1) 0%, 
        rgba(255, 215, 0, 0.05) 25%, 
        rgba(255, 228, 196, 0.1) 50%, 
        rgba(255, 215, 0, 0.05) 75%, 
        rgba(212, 175, 55, 0.1) 100%);
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    animation: slideIn 1s ease-out 0.2s forwards;
}

#current-photo {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(139, 115, 85, 0.3), 0 0 0 3px rgba(212, 175, 55, 0.2);
    opacity: 1;
    transform: translateY(0);
    filter: sepia(0.1) contrast(1.02) brightness(1.02);
    position: relative;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#current-photo.fade-out {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
}

#current-photo.slide-in {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: smoothImageEnter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes smoothImageEnter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#current-photo.special-moment {
    box-shadow: 
        0 25px 50px rgba(212, 175, 55, 0.4), 
        0 0 0 4px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(255, 215, 0, 0.3);
    filter: sepia(0.15) contrast(1.05) brightness(1.05) saturate(1.1);
    animation: specialGlow 2s ease-in-out;
}

@keyframes specialGlow {
    0%, 100% {
        filter: sepia(0.15) contrast(1.05) brightness(1.05) saturate(1.1);
    }
    50% {
        filter: sepia(0.2) contrast(1.08) brightness(1.08) saturate(1.15);
    }
}


.photo-info {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.start-page-content {
    text-align: center;
    font-size: 2.2em;
    font-weight: 400;
    color: #8B4513;
    line-height: 1.8;
    text-shadow: 0 3px 6px rgba(139, 69, 19, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    margin: 0;
    font-family: 'STKaiti', 'KaiTi', 'PingFang SC', serif;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.8s ease-out 0.3s forwards;
}

.photo-date {
    font-size: 32px;
    font-weight: 500;
    color: #8B4513;
    margin-bottom: 25px;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.8s ease-out 0.3s forwards;
    text-shadow: 0 3px 6px rgba(139, 69, 19, 0.2);
    font-family: 'STKaiti', 'KaiTi', 'PingFang SC', serif;
    position: relative;
}

.photo-description {
    font-size: 19px;
    line-height: 2;
    color: #6B4423;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.8s ease-out 0.5s forwards;
    text-shadow: 0 2px 4px rgba(107, 68, 35, 0.15);
    letter-spacing: 1px;
}


.navigation {
    position: absolute;
    bottom: 15px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.nav-btn {
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 300;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(253, 121, 168, 0.3);
    min-width: 60px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(253, 121, 168, 0.4);
    background: linear-gradient(135deg, #fd79a8 0%, #ff7675 100%);
}

.nav-btn:active {
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-counter {
    font-size: 18px;
    color: #8B4513;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(139, 69, 19, 0.1);
}

.music-control {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
}

.music-button {
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: spin 8s linear infinite;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.music-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.music-button.paused {
    animation: none;
    background: linear-gradient(135deg, #a8a8a8 0%, #d0d0d0 100%);
    box-shadow: 0 8px 20px rgba(168, 168, 168, 0.3);
}

.music-button.playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: spin 8s linear infinite;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.music-icon {
    font-size: 26px;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.birthday-footer {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.birthday-message {
    font-size: 16px;
    color: rgba(139, 69, 19, 0.7);
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(139, 69, 19, 0.1);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 20%, #ff9a9e 40%, #f093fb 60%, #f5576c 80%, #d4af37 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.loading-text {
    font-size: 26px;
    color: #8B4513;
    font-weight: 400;
    letter-spacing: 3px;
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(139, 69, 19, 0.2);
}

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

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    }
}

@keyframes shoot {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        width: 95%;
        height: 90vh;
        padding: 20px 20px 80px 20px;
    }
    
    .photo-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .photo-wrapper {
        height: 55%;
    }
    
    #current-photo {
        max-height: 50vh;
    }
    
    .photo-info {
        padding: 15px;
        text-align: center;
    }
    
    .photo-date {
        font-size: 22px;
    }
    
    .photo-description {
        font-size: 16px;
    }
    
    
    .navigation {
        position: absolute;
        bottom: 10px;
        left: 20px;
        right: 20px;
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
        height: 50px;
    }
    
    .nav-btn {
        flex: none;
        min-width: 50px;
        height: 40px;
        font-size: 20px;
    }
    
    .music-control {
        top: 20px;
        right: 20px;
    }
    
    .music-button {
        width: 55px;
        height: 55px;
    }
    
    .music-icon {
        font-size: 22px;
    }
    
    .birthday-message {
        font-size: 14px;
    }
}