/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1677ff;
    --gradient-color: #4096ff;
    --bright-blue: #69b1ff;
    --dark-bg: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-white: #ffffff;
    --text-gray: #a0aec0;
    --border-color: rgba(64, 150, 255, 0.35);
    --transition: all 0.3s ease;
}

/* 全局动画强制开启 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: inherit !important;
        transition: inherit !important;
    }
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

body {
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-gray);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 【最终核心方案】Canvas 星空画布样式 */
#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* 终极兼容：强制硬件加速，无视手机节能模式 */
    transform: translate3d(0,0,0);
    -webkit-transform: translate3d(0,0,0);
}

/* 彻底废弃旧星空类，杜绝所有冲突 */
.star-bg-container,.star-layer-1,.star-layer-2,
body::before,body::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    color: var(--text-white);
    margin-bottom: 16px;
    font-weight: 600;
    position: relative;
}

.section-desc {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.no-margin {
    margin-bottom: 30px;
    text-align: left;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-color));
    color: #fff;
    box-shadow: 0 4px 20px rgba(22, 119, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(22, 119, 255, 0.5);
}

.outline-btn {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.outline-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.color-gradient {
    background: linear-gradient(135deg, #4096ff, #69b1ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 20px 0;
    transition: var(--transition);
}

.header.active {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
}

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

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

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 14px;
    color: var(--primary-color);
    padding: 2px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
}

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

.nav-item {
    font-size: 16px;
    color: var(--text-gray);
    transition: var(--transition);
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-white);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.menu-btn {
    display: none;
    font-size: 24px;
    color: var(--text-white);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-item {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-gray);
    text-align: center;
    transition: var(--transition);
}

.mobile-nav-item:hover {
    color: var(--primary-color);
}

.mobile-nav.show {
    display: block;
}

/* Banner样式 */
.banner {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    z-index: 1;
}

.banner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 80px);
}

.banner-text {
    flex: 1;
    z-index: 2;
}

.banner-title {
    font-size: 60px;
    color: var(--text-white);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.banner-desc {
    font-size: 24px;
    color: var(--text-white);
    margin-bottom: 12px;
    opacity: 0.9;
}

.banner-sub-desc {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 40px;
}

.banner-btn {
    display: flex;
    gap: 20px;
}

.tech-grid {
    width: 480px;
    height: 480px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1200px;
    animation: cubeRotateHigh 12s linear infinite;
}

.tech-grid::before,
.tech-grid::after,
.tech-grid span:nth-child(1),
.tech-grid span:nth-child(2),
.tech-grid span:nth-child(3) {
    content: "";
    position: absolute;
    border: 2.5px solid var(--primary-color);
    border-radius: 12px;
    background: rgba(22, 119, 255, 0.06);
    box-shadow: 0 0 25px rgba(22, 119, 255, 0.6), inset 0 0 20px rgba(22, 119, 255, 0.25);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tech-grid::before {
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%) rotateX(20deg) rotateY(20deg);
}

.tech-grid::after {
    width: 170px;
    height: 170px;
    transform: translate(-50%, -50%) rotateX(-20deg) rotateY(-20deg);
}

.tech-grid span:nth-child(1) {
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%) rotateX(40deg) rotateY(40deg);
    border-color: var(--bright-blue);
    box-shadow: 0 0 35px rgba(105, 177, 255, 0.8), inset 0 0 25px rgba(105, 177, 255, 0.3);
}

.tech-grid span:nth-child(2) {
    width: 140px;
    height: 140px;
    transform: translate(-25%, -65%) rotateX(-30deg) rotateY(30deg);
    border-color: rgba(64, 150, 255, 0.7);
}

.tech-grid span:nth-child(3) {
    width: 140px;
    height: 140px;
    transform: translate(-75%, -35%) rotateX(30deg) rotateY(-30deg);
    border-color: rgba(64, 150, 255, 0.7);
}

