/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e6eaf2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out;
}

h1 {
    color: #e74c3c;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 主内容样式 */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
    animation: fadeIn 1s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db);
}

/* 计数器样式 */
.counter {
    font-size: 4rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

.start-date {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* 纪念日样式 */
.anniversaries {
    margin: 40px 0;
}

.anniversaries h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.anniversary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.anniversary-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    flex: 1;
    min-width: 200px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.anniversary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.anniversary-item h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.anniversary-count {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

/* 时间线样式 */
.timeline {
    margin: 40px 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #e0e0e0;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px #e74c3c;
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin: 0 20px;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
    margin-left: auto;
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.love-quote {
    font-style: italic;
    color: #e74c3c;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .counter {
        font-size: 3rem;
    }
    
    .anniversary-list {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::after {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-content {
        margin-left: 50px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .counter {
        font-size: 2.5rem;
    }
    
    .main-content {
        padding: 20px 15px;
    }
}

/* 音频播放器样式 */
.audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.audio-player:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.audio-player.minimized {
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    opacity: 0.3;
}

.minimize-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #e74c3c;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.minimize-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

.player-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.audio-player.minimized .player-controls {
    margin-bottom: 0;
}

.play-pause-btn {
    background: #e74c3c;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 16px;
    transition: background-color 0.2s;
}

.play-pause-btn:hover {
    background-color: #c0392b;
}

.audio-info {
    flex: 1;
}

.song-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.time-display {
    font-size: 12px;
    color: #666;
}

.player-details {
    display: block;
}

.audio-player.minimized .player-details {
    display: none;
}

.progress-container {
    margin-bottom: 10px;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 5px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #e74c3c;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.seek-slider, .volume-slider {
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.seek-slider::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
}

.seek-slider::-moz-range-thumb, .volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-control {
    display: flex;
    align-items: center;
}

.volume-control span {
    margin-right: 10px;
    font-size: 14px;
}

/* 媒体查询 - 小屏幕设备 */
@media (max-width: 480px) {
    .audio-player {
        width: 280px;
        right: 10px;
        bottom: 10px;
        padding: 12px;
    }
    
    .play-pause-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .song-title {
        font-size: 14px;
    }
    
    .time-display {
        font-size: 11px;
    }
}