/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 页面基础样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: url('../images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    text-align: center;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景覆盖层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2) 0%, rgba(0, 128, 255, 0.2) 100%);
    backdrop-filter: blur(5px);
    z-index: -1;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 关键帧动画定义 */
@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 157, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0);
    }
}

/* 标题样式 */
h1 {
    font-size: 3.5rem;
    margin-top: 50px;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff00de, 0 0 20px #ff00de, 0 0 25px #ff00de, 0 0 30px #ff00de, 0 0 35px #ff00de;
    animation: fadeIn 2s ease-in, pulse-scale 3s ease-in-out infinite;
    letter-spacing: 2px;
}

/* 计时器样式 */
.timer {
    margin: 30px 0;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    display: inline-block;
    animation: slideIn 1s ease-out;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timer-display {
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.time-unit {
    display: flex;
    flex-direction: column;
}

.time-value {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 10px #fff, 0 0 20px #00bfff, 0 0 30px #00bfff, 0 0 40px #00bfff;
    font-weight: bold;
}

.time-label {
    font-size: 1.1rem;
    margin-top: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #ffd700;
    font-weight: bold;
}

/* 我们的点点滴滴section */
.moments {
    margin: 60px 0;
    padding: 30px 20px;
    background: rgba(255, 107, 157, 0.08);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(255, 107, 157, 0.3);
    border-bottom: 2px solid rgba(255, 107, 157, 0.3);
    animation: fadeInUp 1s ease-out;
}

/* 我们的点点滴滴容器 */
.moments-container {
    margin: 0 auto;
    padding: 40px 30px;
    max-width: 1200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 1s ease-out;
    transition: all 0.3s ease;
}

.moments-container h3 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #ffd700;
    animation: fadeIn 2s ease-in;
    text-align: center;
}

/* 我们的点点滴滴类型特殊样式 */
.meeting .timeline-dot {
    background: rgba(255, 105, 180, 0.2);
    border-color: #ff69b4;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

.anniversary .timeline-dot {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 爱情独白样式 */
.love-monologue {
    margin: 10px 0;
    animation: fadeIn 3s ease-in;
}

.monologue-header {
    text-align: center;
    margin-bottom: 10px;
}

.monologue-subtitle {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #fff;
    animation: fadeIn 2s ease-in;
}

/* 独白依次显示动画 */
.monologue-card:nth-child(1) { animation-delay: none; }
.monologue-card:nth-child(2) { animation-delay: none; }
.monologue-card:nth-child(3) { animation-delay: none; }
.monologue-card:nth-child(4) { animation-delay: none; }
.monologue-card:nth-child(5) { animation-delay: none; }

/* 静态卡片容器样式 */
.monologue-container {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    margin: 40px auto;
    max-width: 800px;
    padding: 0 20px;
}

/* 静态独白样式 */
.monologue-card {
    background: transparent;
    border-radius: 0;
    padding: 30px 25px;
    box-shadow: none;
    border: none;
    transition: none;
    animation: none;
    opacity: 1;
}

.monologue-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    background: transparent;
}

/* 情书内容样式 */
.monologue-greeting {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ff6b9d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 107, 157, 0.6);
    animation: pulse-scale 2s ease-in-out infinite alternate;
    font-family: 'Noto Serif SC', serif;
}

.monologue-card .monologue-content p {
    font-size: 1.2rem;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
    text-align: left;
    text-indent: 2em;
    color: #ffe4e1;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    font-family: 'Noto Serif SC', serif;
}

.monologue-card .monologue-content p:nth-child(2) { animation-delay: 0.2s; }
.monologue-card .monologue-content p:nth-child(3) { animation-delay: 0.4s; }
.monologue-card .monologue-content p:nth-child(4) { animation-delay: 0.6s; }
.monologue-card .monologue-content p:nth-child(5) { animation-delay: 0.8s; }
.monologue-card .monologue-content p:nth-child(6) { animation-delay: 1s; }
.monologue-card .monologue-content p:nth-child(7) { animation-delay: 1.2s; }
.monologue-card .monologue-content p:nth-child(8) { animation-delay: 1.4s; }
.monologue-card .monologue-content p:nth-child(9) { animation-delay: 1.6s; }
.monologue-card .monologue-content p:nth-child(10) { animation-delay: 1.8s; }

.monologue-signature {
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 15px;
    color: #ff6b9d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 107, 157, 0.6);
    font-style: italic;
    animation: pulse-scale 2s ease-in-out infinite;
    letter-spacing: 1px;
    animation-delay: 2s;
    font-family: 'Noto Serif SC', serif;
}

/* 新的时间轴线设计 */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* 新的时间轴线设计 */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, rgba(255, 107, 157, 0), rgba(255, 107, 157, 0.6), rgba(255, 107, 157, 0));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    border-radius: 1px;
}

