/* 基础变量 */
:root {
    --primary-color: #007aff;
    --secondary-color: #5ac8fa;
    --dark-bg: #0a0c10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --gradient-tech: linear-gradient(135deg, #007aff 0%, #00d4ff 100%);
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtext {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center; /* 水平居中 */
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.2) 0%, transparent 80%);
    z-index: -1;
}

/* 科技背景动画 */
.hero-ani-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

/* 动态网格层 */
.grid-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(0, 122, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 122, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: moveGrid 30s linear infinite;
}

@keyframes moveGrid {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* 能量节点层 */
.nodes-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translate(50px, -100px); }
    90% { opacity: 1; }
    100% { transform: translate(100px, -200px); opacity: 0; }
}

/* 扫描线效果 */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 122, 255, 0.1), transparent);
    animation: scan 5s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(100vh); }
}

/* Hero Section 专用容器突破 */
.hero .container {
    max-width: 100% !important;
    width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: center;
}

.hero-content {
    width: 100%;
    max-width: 1500px; /* 进一步放宽至 1500px */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    z-index: 10;
}

/* 机场翻码牌容器 */
.flap-container {
    width: 100%;
    margin-bottom: 30px; /* 从 60px 减半 */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 200px; /* 从 240px 压缩，紧贴文字底部 */
}

.flap-item {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
}

.flap-item.active {
    display: flex;
}

/* 翻码牌核心动画 */
.flap-item h1 {
    font-size: 4.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap; 
    letter-spacing: 1px;
    animation: flapDown 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
    transform-origin: top;
    background: linear-gradient(to bottom, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 副标题真正横向平铺 */
.flap-item p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 25px 0 0; /* 略微缩小与标题的间距 */
    width: 100%;
    max-width: 1300px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 1px;
}

.flap-item.active p {
    animation: fadeInUp 0.5s ease 0.3s forwards;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px; /* 从 40px 大幅缩减 */
    position: relative;
    z-index: 20;
}

.btn {
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1rem;
    transition: 0.3s;
}

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

.btn-primary:hover {
    background: #006ae6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Services */
.services {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.service-icon {
    margin-bottom: 25px;
    color: var(--primary-color);
}

.service-icon svg {
    width: 48px;
    height: 48px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Advantages */
.advantages {
    padding: 100px 0;
}

.advantage-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.advantage-item {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.adv-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(0, 122, 255, 0.3);
    line-height: 1;
}

.advantage-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.advantage-item p {
    color: var(--text-secondary);
}

/* About */
.about {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.about-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.tech-box {
    width: 300px;
    height: 300px;
    border: 2px solid var(--primary-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 20s linear infinite;
}

.box-inner {
    width: 80%;
    height: 80%;
    border: 1px solid var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    animation: rotate-reverse 15s linear infinite;
}

/* Contact */
.contact {
    padding: 100px 0;
}

.contact-box {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 20px 40px;
    border-radius: 50px;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-beian {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-beian a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-beian a:hover {
    color: var(--primary-color);
}

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

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

@keyframes rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .about-content { flex-direction: column; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: flex; }
    .hero h1 { font-size: 2.5rem; }
}