@keyframes cubeRotateHigh {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

.banner-light {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(22, 119, 255, 0.22) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: lightRotate 15s linear infinite;
    z-index: 1;
    filter: blur(8px);
}

@keyframes lightRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 服务板块样式 */
.service-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(22, 119, 255, 0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(22, 119, 255, 0.2), rgba(64, 150, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon i {
    font-size: 28px;
    color: var(--primary-color);
}

.service-title {
    font-size: 22px;
    color: var(--text-white);
    margin-bottom: 16px;
    font-weight: 600;
}

.service-desc {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* 优势板块样式 */
.advantage-section {
    background: rgba(255, 255, 255, 0.02);
}

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

.advantage-item {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
}

.advantage-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.advantage-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.8;
    line-height: 1;
}

.advantage-title {
    font-size: 20px;
    color: var(--text-white);
    margin-bottom: 12px;
    font-weight: 600;
}

.advantage-desc {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* 关于我们 科幻动画 */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
}

.about-text {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 2;
    margin-bottom: 20px;
}

.about-tech-box {
    width: 100%;
    height: 340px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(22, 119, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(22, 119, 255, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, rgba(10, 14, 23, 0.95), rgba(10, 14, 23, 0.98));
    box-shadow:
        0 0 35px rgba(22, 119, 255, 0.6),
        inset 0 0 30px rgba(22, 119, 255, 0.2);
}

.about-tech-box .grid-layer {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(64, 150, 255, 0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 150, 255, 0.45) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 1;
    animation: gridPulseStrong 2.5s ease-in-out infinite alternate;
}

.about-tech-box .scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, #4096ff, #ffffff, transparent);
    box-shadow: 0 0 25px #1677ff, 0 0 50px rgba(22, 119, 255, 1), 0 0 80px rgba(22, 119, 255, 0.6);
    animation: scanFast 1.8s linear infinite;
}

.about-tech-box .particles {
    position: absolute;
    inset: 0;
}

.about-tech-box .particles span {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 15px #69b1ff, 0 0 30px #1677ff, 0 0 50px rgba(22, 119, 255, 0.9);
    animation: particleExplode 1.5s ease-in-out infinite;
}

.about-tech-box .particles span:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; }
.about-tech-box .particles span:nth-child(2) { left: 70%; top: 25%; animation-delay: 0.2s; }
.about-tech-box .particles span:nth-child(3) { left: 40%; top: 50%; animation-delay: 0.4s; }
.about-tech-box .particles span:nth-child(4) { left: 80%; top: 65%; animation-delay: 0.6s; }
.about-tech-box .particles span:nth-child(5) { left: 25%; top: 75%; animation-delay: 0.8s; }

.about-tech-box .electric-border {
    position: absolute;
    inset: -1px;
    border-radius: 18px;
    border: 3px solid transparent;
    background: linear-gradient(90deg, #1677ff, #4096ff, #ffffff, #69b1ff, #1677ff) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderElectric 2s linear infinite;
}

@keyframes gridPulseStrong {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes scanFast {
    0% { top: -5%; opacity: 0.8; }
    50% { opacity: 1; }
    100% { top: 105%; opacity: 0; }
}

@keyframes particleExplode {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(2.8); opacity: 0.2; }
}

@keyframes borderElectric {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.3); }
    100% { filter: hue-rotate(360deg) brightness(1); }
}

/* 联系我们样式 */
.contact-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
}

.contact-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-text h4 {
    font-size: 18px;
    color: var(--text-white);
    margin-bottom: 10px;
}

.contact-text p {
    color: var(--text-gray);
    font-size: 15px;
}

/* 底部样式 */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-text {
    font-size: 14px;
    color: var(--text-gray);
}

/* 移动端适配 */
@media (max-width: 992px) {
    .section-title {
        font-size: 28px;
    }
    .banner-title {
        font-size: 42px;
    }
    .banner-desc {
        font-size: 20px;
    }
    .service-list,
    .advantage-list,
    .contact-list {
        grid-template-columns: 1fr;
    }
    .about-wrap {
        grid-template-columns: 1fr;
    }
    .tech-grid {
        display: none;
    }
    .nav-menu {
        display: none;
    }
    .menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .banner {
        min-height: 100vh;
        padding-top: 70px;
    }
    .banner-title {
        font-size: 36px;
    }
    .section {
        padding: 60px 0;
    }
    .about-tech-box {
        height: 280px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 50px 0;
    }
    .banner-title {
        font-size: 30px;
    }
    .banner-desc {
        font-size: 18px;
    }
    .banner-sub-desc {
        font-size: 16px;
    }
    .banner-btn {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .advantage-item {
        flex-direction: column;
        text-align: center;
    }
    .section-head {
        margin-bottom: 40px;
    }
    .service-card, .advantage-item, .contact-item {
        padding: 25px 20px;
    }
}
