/* 亿资讯 - 现代资讯风格 v2.0 */

:root {
    --primary: #1a1a2e;
    --primary-dark: #0f0f1a;
    --accent: #e94560;
    --accent-hover: #d63d56;
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --text: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #98a2b3;
    --border: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Header ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 a {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 15px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Main ===== */
.main {
    padding: 32px 0 60px;
    min-height: calc(100vh - 300px);
}

.section {
    margin-bottom: 56px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

/* ===== Featured Grid ===== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.featured-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.featured-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.featured-card .card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

.featured-card .card-content {
    padding: 20px;
}

.featured-card .card-category {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    background: rgba(233, 69, 96, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.featured-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card .card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.featured-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== News List ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: var(--transition);
}

.news-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.news-item:hover::before {
    transform: scaleY(1);
}

.news-item .news-rank {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    min-width: 44px;
    text-align: center;
    line-height: 1;
    opacity: 0.8;
}

.news-item .news-content {
    flex: 1;
    min-width: 0;
}

.news-item .news-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.news-item .news-tag {
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.news-item:hover .news-tag {
    background: var(--accent);
    color: #fff;
}

/* ===== Popular List ===== */
.popular-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.popular-item:hover {
    background: var(--bg);
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.popular-item .popular-rank {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    min-width: 36px;
    line-height: 1;
}

.popular-item .popular-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 56px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 17px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.footer-section p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.9;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    transition: var(--transition);
    padding-left: 0;
    position: relative;
}

.footer-section a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-section a::before {
    content: '→';
    position: absolute;
    left: -16px;
    opacity: 0;
    transition: var(--transition);
}

.footer-section a:hover::before {
    opacity: 1;
    left: 0;
}

.subscribe-form {
    display: flex;
    gap: 10px;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: var(--transition);
}

.subscribe-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.subscribe-form input:focus {
    outline: none;
    background: rgba(255,255,255,0.15);
}

.subscribe-form button {
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.subscribe-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

/* ===== Loading ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto 0;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
}

/* ===== Error State ===== */
.error-state {
    text-align: center;
    padding: 80px 20px;
}

.error-state h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }
    
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .logo h1 a {
        font-size: 22px;
    }
    
    .tagline {
        display: none;
    }
    
    .main {
        padding: 24px 0 48px;
    }
    
    .section {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-item {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .news-item .news-rank {
        text-align: left;
        font-size: 24px;
    }
    
    .popular-list {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form button {
        width: 100%;
    }
}

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

.featured-card,
.news-item,
.popular-item {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
