/* ==========================================
   520秘密告白网页 - 样式表
   莫兰迪配色 + 日系恋爱风 + Apple式简洁动画
   ========================================== */

/* CSS 变量定义 - 浪漫粉紫配色 */
:root {
    --color-cream: #FFF5F7;
    --color-pink-light: #FFE4EC;
    --color-pink-medium: #FFB6C1;
    --color-pink-dark: #FF69B4;
    --color-pink-soft: #FFC0CB;
    --color-purple-light: #E6E6FA;
    --color-purple-medium: #DDA0DD;
    --color-purple-dark: #9370DB;
    --color-gold-light: #FFFACD;
    --color-gold-medium: #FFE4B5;
    --color-gray-light: #F8F8FF;
    --color-gray-medium: #E8E8E8;
    --color-text-primary: #3D3D5C;
    --color-text-secondary: #6B6B8D;
    --color-text-light: #9B9BB5;
    --color-white: #FFFFFF;
    --color-shadow: rgba(255, 182, 193, 0.15);
    --color-shadow-dark: rgba(255, 182, 193, 0.3);
    --color-error: #FF6B6B;
    
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-serif: "Songti SC", "SimSun", "Times New Roman", serif;
    
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    background-color: var(--color-cream);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   解锁页面
   ========================================== */
.unlock-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 1s ease, visibility 1s ease;
}

.unlock-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.unlock-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#unlockCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.unlock-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #1a1a2e 0%,
        #2d1b4e 25%,
        #4a1f6b 50%,
        #6b2d7a 75%,
        #8b3a9a 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    opacity: 0.95;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.unlock-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unlock-card {
    max-width: 450px;
    padding: 3rem;
    position: relative;
}

.card-float-animation {
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.unlock-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.unlock-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: var(--color-white);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    outline: none;
    transition: var(--transition-fast);
    text-align: center;
    letter-spacing: 0.2em;
    font-family: monospace;
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.password-input:focus {
    border-color: var(--color-pink-medium);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(232, 180, 180, 0.3);
}

.password-input.error {
    animation: shake 0.5s ease;
    border-color: var(--color-error);
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.input-glow {
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(232, 180, 180, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.password-input:focus + .input-glow {
    opacity: 1;
}

.error-message {
    color: var(--color-error);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    text-align: center;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.unlock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FF69B4, #9370DB);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.5);
    position: relative;
    overflow: hidden;
}

.unlock-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.unlock-btn:hover::before {
    left: 100%;
}

.unlock-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 105, 180, 0.7);
}

.unlock-btn:active {
    transform: translateY(-1px);
}

.btn-heart {
    font-size: 1.3rem;
    animation: heartFloat 2s ease-in-out infinite;
}

@keyframes heartFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.unlock-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    letter-spacing: 0.1em;
}

/* ==========================================
   主页面
   ========================================== */
.main-page {
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.main-page.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   毛玻璃卡片
   ========================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px var(--color-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    box-shadow: 0 12px 48px var(--color-shadow-dark);
    transform: translateY(-2px);
}

/* ==========================================
   飘落花瓣容器
   ========================================== */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.petal {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        opacity: 0;
        transform: translateY(-10vh) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(720deg) scale(1);
    }
}

/* ==========================================
   Hero 区域
   ========================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--color-cream) 0%,
        var(--color-pink-light) 20%,
        var(--color-purple-light) 40%,
        var(--color-pink-light) 60%,
        var(--color-gold-light) 80%,
        var(--color-cream) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.light-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.light-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-gold-medium);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 4s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-20px) scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--color-shadow);
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.2em;
    line-height: 1.2;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FF69B4, #9370DB);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.5);
    position: relative;
    overflow: hidden;
}

.hero-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hero-button:hover::before {
    left: 100%;
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 105, 180, 0.7);
}

.hero-button:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.3rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--color-text-light);
    border-bottom: 2px solid var(--color-text-light);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(10px);
    }
}

/* ==========================================
   通用区域样式
   ========================================== */
.section-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--color-text-primary);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.title-decoration {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-pink-medium), transparent);
    margin: 0 auto;
}

/* ==========================================
   情书图片区域
   ========================================== */
.letter-image-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.letter-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    box-shadow: 0 12px 60px rgba(255, 105, 180, 0.3);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.letter-image:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 80px rgba(255, 105, 180, 0.4);
}

@media (max-width: 768px) {
    .letter-image-container {
        padding: 1rem;
    }
    
    .letter-image {
        border-radius: 15px;
    }
}
.letter-section {
    background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-pink-light) 50%, var(--color-purple-light) 100%);
    position: relative;
}

.letter-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--color-gray-medium);
}

