/* ======================================
   上海源瑞盛泓信息技术有限公司官网
   极简白色系 · 高端商务风 · 增强版
   ====================================== */

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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --accent-color: #0066cc;
    --accent-light: #3d8fea;
    --bg-white: #ffffff;
    --bg-gray: #f8f9fa;
    --border-color: #e5e5e5;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.8;
    color: var(--primary-color);
    background: var(--bg-white);
    font-size: 16px;
    overflow-x: hidden;
}

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

/* ======================================
   顶部导航 - 渐变透明过渡
   ====================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: 0.3s;
}

/* ======================================
   首屏 Banner - 粒子背景 + 渐变光效
   ====================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 100px 20px 80px;
}

/* 动态渐变背景 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

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

/* 粒子画布 */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 20px;
    color: var(--primary-color);
    min-height: 1.2em;
}

/* 打字机光标 */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-color);
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-content .subtitle {
    font-size: 22px;
    color: var(--secondary-color);
    margin-bottom: 50px;
    font-weight: 300;
}

/* 首页打字机效果专用动画 */
.hero:has(#typewriter-text) .subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 2s;
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 首页打字机效果专用动画 */
.hero:has(#typewriter-text) .hero-buttons {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 2.3s;
}

.btn {
    padding: 16px 40px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.4s ease;
    border-radius: 4px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

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

.btn-primary:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ======================================
   通用区块样式
   ====================================== */
.section {
    padding: 100px 20px;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.section-title p {
    color: var(--secondary-color);
    font-size: 17px;
}

/* ======================================
   3D 悬浮卡片
   ====================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    perspective: 1000px;
}

.card-3d {
    background: var(--bg-white);
    padding: 45px 35px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    position: relative;
    cursor: pointer;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card-3d:hover::before {
    opacity: 1;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.card-3d .card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 28px;
    transition: transform 0.4s ease;
}

.card-3d:hover .card-icon {
    transform: translateZ(20px) scale(1.1);
}

.card-3d .card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-color);
    transition: stroke 0.4s ease;
}

.card-3d:hover .card-icon svg {
    stroke: var(--accent-light);
}

.card-3d h3 {
    font-size: 22px;
    margin-bottom: 18px;
    font-weight: 500;
    transition: color 0.4s ease;
}

.card-3d:hover h3 {
    color: var(--accent-color);
}

.card-3d p {
    color: var(--secondary-color);
    font-size: 15px;
    line-height: 1.9;
}

/* 原始卡片样式保留 */
.card {
    background: var(--bg-white);
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-color);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 500;
}

.card p {
    color: var(--secondary-color);
    font-size: 14px;
    line-height: 1.8;
}

/* ======================================
   数字统计动画
   ====================================== */
.stats-section {
    background: var(--gradient-dark);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(118, 75, 162, 0.2) 0%, transparent 50%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 56px;
    font-weight: 300;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-number span {
    font-size: 32px;
}

.stat-label {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
}

/* ======================================
   技术能力墙
   ====================================== */
.tech-section {
    background: var(--bg-gray);
    padding: 100px 20px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-item:hover::before {
    opacity: 0.05;
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

.tech-item svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    stroke: var(--secondary-color);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.tech-item:hover svg {
    stroke: var(--accent-color);
    transform: scale(1.1);
}

.tech-item span {
    display: block;
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: color 0.4s ease;
}

.tech-item:hover span {
    color: var(--primary-color);
}

/* 技术说明卡片 */
.tech-desc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.tech-desc-card {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
}

.tech-desc-card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-5px);
}

.tech-desc-card h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.tech-desc-card p {
    color: var(--secondary-color);
    font-size: 15px;
    line-height: 1.8;
}

/* ======================================
   关于我们内容区
   ====================================== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 2;
}

.about-content p {
    margin-bottom: 30px;
    color: var(--secondary-color);
    font-size: 16px;
    text-align: justify;
}

.highlight-box {
    background: var(--bg-gray);
    padding: 40px;
    margin: 40px 0;
    border-left: 3px solid var(--accent-color);
    transition: all 0.4s ease;
}

.highlight-box:hover {
    border-left-width: 5px;
    box-shadow: var(--shadow-light);
}

.highlight-box h3 {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* ======================================
   新闻列表
   ====================================== */
.news-list {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    padding: 35px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s ease;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

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

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

.news-item:hover {
    background: var(--bg-gray);
    padding-left: 45px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.news-item:hover h3 {
    color: var(--accent-color);
}

.news-item p {
    color: var(--secondary-color);
    font-size: 15px;
    line-height: 1.8;
}

/* ======================================
   联系信息
   ====================================== */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
}

.contact-value {
    color: var(--secondary-color);
    flex: 1;
}

.contact-value a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

.qr-placeholder {
    text-align: center;
    padding: 40px;
    background: var(--bg-gray);
    margin-top: 40px;
    color: var(--secondary-color);
    border-radius: 12px;
}

/* ======================================
   AI 客服入口
   ====================================== */
.ai-chat-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.4s ease;
    z-index: 999;
    text-decoration: none;
}

.ai-chat-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.ai-chat-btn svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: none;
}

.ai-chat-btn::before {
    content: '智能客服';
    position: absolute;
    right: 70px;
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary-color);
    box-shadow: var(--shadow-medium);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ai-chat-btn:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* 脉冲动画 */
.ai-chat-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ======================================
   页脚
   ====================================== */
.footer {
    background: var(--primary-color);
    color: rgba(255,255,255,0.7);
    padding: 60px 20px 40px;
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    margin-bottom: 30px;
    line-height: 2;
}

.footer-info p {
    font-size: 14px;
}

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}

.footer-filing {
    margin-top: 15px;
    line-height: 1.8;
}

.footer-filing p {
    font-size: 12px;
    margin: 5px 0;
}

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

.footer-filing a:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

/* ======================================
   滚动动画
   ====================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ======================================
   响应式设计 - 平板
   ====================================== */
@media (max-width: 768px) {
    .navbar .container {
        height: 60px;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-medium);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: 100vh;
        padding: 80px 20px 60px;
    }

    .hero-content h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .hero-content .subtitle {
        font-size: 16px;
    }

    .section {
        padding: 70px 20px;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 42px;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .tech-item {
        padding: 20px 15px;
    }

    .tech-item svg {
        width: 40px;
        height: 40px;
    }

    .ai-chat-btn {
        width: 55px;
        height: 55px;
        right: 20px;
        bottom: 20px;
    }

    .ai-chat-btn::before {
        display: none;
    }
}

/* ======================================
   响应式设计 - 手机
   ====================================== */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 26px;
        letter-spacing: 1px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .card-3d {
        padding: 35px 25px;
    }

    .highlight-box {
        padding: 25px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-number {
        font-size: 36px;
    }

    .stat-label {
        font-size: 13px;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .tech-item {
        padding: 15px 10px;
    }

    .tech-item svg {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .tech-item span {
        font-size: 11px;
    }

    .tech-desc-grid {
        grid-template-columns: 1fr;
    }
}