/* 时间轴项目新设计 */
.timeline-item {
    padding: 30px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    transition: all 0.4s ease;
}

/* 时间轴项目方向 */
.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* 新的时间轴点设计 */
.timeline-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    right: -6px;
    background: #ff6b9d;
    border: 3px solid rgba(255, 255, 255, 0.9);
    top: 40px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -6px;
}

.timeline-dot:hover {
    transform: scale(1.3);
    background: #ff4785;
    animation: none;
}

/* 新的时间轴内容设计 */
.timeline-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 107, 157, 0.1));
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 内容装饰 */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 107, 157, 0.1), transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* 悬停效果 */
.timeline-content:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 107, 157, 0.15));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 107, 157, 0.4);
}

/* 标题新设计 */
.timeline-content h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #ff6b9d;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(255, 107, 157, 0.4);
    padding-bottom: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* 描述新设计 */
.timeline-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
    text-align: left;
    color: #f0f0f0;
    font-weight: 300;
}

/* 页脚样式 */
.footer {
    margin-top: 60px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    animation: fadeIn 4s ease-in;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 音乐控制按钮样式 */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#music-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartbeat 2s ease-in-out infinite;
}

#music-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        margin-top: 30px;
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff00de, 0 0 20px #ff00de;
    }
    
    .container {
        padding: 15px;
    }
    
    .timer {
        margin: 25px 0;
        padding: 20px;
    }
    
    .timer-display {
        font-size: 1.3rem;
        gap: 15px;
    }
    
    .time-value {
        font-size: 2.5rem;
    }
    
    .time-label {
        font-size: 1rem;
    }
    
    .music-control {
        top: 15px;
        right: 15px;
    }
    
    #music-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* 移动端爱情独白样式 */
    .monologue-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .monologue-card {
        margin-bottom: 40px;
        padding: 0 10px 30px;
    }
    
    .monologue-content {
        padding: 30px 20px;
    }
    
    .monologue-greeting {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .monologue-card .monologue-content p {
        font-size: 0.9rem;
        line-height: 1.8;
        margin-bottom: 5px;
    }
    
    .monologue-signature {
        font-size: 1.3rem;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        margin-top: 25px;
    }
    
    .timer-display {
        font-size: 1.1rem;
        gap: 10px;
    }
    
    .time-value {
        font-size: 2rem;
    }
    
    .timer {
        padding: 15px;
    }
    
    /* 移动端时间轴线设计 */
    .timeline-container::after {
        left: 20px;
        background: linear-gradient(to bottom, rgba(255, 107, 157, 0), rgba(255, 107, 157, 0.6), rgba(255, 107, 157, 0));
        width: 2px;
    }
    
    /* 移动端时间轴项目设计 */
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        margin-bottom: 30px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    /* 移动端时间轴点设计 */
    .timeline-dot {
        left: 9px !important;
        right: auto !important;
        width: 10px;
        height: 10px;
        border: 2px solid rgba(255, 255, 255, 0.9);
        background: #ff6b9d;
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7);
        animation: pulse 2s ease-in-out infinite;
    }
    
    /* 移动端时间轴内容设计 */
    .timeline-content {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 107, 157, 0.1));
        border-radius: 12px;
        padding: 20px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
        transition: all 0.4s ease;
    }
    
    /* 移动端时间轴标题设计 */
    .timeline-content h4 {
        font-size: 1.2rem;
        color: #ff6b9d;
        margin-bottom: 12px;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
        border-bottom: 2px solid rgba(255, 107, 157, 0.4);
        padding-bottom: 8px;
        font-weight: bold;
        letter-spacing: 0.5px;
    }
    
    /* 移动端时间轴描述设计 */
    .timeline-content p {
        font-size: 1rem;
        line-height: 1.6;
        color: #f0f0f0;
        margin: 0;
        text-align: left;
        font-weight: 300;
    }
    
    /* 移动端我们的点点滴滴模块设计 */
    .moments {
        margin: 25px 0;
        padding: 15px 10px;
        background: transparent;
        border-radius: 0;
    }
    
    .moments-container {
        padding: 15px 10px;
        margin: 0 auto;
        max-width: 100%;
        background: transparent;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }
    
    .moments-container h3 {
        font-size: 1.8rem;
        margin-bottom: 35px;
        color: #ff6b9d;
        text-shadow: 0 0 8px rgba(255, 107, 157, 0.6);
        font-weight: bold;
        letter-spacing: 1px;
    }
}
