:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fecfef;
    --text-color: #555;
    --bg-color: #fff0f5; /* 淡紫红 */
    --card-bg: #ffffff;
    --accent-color: #ff6b6b;
}

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

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- 登录遮罩层 (index.html 使用) --- */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box {
    background: white;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 90%;
}

.login-box h1 {
    font-family: 'Dancing Script', cursive;
    color: var(--accent-color);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-box input {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.login-box input:focus {
    border-color: var(--primary-color);
}

.login-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.login-box button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* --- 辅助类 --- */
.hidden {
    display: none;
}

/* --- 主要内容 --- */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
}

#main-content.visible {
    opacity: 1;
}

/* --- 头部区域 --- */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #fff 0%, var(--bg-color) 70%);
    padding: 20px;
    position: relative;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 5rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.5rem;
    min-height: 1.5em; /* 防止布局偏移 */
    margin-bottom: 40px;
    font-weight: normal;
    color: #444;
}

.info-panel {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.current-time {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent-color);
    font-family: 'Noto Serif SC', serif;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.days-counter {
    font-size: 1.2rem;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 5px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    animation: bounce 2s infinite;
    color: var(--accent-color);
    font-size: 1rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* --- 时间轴区域 --- */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 垂直线条 */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

/* 交替两侧布局 */
.left {
    left: 0;
    text-align: right;
}

.right {
    left: 50%;
    text-align: left;
}

/* 爱心节点图标 */
.timeline-heart {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background-color: var(--bg-color); /* 匹配背景色以隐藏爱心背后的线条，或者直接用白色 */
    border: 4px solid var(--accent-color);
    top: 20px;
    border-radius: 50%;
    z-index: 10;
    text-align: center;
    line-height: 32px; /* 大致居中爱心 */
    color: var(--accent-color);
    font-size: 18px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.right .timeline-heart {
    left: -20px;
}

/* 内容卡片 */
.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 154, 158, 0.3);
}

.timeline-content:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.date-label {
    display: inline-block;
    padding: 5px 15px;
    background: var(--secondary-color);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.timeline-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-content img {
    width: 100%;
    border-radius: 10px;
    display: block;
    margin-top: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 动画触发类 */
.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.footer-end {
    text-align: center;
    padding: 50px 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

/* --- 响应式设计（移动端） --- */
@media screen and (max-width: 768px) {
    .title {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }

    /* 将线条移至左侧 */
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left; /* 重置文本对齐 */
    }
    
    /* 重置左右定位 */
    .left, .right {
        left: 0;
    }
    
    /* 移动爱心位置 */
    .timeline-heart {
        left: 10px; /* 30px(线条位置) - 20px(容器padding) = 10px */
        right: auto;
        transform: translateX(-50%); /* 完美的中心对齐 */
    }
    
    .right .timeline-heart {
        left: 10px;
        transform: translateX(-50%);
    }
}
