/* ========================================
   全局样式
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* ========================================
   密码锁定页面样式
======================================== */
.lock-screen {
    background: #0a0a0f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 动态背景网格 */
.lock-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(108, 99, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 99, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 1;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 背景光效扫描 */
.lock-screen::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 发光光斑 - 升级版 */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
    z-index: 2;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #667eea, #764ba2);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #f093fb, #f5576c);
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ffd89b, #c471ed);
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
        opacity: 0.6;
    }
}

/* 漂浮气球 */
.balloons-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.balloon {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 15s ease-in infinite;
    opacity: 0.6;
}

.balloon-1 { left: 15%; animation-delay: 0s; }
.balloon-2 { left: 35%; animation-delay: 3s; }
.balloon-3 { left: 55%; animation-delay: 6s; }
.balloon-4 { left: 75%; animation-delay: 9s; }
.balloon-5 { left: 90%; animation-delay: 12s; }

@keyframes floatUp {
    0% {
        bottom: -10%;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* 锁屏主容器 */
.lock-container {
    position: relative;
    z-index: 10;
    text-align: center;
}

.lock-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 70px 100px;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 0 60px rgba(255, 255, 255, 0.05),
        0 0 100px rgba(108, 99, 255, 0.2);
    animation: fadeInScale 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

/* 玻璃效果光泽 */
.lock-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 发光标题 - 升级版 */
.glowing-title {
    font-family: 'Caveat', cursive;
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd89b, #c471ed, #12c2e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite, titleFloat 3s ease-in-out infinite;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 30px rgba(255, 216, 155, 0.6));
}

.star {
    display: inline-block;
    animation: starPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 216, 155, 0.8));
}

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

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

@keyframes starPulse {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
}

/* 输入框组 */
.input-group {
    margin: 40px 0;
}

.input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

#password {
    width: 320px;
    padding: 18px 30px;
    font-size: 1.3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    letter-spacing: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

#password:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 30px rgba(102, 126, 234, 0.6),
        0 0 60px rgba(196, 113, 237, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

#password::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.error-message {
    color: #ff6b9d;
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 确认按钮 - 大师级设计 */
.enter-button {
    padding: 18px 70px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 40px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: buttonGradient 3s ease infinite;
}

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

.enter-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.7),
        0 0 40px rgba(118, 75, 162, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.enter-button:active {
    transform: translateY(-2px) scale(1.02);
}

.enter-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.enter-button:hover::before {
    width: 400px;
    height: 400px;
}

/* 按钮发光边缘 */
.enter-button::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: edgeGlow 3s ease infinite;
}

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

.enter-button:hover::after {
    opacity: 1;
}

.enter-button span {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 副标题 */
.subtitle {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-style: italic;
}

/* ========================================
   主页面样式
======================================== */
.main-page {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 主页面动态渐变背景 */
.main-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 216, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(142, 158, 171, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 15s ease-in-out infinite;
    z-index: 1;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 光线扫描效果 */
.main-page::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.1) 30deg,
        transparent 60deg
    );
    animation: spotlight 20s linear infinite;
    z-index: 1;
}

