/* ================= 核心变量与重置 ================= */
:root {
    --bg-dark: #070B19;
    --bg-card: rgba(16, 25, 48, 0.7);
    --cyan: #00eeffc6;
    --blue: #0055FF;
    /* --text-main: #E2E8F0; */
    --text-muted: #94A3B8;
    --glow: 0 0 20px rgba(0, 240, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

header a {
    color: #fff;
}

header a:hover {
    color: var(--cyan);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ================= 滚动条美化 ================= */
::-webkit-scrollbar {
    display: none;
}

/* Chrome, Safari, Opera */
body {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ================= 自定义悬浮滚动条 ================= */
#custom-scrollbar {
    position: fixed;
    right: 4px;
    top: 0;
    width: 6px;
    background: var(--cyan);
    border-radius: 4px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
    box-shadow: var(--glow);
    pointer-events: auto;
    /* 允许鼠标交互 */
}

#custom-scrollbar:active {
    width: 10px;
    /* 拖拽时稍微变粗一点点 */
    transition: width 0.2s ease;
}

#custom-scrollbar.show {
    opacity: 1;
}

/* ================= 导航栏 (极致自适应与防溢出) ================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 9999;
    background: rgba(7, 11, 25, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    transition: all 0.4s ease;
}

.nav-container {
    width: 1400px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Logo 增加弹性计算，放大时微微回缩防挤压 */
.logo img {
    height: clamp(35px, 3vw, 45px);
}

/* 菜单区域占满剩余空间 */
.nav-menu {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex: 1;
    margin-left: 2%;
    white-space: nowrap;
}

/* 字体大小、内边距全部采用 clamp() 弹性控制。增加上下 padding=10px 撑开高度供蓝条停靠 */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px clamp(4px, 0.8vw, 12px);
    font-size: clamp(12px, 1.1vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    color: #fff !important;
}

/* 修复蓝条错位：因为上方加了 10px 的 padding，将 bottom 设为 0，无论怎么缩放蓝条永远稳稳停在文字正下方 */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--cyan);
    transition: 0.3s;
    box-shadow: var(--glow);
}

.nav-item:hover::after {
    width: 60%;
}

.nav-item:hover {
    color: var(--cyan) !important;
    text-shadow: var(--glow);
}

/* 透明桥接区域：填补 nav-item 底部与 dropdown 顶部之间的空隙，让鼠标可以平滑移入 dropdown */
.nav-item::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* 下拉菜单动画 */
.dropdown {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) rotateX(-20deg);
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) rotateX(0);
}

.dropdown li a {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    color: #fff !important;
}

.dropdown li a:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan) !important;
    letter-spacing: 1px;
}

/* 发光按钮同样增加 clamp() 弹性自适应 */
.btn-glow {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: clamp(6px, 0.6vw, 10px) clamp(12px, 1.5vw, 25px);
    font-size: clamp(12px, 1.1vw, 15px);
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2), 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-glow:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
    transform: translateY(-3px);
}

/* ================= 首屏粒子宇宙 (Hero) ================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-title {
    font-size: 60px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s forwards 0.5s;
}

.text-gradient {
    background: linear-gradient(90deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow);
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

.hero-actions {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1.1s;
}

/* ================= 滚动显现动画类 ================= */
.reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-zoom.active {
    opacity: 1;
    transform: scale(1);
}

/* ================= 通用区块布局 ================= */
.section {
    padding: 80px 20px;
    position: relative;
}

.container {
    max-width: 80%;
    /* 固定容器最大宽度，增加留白 */
    margin: 0 auto;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
    text-align: center;
}

.section-line {
    width: 40px;
    height: 4px;
    background: #fff;
    margin-bottom: 15px;
    border-radius: 2px;
}

.section-title {
    font-size: 36px;
    color: #fff;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================= 底部信息 ================= */
footer {
    background: #03050A;
    border-top: 1px solid #1a2235;
    padding: 80px 20px 30px;
    position: relative;
    z-index: 10;
}

.footer-grid {
    max-width: 80rem;
    width: 100%;
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-logo {
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-logo i {
    color: var(--cyan);
    margin-right: 10px;
}

.footer-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-info i {
    width: 25px;
    color: var(--cyan);
}

.footer-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--cyan);
}

.footer-links li {
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--cyan);
    padding-left: 10px;
}

.footer-bottom {
    font-size: 12px;
    max-width: 1200px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    margin: 0 auto;
    align-items: center;
}



/* ================= 响应式断点控制 ================= */
@media (max-width: 90rem) {

    /* 屏幕开始缩小时，让7列变4列，防止文字被过度挤压 */
    .industry-flex {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .matrix-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .matrix-grid-new .matrix-card {
        width: calc(50% - 15px);
    }

    /* 小屏幕变2列 */
    .about-wrap {
        flex-direction: column;
    }

    .ai-container {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .matrix-grid {
        grid-template-columns: 1fr;
    }

    .matrix-grid-new .matrix-card {
        width: 100%;
    }

    /* 手机端变1列 */
    .software-grid {
        grid-template-columns: 1fr;
    }

    .solution-gallery {
        grid-template-columns: 1fr;
    }

    .sol-img-large {
        grid-column: span 1;
    }
}

/* ================= 关键帧动画 ================= */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        text-shadow: 0 0 10px var(--cyan);
    }

    50% {
        text-shadow: 0 0 30px var(--cyan), 0 0 50px var(--cyan);
    }

    100% {
        text-shadow: 0 0 10px var(--cyan);
    }
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

/* ================= Bootstrap 冲突修复（旧二级页面专用）================= */
/* 用 #header ID 提高优先级，覆盖 bootstrap .nav-item flex:1、.nav-link display:block 等干扰 */
#header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    height: 80px !important;
    z-index: 9999 !important;
    background: rgb(0 0 0 / 80%) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1) !important;
    display: block !important;
}

#header .nav-container {
    width: 1400px;
    max-width: 100%;
    margin: 0 auto;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 20px;
}

#header .logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

#header .logo img {
    height: clamp(35px, 3vw, 45px) !important;
    width: auto !important;
}

#header .nav-menu {
    display: flex !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    flex: 1 !important;
    margin-left: 2% !important;
    white-space: nowrap !important;
    list-style: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    flex-wrap: nowrap !important;
}

#header .nav-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    padding: 10px clamp(4px, 0.8vw, 12px) !important;
    font-size: clamp(12px, 1.1vw, 16px) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    color: #fff !important;
    text-align: left !important;
}

#header .nav-item>a {
    color: #fff !important;
    display: inline !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

#header .nav-item:hover>a {
    color: var(--cyan) !important;
    text-decoration: none !important;
}

#header .nav-item .dropdown {
    position: absolute !important;
    top: 60px !important;
    left: 50% !important;
}

#header .nav-item .dropdown li {
    flex: none !important;
}

#header .nav-item .dropdown li a {
    display: block !important;
    padding: 15px 20px !important;
    color: #fff !important;
    font-size: 14px !important;
    text-align: center !important;
}

#header .nav-item .dropdown li a:hover {
    color: var(--cyan) !important;
    text-decoration: none !important;
}