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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
}

/* ===== 锁屏页面 ===== */
.lock-screen {
    min-height: 100vh;
    position: relative;
    background: #000;
}

.wallpaper-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lock-content {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 30px;
}

.lock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    opacity: 0.8;
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.system-time {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
    letter-spacing: 2px;
}

.lock-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lock-title {
    font-size: 1.8rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.password-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.password-input-wrapper {
    position: relative;
    width: 500px;
    height: 60px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-input-wrapper:focus-within {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.2);
}

#password-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255,255,255,0.9);
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 12px;
    font-family: 'Courier New', monospace;
    padding-left: 10px;
}

#password-input::placeholder {
    color: rgba(255,255,255,0.2);
    letter-spacing: 5px;
}

.cursor {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: rgba(255,255,255,0.8);
    animation: cursor-blink 1s ease-in-out infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.password-hints {
    display: flex;
    gap: 15px;
}

.hint-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.hint-dot.active {
    background: rgba(255, 107, 107, 0.8);
    border-color: rgba(255, 107, 107, 1);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.action-buttons {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    align-items: center;
}

.hint-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hint-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.9);
}

.unlock-btn {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 142, 83, 0.9));
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

.unlock-btn:active {
    transform: translateY(0);
}

.hint-message {
    margin-top: 30px;
    color: rgba(255, 107, 107, 0.8);
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    text-align: center;
    letter-spacing: 2px;
}

.hint-message.show {
    opacity: 1;
    transform: translateY(0);
}

.lock-footer {
    display: flex;
    justify-content: center;
}

.power-btn {
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.power-btn:hover {
    opacity: 0.8;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.error-shake {
    animation: shake 0.4s ease;
}

/* ===== 相册页面 ===== */
.gallery-page {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    position: relative;
    overflow-y: auto;
}

.gallery-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gallery-wallpaper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 90% center;
}

.photo-album {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px 20px;
    padding-left: 5%;
}

.album-container {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 900px;
    width: 100%;
    position: relative;
}

.album-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.album-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.album-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.photo-frame {
    flex: 1;
    max-width: 550px;
    aspect-ratio: 3/4;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding-bottom: 60px;
}

.photo-frame img {
    width: 100%;
    height: calc(100% - 60px);
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.photo-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.2);
    pointer-events: none;
}

.photo-frame .album-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#photo-counter {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== 问卷样式 ===== */
.quiz-container {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
    pointer-events: none;
}

.quiz-container.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.quiz-question {
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 0.8s;
}

.quiz-container.show .quiz-question {
    opacity: 1;
    transform: translateY(0);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.quiz-option-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quiz-option {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(30px);
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.quiz-container.show .option-a {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease 2s;
}

.quiz-container.show .option-b {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease 3.5s;
}

.quiz-option.selected {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-color: transparent;
}

.image-popup {
    display: none;
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: popIn 0.3s ease;
    flex-shrink: 0;
}

.image-popup.show {
    display: inline-block;
}

@keyframes popIn {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== 其他样式 ===== */
.gallery-content {
    position: relative;
    z-index: 10;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.memories-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.memory-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.6);
    transition: all 0.3s ease;
}

.memory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.card-date {
    font-size: 0.9rem;
    color: #FF6B6B;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.memory-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.memory-card p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

.final-card {
    text-align: center;
    background: rgba(255, 240, 245, 0.9);
}

.final-card h2 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-weight: 700;
}

.final-card p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.card-hearts {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.card-hearts span {
    font-size: 1.8rem;
    animation: heart-pulse 1.5s ease-in-out infinite;
}

.card-hearts span:nth-child(2) { animation-delay: 0.1s; }
.card-hearts span:nth-child(3) { animation-delay: 0.2s; }
.card-hearts span:nth-child(4) { animation-delay: 0.3s; }
.card-hearts span:nth-child(5) { animation-delay: 0.4s; }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.gallery-page .back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

@keyframes heart-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ===== ★★★ 顶部音乐控制（关键！）★★★ ===== */
#music-control {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    display: block !important;
}

#music-toggle {
    padding: 10px 18px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 30px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
}

#music-toggle:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05) !important;
}

/* ===== 下一页按钮 ===== */
.next-page-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.next-page-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ===== 照片墙页面 ===== */
.photos-page {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.photos-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.photos-wallpaper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 90% center;
}

.photos-page .back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}



.photo-wall-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 40px 40px;
}

.photo-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 40px;
    max-width: 1400px;
    width: 100%;
    justify-items: center;
}

.photo-item {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
    background: white;
    padding: 12px;
}

/* 不同角度的倾斜效果 */
.photo-item.rotate-1 {
    transform: rotate(-12deg);
}

.photo-item.rotate-2 {
    transform: rotate(8deg);
}

.photo-item.rotate-3 {
    transform: rotate(-15deg);
}

.photo-item.rotate-4 {
    transform: rotate(10deg);
}

.photo-item.rotate-5 {
    transform: rotate(-8deg);
}

.photo-item.rotate-6 {
    transform: rotate(12deg);
}

.photo-item.rotate-7 {
    transform: rotate(-10deg);
}

.photo-item.rotate-8 {
    transform: rotate(15deg);
}

/* 悬停效果：放大并回正 */
.photo-item:hover {
    transform: rotate(0deg) scale(1.25);
    z-index: 20;
}

.photo-item:hover img {
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .lock-content {
        padding: 30px 20px;
    }

    .lock-title {
        font-size: 1.2rem;
        letter-spacing: 5px;
        margin-bottom: 30px;
    }

    .password-input-wrapper {
        width: 90%;
        max-width: 400px;
        height: 50px;
    }

    #password-input {
        font-size: 1.3rem;
        letter-spacing: 8px;
        padding-left: 5px;
    }

    .password-hints {
        gap: 8px;
    }

    .hint-dot {
        width: 8px;
        height: 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 20px;
    }

    .unlock-btn {
        padding: 12px 30px;
    }

    .gallery-header {
        padding: 20px;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .gallery-content {
        padding: 20px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wish-card {
        padding: 25px 20px;
    }

    .wish-card h2 {
        font-size: 1.8rem;
    }

    .wish-card p {
        font-size: 1rem;
    }

    .quiz-options {
        gap: 12px;
    }
    .quiz-option-wrapper {
        gap: 10px;
    }
    .image-popup {
        width: 50px;
        height: 50px;
    }
    #music-control {
        top: 10px !important;
        right: 10px !important;
    }
    #music-toggle {
        padding: 6px 12px !important;
        font-size: 14px !important;
    }
}