.letter-date {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.letter-weather {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.letter-body {
    font-family: var(--font-serif);
}

.letter-greeting {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.letter-content {
    margin-bottom: 2rem;
}

.letter-paragraph {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    text-indent: 2em;
    text-align: justify;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.letter-paragraph.visible {
    opacity: 1;
    transform: translateY(0);
}

.letter-signature {
    text-align: right;
    margin-top: 2rem;
}

.signature-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.signature-name {
    font-size: 1.5rem;
}

.letter-seal {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
}

.seal-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-pink-medium), var(--color-pink-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(232, 180, 180, 0.4);
    animation: sealRotate 20s linear infinite;
}

@keyframes sealRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.seal-text {
    font-size: 0.7rem;
    color: var(--color-white);
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* ==========================================
   时间轴区域
   ========================================== */
.timeline-section {
    background: var(--color-cream);
    position: relative;
}

.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--color-pink-medium), transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 3rem);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 3rem);
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--color-pink-medium);
    border: 3px solid var(--color-white);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--color-pink-light);
    z-index: 10;
}

.timeline-card {
    padding: 2rem;
    max-width: 400px;
    display: inline-block;
    text-align: left;
}

.timeline-date {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--color-pink-light);
    color: var(--color-text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.timeline-content {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ==========================================
   照片墙区域
   ========================================== */
.gallery-section {
    background: linear-gradient(180deg, var(--color-purple-light) 0%, var(--color-gold-light) 50%, var(--color-pink-light) 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.gallery-item {
    opacity: 0;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

.photo-card {
    overflow: hidden;
    cursor: pointer;
}

.photo-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--color-pink-light), var(--color-gold-light));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.photo-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.photo-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
}

.photo-card:hover .photo-placeholder {
    transform: scale(1.05);
}

.photo-caption {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-primary);
    letter-spacing: 0.05em;
}

/* ==========================================
   结尾区域
   ========================================== */
.ending-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, var(--color-pink-light) 0%, var(--color-purple-light) 30%, var(--color-purple-medium) 60%, var(--color-pink-dark) 100%);
    overflow: hidden;
}

.ending-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#starCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ending-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.ending-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.15em;
}

.ending-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
}

.ending-hearts {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.heart-float {
    font-size: 2.5rem;
    animation: heartFloat 3s ease-in-out infinite;
}

.heart-float:nth-child(1) {
    animation-delay: 0s;
}

.heart-float:nth-child(2) {
    animation-delay: 0.5s;
}

.heart-float:nth-child(3) {
    animation-delay: 1s;
}

.heart-float:nth-child(4) {
    animation-delay: 1.5s;
}

.heart-float:nth-child(5) {
    animation-delay: 2s;
}

.ending-message {
    padding: 2rem;
}

.ending-message p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    line-height: 2;
}

/* ==========================================
   页脚
   ========================================== */
.footer {
    background: var(--color-cream);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ==========================================
   音乐播放器
   ========================================== */
.music-player {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 20px var(--color-shadow);
    transition: var(--transition-smooth);
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px var(--color-shadow-dark);
}

.music-icon {
    font-size: 1.5rem;
}

.music-waves {
    display: flex;
    gap: 2px;
    height: 12px;
    align-items: flex-end;
}

.wave {
    width: 3px;
    height: 4px;
    background: var(--color-pink-medium);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.music-btn.playing .wave:nth-child(1) {
    animation: waveAnim 0.6s ease-in-out infinite;
}

.music-btn.playing .wave:nth-child(2) {
    animation: waveAnim 0.6s ease-in-out infinite 0.1s;
}

.music-btn.playing .wave:nth-child(3) {
    animation: waveAnim 0.6s ease-in-out infinite 0.2s;
}

@keyframes waveAnim {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 12px;
    }
}

/* ==========================================
   图片查看器（Lightbox）
   ========================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    z-index: 10;
}

.lightbox.active .lightbox-image {
    transform: scale(1);
    opacity: 1;
}

.lightbox-caption {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: all 0.3s ease;
}

.lightbox.active .lightbox-caption {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-caption {
        bottom: 2rem;
        font-size: 0.95rem;
        padding: 0.4rem 1rem;
    }
}

/* ==========================================
   烟花效果
   ========================================== */
.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 768px) {
    .unlock-card {
        padding: 2rem;
    }
    
    .section-container {
        padding: 4rem 1.5rem;
    }
    
    .letter-card {
        padding: 2rem;
    }
    
    .timeline-line {
        left: 1rem;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 3rem;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-dot {
        left: 1rem;
    }
    
    .timeline-card {
        max-width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .music-player {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
    }
    
    .music-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1.2rem;
    }
    
    .hero-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .letter-paragraph {
        font-size: 1rem;
        line-height: 1.9;
    }
    
    .ending-hearts {
        gap: 1rem;
    }
    
    .heart-float {
        font-size: 2rem;
    }
    
    .unlock-title {
        font-size: 1.2rem;
    }
    
    .password-input {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
    
    .unlock-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

/* ==========================================
   无障碍优化
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   选择文本样式
   ========================================== */
::selection {
    background: var(--color-pink-light);
    color: var(--color-text-primary);
}

::-moz-selection {
    background: var(--color-pink-light);
    color: var(--color-text-primary);
}

/* ==========================================
   滚动条样式
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-pink-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink-dark);
}