/* 科技感设计 - 财经新闻网站 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f0ff;
    --secondary-color: #7000ff;
    --accent-color: #ff00e6;
    --success-color: #00ff88;
    --warning-color: #ffcc00;
    --danger-color: #ff3366;
    --bg-dark: #0a0e1a;
    --bg-card: rgba(16, 20, 40, 0.8);
    --bg-card-hover: rgba(20, 30, 60, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0b0d0;
    --border-color: rgba(0, 240, 255, 0.3);
    --glow-primary: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-secondary: 0 0 20px rgba(112, 0, 255, 0.5);
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1030 50%, #0a0e1a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 80px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(112, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 网格背景效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(26, 16, 48, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: rgba(0, 240, 255, 0.05);
    color: var(--primary-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.1);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

/* 行情卡片 */
.stocks-section {
    padding: 25px 20px;
}

.stocks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.stock-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stock-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stock-card:hover::before {
    opacity: 1;
}

.stock-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
}

.stock-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stock-price {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stock-change.up {
    color: var(--success-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.stock-change.down {
    color: var(--danger-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

/* 重要消息 */
.pinned-section {
    padding: 25px 20px;
    background: rgba(112, 0, 255, 0.05);
    border-top: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.2);
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.unread-badge {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
    animation: pulse 2s infinite;
}

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

/* 分类筛选 */
.filter-section {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border-color);
}

.filter-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.tab {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: rgba(0, 240, 255, 0.05);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.tab:hover::before {
    width: 100%;
}

.tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.tab.active::before {
    width: 100%;
}

/* 新闻列表 */
.news-section {
    padding: 25px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.news-actions {
    display: flex;
    gap: 12px;
}

.news-actions button {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: rgba(0, 240, 255, 0.05);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.news-actions button:hover {
    border-color: var(--primary-color);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.news-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.news-card.unread::before {
    opacity: 1;
}

.news-card.pinned {
    background: rgba(112, 0, 255, 0.1);
    border-color: var(--secondary-color);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.2);
}

.news-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.25);
}

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

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

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-source {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.news-actions-card {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-actions-card button {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.news-actions-card button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

/* 重要程度标记 */
.importance-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.importance-3 {
    background: linear-gradient(135deg, var(--danger-color), var(--accent-color));
    color: white;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

.importance-2 {
    background: linear-gradient(135deg, var(--warning-color), #ff9900);
    color: white;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
}

/* 底部 */
.footer {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 2px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

/* 响应式优化 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
    
    .stocks-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .news-card {
        padding: 18px;
    }
    
    .news-title {
        font-size: 16px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

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