@keyframes spotlight {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 漂浮粒子 */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd369;
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(255, 211, 105, 0.8);
    animation: particleFloat 10s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* 主页漂浮气球 */
.floating-balloons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-balloon {
    position: absolute;
    bottom: -10%;
    font-size: 3rem;
    animation: floatUpMain 20s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes floatUpMain {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

/* 播放器主容器 */
.player-container {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease-out;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 50px;
    padding: 60px 80px;
    box-shadow: 
        0 20px 80px rgba(252, 182, 159, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 100px rgba(255, 182, 193, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* 生日标题 - 升级版 */
.birthday-title {
    font-family: 'Caveat', cursive;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #f093fb, #ffd93d, #6bcf7f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: rainbowShift 4s ease infinite, titleBounce 2s ease-in-out infinite;
    margin-bottom: 40px;
    filter: drop-shadow(2px 4px 6px rgba(255, 107, 107, 0.4));
    position: relative;
}

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

@keyframes titleBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* 蛋糕容器 */
.cake-container {
    margin: 40px 0;
}

.cake {
    position: relative;
    width: 200px;
    height: 250px;
    margin: 0 auto;
    animation: cakeGlow 3s ease-in-out infinite;
}

@keyframes cakeGlow {
    0%, 100% {
        filter: drop-shadow(0 10px 20px rgba(255, 211, 105, 0.3));
    }
    50% {
        filter: drop-shadow(0 15px 30px rgba(255, 211, 105, 0.5));
    }
}

/* 蜡烛 */
.candles {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.candle {
    width: 8px;
    height: 40px;
    background: linear-gradient(to bottom, #ffead0, #ffd369);
    border-radius: 4px 4px 0 0;
    position: relative;
    animation: candleWiggle 2s ease-in-out infinite;
}

.candle:nth-child(2) { animation-delay: 0.3s; }
.candle:nth-child(3) { animation-delay: 0.6s; }

@keyframes candleWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

/* 火焰 */
.flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background: linear-gradient(to top, #ffd369, #ff9b9b);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 10px #ffd369, 0 0 20px #ff9b9b;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1.1);
        opacity: 0.8;
    }
}

/* 蛋糕层 */
.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}

.layer-1 {
    bottom: 0;
    width: 180px;
    height: 60px;
    background: linear-gradient(135deg, #ff9b9b, #e8a0bf);
    border: 3px solid #d88ba3;
}

.layer-2 {
    bottom: 55px;
    width: 160px;
    height: 60px;
    background: linear-gradient(135deg, #ffd369, #ffb347);
    border: 3px solid #e8a857;
}

.layer-3 {
    bottom: 110px;
    width: 140px;
    height: 60px;
    background: linear-gradient(135deg, #e8a0bf, #ff9b9b);
    border: 3px solid #d88ba3;
}

/* 音乐播放器 - 升级版 */
.music-player {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 35px;
    padding: 50px;
    margin: 40px auto;
    max-width: 550px;
    box-shadow: 
        0 25px 80px rgba(252, 182, 159, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 60px rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* 播放器光泽效果 */
.music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: playerShimmer 4s infinite;
}

@keyframes playerShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* 播放器控制按钮 */
.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #f093fb);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.5),
        0 0 20px rgba(240, 147, 251, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: buttonPulse 2s ease infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 
            0 8px 25px rgba(255, 107, 107, 0.5),
            0 0 20px rgba(240, 147, 251, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 
            0 8px 30px rgba(255, 107, 107, 0.7),
            0 0 30px rgba(240, 147, 251, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.control-btn:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 
        0 15px 40px rgba(255, 107, 107, 0.8),
        0 0 40px rgba(240, 147, 251, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.control-btn:active {
    transform: translateY(-4px) scale(1.1);
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.control-btn:hover::before {
    width: 200%;
    height: 200%;
}

/* 音波可视化 */
.sound-wave {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
}

.wave-bar {
    width: 8px;
    height: 20px;
    background: linear-gradient(to top, #ff9b9b, #ffd369);
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% {
        height: 20px;
    }
    50% {
        height: 50px;
    }
}

.sound-wave.paused .wave-bar {
    animation: none;
    height: 20px;
}

/* 祝福语 - 升级版 */
.blessing-text {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.blessing-text p {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 15px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

.sub-blessing {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
    font-weight: 300;
    filter: drop-shadow(0 2px 4px rgba(240, 147, 251, 0.3));
}

/* 彩带画布 */
#confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lock-content {
        padding: 40px 30px;
    }

    .glowing-title {
        font-size: 2.5rem;
    }

    #password {
        width: 250px;
        font-size: 1rem;
    }

    .birthday-title {
        font-size: 2.5rem;
    }

    .cake {
        transform: scale(0.8);
    }

    .music-player {
        padding: 30px 20px;
        margin: 30px 20px;
    }

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