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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h1::before {
    content: "📜";
    font-size: 1.8rem;
}

.date-display {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.date-display::before {
    content: "📅";
}

/* 主要内容区域 */
main {
    flex: 1;
}

.events-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    min-height: 400px;
}

/* 加载状态 */
.loading {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading::before {
    content: "⏳";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error {
    text-align: center;
    font-size: 1.1rem;
    color: #dc3545;
    padding: 50px 0;
    background: #f8d7da;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error::before {
    content: "⚠️";
}

/* 事件列表 */
.events-list {
    display: grid;
    gap: 15px;
}

.event-item {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #4a6cf7;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
    position: relative;
}

.event-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left-color: #3b5bdb;
}

.event-item::before {
    content: "🕰️";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: #4a6cf7;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(74, 108, 247, 0.3);
}

.event-year {
    font-size: 0.85rem;
    color: #4a6cf7;
    font-weight: 600;
    margin-bottom: 6px;
    display: inline-block;
    background: rgba(74, 108, 247, 0.1);
    padding: 3px 10px;
    border-radius: 16px;
}

.event-content {
    font-size: 1rem;
    color: #2c3e50;
    line-height: 1.5;
    font-weight: 500;
    margin-left: 8px;
}

/* 简介区域样式 */
.intro-section {
    margin: 40px 0;
}

.intro-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    animation: fadeInUp 0.8s ease-out;
}

.intro-container h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.intro-content p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 30px;
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.feature-item:nth-child(2) {
    animation-delay: 0.4s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.6s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: #4a6cf7;
    color: white;
}

.feature-item:hover h3,
.feature-item:hover p {
    color: white;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-item p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

footer::before {
    content: "🔗";
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 页面加载动画 */
.container {
    animation: fadeIn 0.6s ease-out;
}

header {
    animation: fadeInUp 0.8s ease-out;
}

.events-container {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* 事件项悬停动画 */
.event-item {
    animation: fadeInUp 0.6s ease-out;
}

.event-item:nth-child(even) {
    animation-delay: 0.1s;
}

.event-item:nth-child(odd) {
    animation-delay: 0.2s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .events-container {
        padding: 20px;
    }
    
    .event-item {
        padding: 15px;
    }
    
    .event-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    header {
        padding: 20px;
    }
    
    .events-container {
        padding: 15px;
    }
}
/* 生产环境错误处理样式 */
.error {
    background: linear-gradient(135deg, #fee, #fdd);
    border: 1px solid #fcc;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(255, 204, 204, 0.3);
}

.error-content p {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.retry-btn {
    background: linear-gradient(135deg, #007cba, #005a8b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 124, 186, 0.3);
}

.retry-btn:hover {
    background: linear-gradient(135deg, #005a8b, #007cba);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 124, 186, 0.4);
}

.retry-btn:active {
    transform: translateY(0);
}

/* 事件项动画优化 */
.event-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

/* 加载状态优化 */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .event-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .error {
        margin: 15px;
        padding: 15px;
    }
    
    .retry-btn {
        padding: 12px 18px;
        font-size: 16px;
    }
}
