/* --- 全局变量与重置 --- */
:root {
    --primary-color: #ff4757;       /* 更鲜艳的红 */
    --accent-color: #ff6b81;        
    --text-color: #5d5d5d;          
    --glass-bg: rgba(255, 255, 255, 0.6); 
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(255, 71, 87, 0.15);
}

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

body, html {
    width: 100%; height: 100%;
    /* 禁止长按选中文本，关键设置 */
    user-select: none; 
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Noto Serif SC', serif;
    /* 背景改为稍微暖一点的色调 */
    background: linear-gradient(135deg, #fff0f3 0%, #ffe4e6 100%);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
}

/* 画布层：最高层级但允许点击穿透 */
#canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999; 
    pointer-events: none; 
}

/* --- 通用玻璃卡片 --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 10;
}

/* --- 1. 入场屏 --- */
#login-screen {
    position: fixed; inset: 0; z-index: 100;
    display: flex; justify-content: center; align-items: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    transition: opacity 0.8s ease, visibility 0.8s;
}

.entrance-card { width: 90%; max-width: 380px; }

.avatar-lock {
    width: 80px; height: 80px;
    background: white; border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex; justify-content: center; align-items: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.title { font-size: 1.8rem; color: #444; margin-bottom: 0.5rem; font-weight: bold; }
.subtitle { color: #888; font-size: 0.9rem; margin-bottom: 2rem; }

/* 密码输入框 */
.input-group { position: relative; width: 200px; margin: 0 auto 2rem; }
#password-input {
    width: 100%; border: none; background: transparent;
    font-size: 2.5rem; color: var(--primary-color);
    text-align: center; letter-spacing: 10px; outline: none;
    pointer-events: auto; 
    font-family: monospace; /* 修正字体让数字等宽 */
}
#password-input::placeholder { color: #ddd; letter-spacing: 5px; opacity: 0.5; }

.input-underline {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 3px; background: var(--primary-color);
    transition: width 0.4s ease;
    border-radius: 2px;
}
#password-input:focus + .input-underline { width: 100%; }

#enter-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    border: none; color: white;
    padding: 12px 40px; border-radius: 50px;
    font-size: 1rem; cursor: pointer; font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: transform 0.2s;
    pointer-events: auto;
}
#enter-btn:active { transform: scale(0.95); }

#error-msg { color: #ff4757; font-size: 0.8rem; margin-top: 1rem; opacity: 0; height: 20px; transition: opacity 0.3s; }

/* --- 2. 主体内容 --- */
#main-content {
    padding: 2rem 1rem; max-width: 800px; margin: 0 auto;
    display: none; opacity: 0; transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}
#main-content.visible { opacity: 1; transform: translateY(0); }

.timer-card { margin-bottom: 2rem; }
.card-header { font-size: 1.1rem; color: #777; margin-bottom: 1.5rem; letter-spacing: 2px; }

#timer { display: flex; justify-content: center; align-items: center; gap: 10px; }
.time-box span { font-size: 2.5rem; font-weight: bold; color: var(--primary-color); }
.time-box small { font-size: 0.7rem; color: #999; display: block; margin-top: 5px; font-weight: normal; }
.separator { font-size: 2rem; color: #ccc; margin-top: -15px; }

.content-card, .bucket-card { margin-bottom: 2rem; text-align: left; }
.photo-frame {
    width: 100%; height: 280px; background: #fff; 
    border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.love-letter h3 { margin-bottom: 1rem; color: #333; }
.love-letter p { line-height: 1.8; color: #666; margin-bottom: 0.8rem; }
.signature { text-align: right; margin-top: 1rem; font-weight: bold; color: var(--primary-color); }

.bucket-list { list-style: none; }
.bucket-list li { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px dashed rgba(0,0,0,0.1); }
.bucket-list .check { margin-right: 12px; color: var(--primary-color); font-weight: bold; font-size: 1.2rem; }
.bucket-list li.done .text { text-decoration: line-through; color: #aaa; }
.footer { width: 100%; text-align: center; padding: 2rem 0 4rem; color: #bbb; font-size: 0.9rem; clear: both; }

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

/* 移动端适配 */
@media (max-width: 480px) {
    .title { font-size: 1.6rem; }
    #timer .time-box span { font-size: 1.8rem; }
    #password-input { font-size: 2rem; }
}