:root {
    --primary-color: #ff9a9e;
    --bg-sky-top: #a1c4fd;
    --bg-sky-bottom: #c2e9fb;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #333;
    --chat-me: #95ec69;
    --chat-other: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--bg-sky-top) 0%, var(--bg-sky-bottom) 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 50px;
}

/* 樱花容器 */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.sakura {
    position: absolute;
    background-color: #ffd1dc;
    border-radius: 100% 0 100% 0;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    0% { top: -10%; transform: rotate(0deg) translateX(0); opacity: 1; }
    100% { top: 110%; transform: rotate(360deg) translateX(100px); opacity: 0; }
}

/* 头部 */
header {
    text-align: center;
    padding: 60px 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

p.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 时间轴 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 中间线 */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: white;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.container.left {
    left: 0;
}

.container.right {
    left: 50%;
}

/* 时间轴圆点 */
.container::after {
    content: '❤';
    position: absolute;
    width: 30px;
    height: 30px;
    right: -15px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    color: var(--primary-color);
}

.container.right::after {
    left: -15px;
}

/* 内容卡片 */
.content {
    padding: 20px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.content:hover {
    transform: translateY(-5px);
}

.date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
    font-size: 1.1rem;
}

.img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: #ddd;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.img-container img:hover {
    transform: scale(1.05);
}

.text-content {
    line-height: 1.6;
}

/* 聊天气泡样式 */
.chat-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    position: relative;
    word-wrap: break-word;
}

.chat-left {
    align-self: flex-start;
    background-color: var(--chat-other);
    border: 1px solid #eee;
}

.chat-right {
    align-self: flex-end;
    background-color: var(--chat-me);
    color: black;
}

.chat-name {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 2px;
}

/* 响应式适配 */
@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }
    
    .container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .container::after {
        left: 17px;
    }
    
    .container.left::after, .container.right::after {
        left: 17px;
    }
    
    .container.left, .container.right {
        left: 0;
    }

    h1 { font-size: 2rem; }
}

/* 开场动画层 */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff0f5; /* 淡粉色背景 */
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 2s ease-in-out;
    overflow: hidden;
}

#intro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.intro-content {
    position: relative;
    z-index: 10001;
    pointer-events: none;
}

.intro-text {
    font-size: 1.8rem;
    color: #ff4b4b;
    font-family: 'Microsoft YaHei', sans-serif;
    opacity: 0;
    animation: fadeInOut 5s forwards;
    text-align: center;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* 内容淡入效果 */
.timeline, .fade-in {
    opacity: 0;
    transition: opacity 1.5s;
}

/* --- 自定义鼠标指针 (心形) --- */
/* 默认状态 */
body.loaded {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="fill:rgba(255, 154, 158, 0.8);"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') 12 12, auto;
}

/* 交互状态 (链接、按钮、卡片) */
body.loaded .content, 
body.loaded .note, 
body.loaded #music-control,
body.loaded h2 {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="fill:rgba(255, 94, 98, 1);"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') 12 12, pointer;
}

/* --- 爱的计时器 --- */
#love-timer {
    text-align: center;
    padding: 20px;
    margin: -20px auto 40px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#love-timer p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
}

.timer-numbers {
    font-family: 'Courier New', Courier, monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.timer-numbers span {
    font-size: 2.2rem;
    margin: 0 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.timer-numbers small {
    font-size: 1rem;
    color: #555;
    margin-right: 10px;
}

/* --- 愿望清单 --- */
.wishlist-section {
    max-width: 800px;
    margin: 50px auto 100px;
    text-align: center;
    padding: 0 20px;
}

.wishlist-section h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.wishlist-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.note {
    background-color: #fff9c4; /* 便利贴黄 */
    padding: 20px;
    width: 220px;
    height: 150px;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: #444;
    transform: rotate(-2deg);
    transition: transform 0.3s;
    font-family: 'Comic Sans MS', cursive, sans-serif; /* 手写风格 */
    border-radius: 2px 2px 20px 2px; /* 卷角效果 */
}

/* 随机旋转一点点，更自然 */
.note:nth-child(even) { transform: rotate(3deg); background-color: #ffdde1; /* 浅粉色 */ }
.note:nth-child(3n) { transform: rotate(-1deg); background-color: #e0f7fa; /* 浅蓝色 */ }

.note:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.note .check {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.note.done .check { color: #4caf50; }
.note.pending .check { color: #ff9800; }

/* --- 音乐播放器 --- */
#music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;
    border: 2px solid var(--primary-color);
    transition: transform 0.2s;
}

#music-control:hover {
    transform: scale(1.1);
}

/* 旋转动画 */
.rotating {
    animation: spin 4s linear infinite;
}

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

@media screen and (max-width: 600px) {
    .timer-numbers span { font-size: 1.8rem; }
    #love-timer { margin-left: 10px; margin-right: 10px; }
}

