/* 现代UI设计系统 - 番红网络 */

:root {
    /* 色彩系统 */
    --primary-color: #0055ff;
    --primary-hover: #0044cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    
    /* 渐变色彩 */
    --gradient-primary: linear-gradient(135deg, #0055ff 0%, #0044cc 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    
    /* 文字色彩 */
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;
    
    /* 边框和阴影 */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    background: var(--gradient-primary);
    transform: translateY(-2px);
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
}

/* 按钮样式 */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 8px 25px rgba(0, 85, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 85, 255, 0.4);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* 修复：导航栏里的登录按钮在浅底色上接近白色导致不可见 */
.navbar-modern .btn-outline-light {
    border: 2px solid rgba(0, 85, 255, 0.55);
    color: var(--primary-color) !important;
    background: transparent;
}

.navbar-modern .btn-outline-light:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff !important;
}

/* 主要内容区域 */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 400px);
}

/* 英雄区域 */
.hero-section {
    background: var(--gradient-dark);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* 区块间距 */
.section-padding {
    padding: var(--spacing-xl) 0;
}

/* 浅底背景（首页使用） */
.bg-light-alt {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* 功能卡片 */
.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* 价格卡片 */
.pricing-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.pricing-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2.5rem;
    text-align: center;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
}

.pricing-features {
    padding: 0;
    list-style: none;
}

.pricing-feature {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.pricing-feature i {
    color: var(--success-color);
    margin-right: 0.75rem;
}

/* 模板卡片 */
.template-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.template-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

/* 新闻卡片样式（new.php / 首页公司动态复用） */
.news-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 22px;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(102, 126, 234, 0.18);
}

.news-card .date {
    color: #6b7280;
    font-size: .95rem;
    margin-bottom: 10px;
}

.news-card .card-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #111827;
    min-height: 60px;
}

.news-card .excerpt {
    color: #6b7280;
    line-height: 1.9;
    margin-bottom: 0;
}

/* 页脚样式 */
.footer-modern {
    background: var(--dark-color);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-brand i {
    color: var(--primary-color);
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
}

/* 回到顶部按钮 */
.btn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 85, 255, 0.4);
}

/* 首页：新闻动态模块 - 顶部卡片 */
.home-news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.home-news-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(99, 102, 241, 0.12);
    padding: 22px 24px;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.home-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(99, 102, 241, 0.16);
}

.home-news-type {
    display: inline-block;
    font-size: .8rem;
    font-weight: 800;
    color: #a855f7;
    margin-bottom: 6px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.home-news-date {
    color: #6b7280;
    font-size: .9rem;
    margin-bottom: 10px;
}

.home-news-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.5;
    color: #111827;
    min-height: 52px;
    margin-bottom: 10px;
}

.home-news-excerpt {
    color: #6b7280;
    line-height: 1.9;
    margin-bottom: 0;
}

/* 首页：新闻动态模块 - 下方文字列表 */
.home-news-list-wrapper {
    margin-top: 48px;
}

.home-news-list-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 8px;
}

.home-news-list-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 28px;
}

.home-news-list {
    border-top: 1px solid rgba(37, 99, 235, 0.16);
    padding-top: 24px;
}

.home-news-list-item-title {
    font-size: .9rem;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.home-news-list-item-date {
    font-size: .85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.home-news-list-item-link {
    font-size: .9rem;
    color: #1d4ed8;
    text-decoration: underline;
}

.home-news-list-item-link:hover {
    color: #1e40af;
}

/* 公司动态模块（首页/嵌入式） */
.company-dynamic-section {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    background: var(--bg-light);
}

.company-dynamic-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.company-dynamic-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 26px;
    font-size: 0.95rem;
}

.company-dynamic-list {
    border-top: 1px solid rgba(37, 99, 235, 0.14);
    padding-top: 24px;
}

.company-dynamic-item {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(99, 102, 241, 0.12);
    padding: 20px 22px;
    height: 100%;
}

.company-dynamic-meta {
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.company-dynamic-date {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.company-dynamic-link {
    font-size: 1rem;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.company-dynamic-link:hover {
    color: #2563eb;
}

.company-dynamic-excerpt {
    color: #6b7280;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .pricing-card {
        margin-bottom: 2rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-actions {
        justify-content: center;
        margin-top: 1rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 85, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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