/* 全局样式 */
/* 使用系统默认字体代替 Google Fonts */

:root {
    --primary-color: #ff6b81;
    --secondary-color: #ff4757;
    --text-color: #333;
    --light-color: #fff;
    --background-color: #fff8f8;
    --accent-color: #ff9ff3;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 25L60 40H40L50 25Z" fill="%23ff9ff3" opacity="0.3"/></svg>');
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

h1, h2, h3 {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--primary-color);
    text-align: center;
    margin: 20px 0;
}

p {
    margin-bottom: 15px;
}

/* 心形容器 */
.heart-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10;
}

.heart {
    background-color: var(--primary-color);
    display: inline-block;
    height: 30px;
    margin: 0 10px;
    position: relative;
    width: 30px;
    animation: heartbeat 1.5s infinite;
}

.heart:before,
.heart:after {
    content: "";
    background-color: var(--primary-color);
    border-radius: 50%;
    height: 30px;
    position: absolute;
    width: 30px;
}

.heart:before {
    top: -15px;
    left: 0;
}

.heart:after {
    left: 15px;
    top: 0;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 页头样式 */
header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
}

header h1 {
    font-size: 2.4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px var(--shadow-color);
    line-height: 1.3;
}

header p {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

#days, #hours, #minutes, #seconds {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 2.6rem;
}

/* 实时天数元素样式 */
#days-milestone, #days-letter, #days-letter2 {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.highlight {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { color: var(--secondary-color); }
    50% { color: var(--primary-color); }
    100% { color: var(--secondary-color); }
}

/* 时间线 */
.timeline {
    margin: 60px auto;
    padding: 20px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.date-started {
    text-align: center;
    margin-bottom: 30px;
}

.date-started h2 {
    font-size: 1.8rem;
}

#start-date {
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.milestone {
    text-align: center;
    margin: 40px 0;
}

.milestone > p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

/* 轮播图外层容器 */
.slideshow-outer-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* 轮播图样式 */
.slideshow-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    min-height: 300px;
    position: relative;
    z-index: 1;
}

.slide {
    min-width: 100%;
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.photo {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    display: block;
    z-index: 1;
}

/* 轮播图按钮 */
.slideshow-btn-left,
.slideshow-btn-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slideshow-btn-left:hover,
.slideshow-btn-right:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-50%) scale(1.05);
}

.slideshow-btn-left {
    left: 10px;
}

.slideshow-btn-right {
    right: 10px;
}

.slideshow-btn-left i,
.slideshow-btn-right i {
    font-size: 16px;
}

/* 信件样式 */
.love-letter {
    margin: 80px auto;
    max-width: 800px;
    padding: 30px;
    position: relative;
}

.love-letter h2 {
    margin-bottom: 30px;
}

.letter-content {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 10px 20px var(--shadow-color);
    position: relative;
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
    background-image: linear-gradient(to bottom, #f9f9f9 1px, transparent 1px);
    background-size: 100% 28px;
}

.letter-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 40px;
    height: 30px;
    background-color: var(--accent-color);
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
}

.signature {
    text-align: right;
    font-style: italic;
    margin-top: 30px;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem;
    color: var(--primary-color);
}

/* 音乐播放器样式 */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-controls {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
}

#play-pause {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#play-pause:hover {
    background: var(--secondary-color);
}

#play-pause i {
    font-size: 1.2rem;
    pointer-events: none;
}

.song-info {
    display: none;
}

.progress-bar {
    display: none;
}

/* 漂浮的心 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px dashed var(--primary-color);
}

footer p {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    #days, #hours, #minutes, #seconds {
        font-size: 2rem;
    }
    
    .slides-wrapper {
        min-height: 200px;
    }
    
    .letter-content {
        padding: 25px;
    }
    
    .player-controls {
        width: auto;
    }
    
    .song-info {
        display: none;
    }
    
    .music-player {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: auto;
        padding: 10px;
    }
    
    .slideshow-btn-left,
    .slideshow-btn-right {
        width: 35px;
        height: 35px;
    }
    
    .slideshow-btn-left i,
    .slideshow-btn-right i {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 40px 0 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    #days, #hours, #minutes, #seconds {
        font-size: 1.8rem;
    }
    
    .slides-wrapper {
        min-height: 150px;
    }
    
    .slideshow-btn-left,
    .slideshow-btn-right {
        width: 30px;
        height: 30px;
    }
    
    .slideshow-btn-left i,
    .slideshow-btn-right i {
        font-size: 12px;
    }
    
    .letter-content {
        padding: 20px 15px;
    }
    
    .music-player {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: auto;
        padding: 10px;
    }
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
    color: #ff6b6b;
    font-size: 2rem;
}

.loading-indicator i {
    animation: spin 1.5s linear infinite;
}

.error-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
    color: #ff6b6b;
    font-size: 1.2rem;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 