/* index.css */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
body {
    font-family: 'Segoe UI', sans-serif;
    background: #fdf6f0;
    padding: 20px;
}
h1 {
    text-align: center;
    color: #d63384;
    margin: 0 auto 30px auto;
    padding: 0 16px;
    /* 禁止换行 */
    white-space: nowrap;
    /* 防止溢出 */
    overflow: hidden;
    /* 响应式字体：最小 1.4rem（手机），理想 2.2rem（桌面），最大不超过容器 */
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: bold;
    line-height: 1.2;
}
.couple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}
.couple-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}
.couple-card:nth-of-type(odd) .couple-header {
    background: linear-gradient(45deg, #667eea, #8a2be2); /* 第一个使用原来的紫色渐变 */
}
.couple-card:nth-of-type(even) .couple-header {
    background: linear-gradient(45deg, #ff6b6b, #ffa500); /* 第二个使用橙红色渐变 */
}
.couple-header {
    padding: 15px;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
}
.person-item {
    padding: 15px;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}
.person-item:last-child { 
    border-bottom: none; 
}
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #667eea;
}
.avatar img {
    width: 100%;
    height: 100%;
}
.info-box {
    flex: 1;
    text-align: left;
}
.name { 
    font-weight: bold; 
    font-size: 1.1em; 
    color: #333; 
    display: block;
    margin-bottom: 5px;
}
.info-row {
    font-size: 0.95em;
    color: #666;
    margin: 4px 0;
}
.countdown-text {
    transition: color 0.3s ease;
    display: block;
}
/* 生日当天的样式 */
.birthday-today {
    color: #d63384 !important;
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #fff0f0;
    border: 1px dashed #d63384;
}
/* 鼠标悬停效果 */
.birthday-today:hover {
    background-color: #ffe0e0;
    cursor: pointer;
    text-decoration: underline;
}
.anniversary-box {
    background: #fff3cd;
    padding: 15px;
    margin-top: 10px;
    border-top: 2px solid #ffc107;
    font-weight: bold;
    color: #856404;
}
.btn {
    display: block;
    width: 80%;
    margin: 15px auto;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn.diary { 
    background: #28a745; 
}
.countdown-text.birthday-today {
    text-decoration: none; /* 去除下划线 */
    color: #ff6b6b; /* 设置文字颜色 */
    font-weight: bold;
    display: inline-block;
    padding: 0; /* 移除额外的padding以保持原始高度 */
    margin: 0;
    border: none;
    background: none;
    transition: all 0.3s ease;
    line-height: inherit; /* 继承父元素的行高 */
    vertical-align: baseline; /* 与普通文本对齐 */
    font-size: inherit; /* 继承父元素的字体大小 */
    border-radius: 0;
}
.countdown-text.birthday-today:hover {
    text-decoration: none; /* 确保悬停时也无下划线 */
    background-color: #fff0f0; /* 轻微的背景色变化来表示悬停状态 */
    transform: none; /* 不使用scale避免高度变化 */
}

/* loading 和 error 样式 */
.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}
.error-message {
    color: red;
    text-align: center;
    padding: 20px;
}
/* 在原来的 index.css 末尾添加以下样式 */
.loading-container {
    grid-column: 1 / -1; /* 跨越所有列，居中显示 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px; /* 确保有足够的高度来居中 */
    text-align: center;
}

.loading {
    font-size: 1.2em;
    color: #666;
    padding: 20px;
    font-weight: bold;
}

/* 可选：添加加载动画效果 */
.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 四季特效样式 */
/* 四季特效样式 - 最上层 */
.season-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 允许点击穿透到下方元素 */
    z-index: 9999; /* 置于最顶层 */
    overflow: hidden;
}

.season-particle {
    position: absolute;
    top: -50px;
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
}

/* 落叶样式 - 增强版 */
.leaf {
    width: 25px;
    height: 25px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23d4af37" d="M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z"/></svg>') no-repeat center;
    background-size: contain;
    animation: fall-leaf 6s linear infinite;
}

/* 雪花样式 - 增强版 */
.snowflake {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    animation: fall-snow 5s linear infinite;
}

/* 春天花瓣样式 - 增强版 */
.petal {
    width: 18px;
    height: 18px;
    background: linear-gradient(45deg, #ff69b4, #ffb6c1);
    border-radius: 50% 50% 0;
    transform: rotate(45deg);
    animation: fall-petal 8s linear infinite;
}

/* 夏天雨滴样式 - 增强版 */
.raindrop {
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(135, 206, 250, 0.8), rgba(70, 130, 180, 0.6));
    border-radius: 0 0 5px 5px;
    animation: fall-rain 2s linear infinite;
}

/* 落叶动画 - 增强版 */
@keyframes fall-leaf {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    25% {
        transform: translateX(15px) translateY(25vh) rotate(90deg);
    }
    50% {
        transform: translateX(-10px) translateY(50vh) rotate(180deg);
    }
    75% {
        transform: translateX(20px) translateY(75vh) rotate(270deg);
    }
    100% {
        transform: translateX(-15px) translateY(100vh) rotate(360deg);
        opacity: 0.1;
    }
}

/* 雪花动画 - 增强版 */
@keyframes fall-snow {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    25% {
        transform: translateX(10px) translateY(25vh) rotate(90deg);
    }
    50% {
        transform: translateX(-5px) translateY(50vh) rotate(180deg);
    }
    75% {
        transform: translateX(15px) translateY(75vh) rotate(270deg);
    }
    100% {
        transform: translateX(-10px) translateY(100vh) rotate(360deg);
        opacity: 0.1;
    }
}

/* 花瓣动画 - 增强版 */
@keyframes fall-petal {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    25% {
        transform: translateX(-20px) translateY(25vh) rotate(-90deg);
    }
    50% {
        transform: translateX(15px) translateY(50vh) rotate(-180deg);
    }
    75% {
        transform: translateX(-25px) translateY(75vh) rotate(-270deg);
    }
    100% {
        transform: translateX(20px) translateY(100vh) rotate(-360deg);
        opacity: 0.1;
    }
}

/* 雨滴动画 - 增强版 */
@keyframes fall-rain {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0.8;
    }
    100% {
        transform: translateX(8px) translateY(100vh);
        opacity: 0.2;
    }
}

/* 淡入淡出过渡 */
.season-particle.fade-in {
    animation-duration: 0.8s;
    animation-name: fade-in;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 0.9; }
}