/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ===== 橙色系主题 ===== */
    --primary: #e65100;          /* 主橙色 */
    --primary-dark: #bf360c;      /* 深橙色 */
    --primary-light: #ff9800;     /* 浅橙色 */
    --accent: #ff6d00;            /* 强调橙 */
    
    /* 背景色 */
    --bg-primary: #fff8f0;        /* 暖白背景 */
    --bg-secondary: #fff3e0;      /* 浅橙背景 */
    --bg-card: #ffffff;           /* 卡片白 */
    
    /* 文字色 */
    --text-primary: #2d3436;      /* 主文字 */
    --text-secondary: #636e72;    /* 次要文字 */
    --text-light: #b2bec3;        /* 浅色文字 */
    
    /* 边框 */
    --border: #ffe0b2;            /* 橙色边框 */
    --border-light: #fff3e0;      /* 浅边框 */
    
    /* 分类颜色 */
    --tech-color: #ff6d00;        /* 科技橙 */
    --intl-color: #ff9800;        /* 国际浅橙 */
    --domestic-color: #ffb74d;    /* 国内柔橙 */
    --finance-color: #ffcc80;     /* 财经淡橙 */
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(230, 81, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(230, 81, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(230, 81, 0, 0.16);
    --shadow-hover: 0 12px 40px rgba(230, 81, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部 ===== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary-light) 100%);
    color: white;
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.logo-image {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    font-size: 56px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -2px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 25px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.date-display {
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

/* ===== 日期选择器 ===== */
.date-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.btn-nav,
.btn-today {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-nav {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    color: var(--primary);
    border: 2px solid var(--border);
}

.btn-nav:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-today {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-today:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.date-picker {
    padding: 12px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s;
}

.date-picker:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

/* ===== 加载状态 ===== */
.loading {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== 错误提示 ===== */
.error,
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 25px;
    opacity: 0.5;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 15px;
}

/* ===== 主内容区 ===== */
main {
    padding: 30px 0 60px;
}

/* ===== 新闻区块 ===== */
.news-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.news-section:hover {
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border);
}

.section-header h2 {
    font-size: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-weight: 800;
}

.section-icon {
    font-size: 32px;
}

.news-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===== 新闻列表 ===== */
.news-list {
    display: grid;
    gap: 20px;
}

.news-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    border-radius: 16px;
    border-left: 5px solid var(--border);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-card) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.news-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-hover);
}

.news-item:hover::before {
    opacity: 1;
}

.news-item.tech { border-left-color: var(--tech-color); }
.news-item.intl { border-left-color: var(--intl-color); }
.news-item.domestic { border-left-color: var(--domestic-color); }
.news-item.finance { border-left-color: var(--finance-color); }

.news-content {
    flex: 1;
}

.news-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.5;
}

.news-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.news-source {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border-light) 100%);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.news-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-link {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    align-self: flex-start;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.news-link:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-dark) 100%);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.no-news {
    text-align: center;
    color: var(--text-light);
    padding: 30px;
    font-size: 15px;
}

/* ===== 底部 ===== */
footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 35px 20px;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.brand {
    color: var(--primary-light);
    font-weight: 800;
    font-size: 16px;
}

.update-time {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 移动端适配 ===== */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .news-section {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    /* 头部适配 */
    header {
        padding: 40px 0 30px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .logo-icon {
        font-size: 42px;
    }
    
    h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .date-display {
        font-size: 14px;
        padding: 8px 18px;
    }
    
    /* 日期选择器适配 */
    .date-selector {
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }
    
    .btn-nav,
    .btn-today,
    .date-picker {
        width: 100%;
        text-align: center;
    }
    
    /* 新闻区块适配 */
    .news-section {
        padding: 20px;
        border-radius: 16px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .section-icon {
        font-size: 28px;
    }
    
    /* 新闻列表适配 */
    .news-item {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .news-item:hover {
        transform: translateY(-5px);
    }
    
    .news-title {
        font-size: 17px;
    }
    
    .news-summary {
        font-size: 14px;
    }
    
    .news-meta {
        gap: 12px;
    }
    
    .news-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    /* 底部适配 */
    footer {
        padding: 25px 15px;
    }
    
    .brand {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 26px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .news-section {
        padding: 15px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
}

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

.news-item {
    animation: fadeIn 0.5s ease-out;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
