:root {
    --bg-dark: #0b0c10;
    --text-main: #c5c6c7;
    --text-muted: #66fcf1;
    --accent-blue: #45a29e;
    --accent-cyan: #66fcf1;
    --font-main: "思源宋体", "SimSun", "微软雅黑", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* --- 背景与扫描线 --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(102, 252, 241, 0) 0%,
            rgba(102, 252, 241, 0.03) 50%,
            rgba(102, 252, 241, 0) 100%);
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    animation: scan 10s linear infinite;
}

@keyframes scan {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(100%);
    }
}

/* --- 加载遮罩 --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #02050a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.loader-content {
    text-align: center;
    width: 300px;
    position: relative;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(102, 252, 241, 0.1);
    border-top: 2px solid var(--accent-cyan);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
}

/* 增加内圈反向旋转 */
.loader-circle::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 2px solid rgba(69, 162, 158, 0.2);
    border-bottom: 2px solid var(--accent-blue);
    border-radius: 50%;
    animation: spinReverse 1.5s linear infinite;
}

@keyframes spinReverse {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(-360deg); }
}

.loader-text {
    color: var(--accent-cyan);
    font-family: monospace;
    letter-spacing: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.5);
    animation: pulseText 1s infinite alternate;
}

@keyframes pulseText {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(102, 252, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: loadProgress 2s ease-in-out forwards;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    40% {
        width: 40%;
    }

    80% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

/* --- 核心布局 --- */
.index-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(102, 252, 241, 0.1);
    margin: 2rem;
    background: radial-gradient(circle at center, rgba(31, 40, 51, 0.2) 0%, transparent 70%);
}

/* --- 数字桥梁背景装饰 --- */
.digital-bridge-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 80%;
    max-width: 1000px;
    z-index: 0;
    /* 确保在内容之下，背景之上 */
    pointer-events: none;
    opacity: 0.6;
    /* 调高透明度，让霓虹感更强 */
    filter: drop-shadow(0 0 15px rgba(102, 252, 241, 0.4));
    /* 增加整体发光 */
}

.bridge-wireframe {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawBridge 3s ease-out forwards;
}

.anim-delay-1 {
    animation-delay: 0.5s;
}

@keyframes drawBridge {
    to {
        stroke-dashoffset: 0;
    }
}

.bridge-dot {
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 0.1;
        r: 10;
    }

    50% {
        opacity: 0.4;
        r: 15;
    }
}

/* 装饰角 */
.frame-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-cyan);
}

.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* --- 头部标题区 --- */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1.5s ease-out;
    z-index: 5;
    /* 确保文字在背景之上 */
    position: relative;
}

.system-status {
    font-family: monospace;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.main-title {
    font-family: var(--font-main);
    font-size: 5rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px var(--accent-cyan);
    position: relative;
    letter-spacing: 1rem;
    margin-bottom: 0.5rem;
}

.main-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(102, 252, 241, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        opacity: 0.5;
        filter: blur(2px);
    }

    to {
        opacity: 1;
        filter: blur(0px);
    }
}

.title-separator {
    width: 100px;
    height: 2px;
    background: var(--accent-cyan);
    margin: 1.5rem auto;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.sub-title {
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    color: var(--accent-blue);
    opacity: 0.8;
}

.intro-text {
    margin-top: 2rem;
    line-height: 1.8;
    font-size: 1rem;
    max-width: 600px;
    opacity: 0.7;
}

/* 主CTA按钮 */
.main-cta-btn {
    margin-top: 30px;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-family: monospace;
}

.main-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-cyan);
    z-index: -1;
    transition: width 0.3s ease;
}

.main-cta-btn:hover {
    color: #0b0c10;
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.6);
    transform: scale(1.05);
}

.main-cta-btn:hover::before {
    width: 100%;
}

.btn-icon {
    margin-right: 8px;
    font-size: 0.9em;
}

/* --- 导航网格 --- */
.nav-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    z-index: 5;
    position: relative;
    padding: 0 2rem;
    /* 新增：使用 perspective 增加3D空间感 */
    perspective: 1000px;
}

.nav-card {
    position: relative;
    background: rgba(31, 40, 51, 0.4);
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(102, 252, 241, 0.1);
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* 新增：初始状态 */
    flex: 1;
    min-width: 0;
    /* 防止 flex item 溢出 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 280px;
    /* 固定高度，统一视觉 */
}

/* 悬浮展开效果 */
.nav-card:hover {
    flex: 2.5;
    /* 悬浮时宽度增加 */
    background: rgba(31, 40, 51, 0.8);
    border-color: var(--accent-cyan);
    transform: translateY(-10px) rotateX(5deg);
    /* 微妙的3D倾斜 */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(102, 252, 241, 0.2);
    z-index: 10;
}

/* 未悬浮的卡片变暗 */
.nav-grid:hover .nav-card:not(:hover) {
    opacity: 0.5;
    transform: scale(0.95);
    filter: blur(2px);
}

.card-icon {
    font-family: 'Impact', sans-serif;
    /* 更硬朗的字体 */
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 10px;
    right: 15px;
    transition: all 0.5s;
    line-height: 1;
}

.nav-card:hover .card-icon {
    color: var(--accent-cyan);
    opacity: 0.2;
    transform: scale(1.5) translate(-10px, 10px);
}

.nav-card h3 {
    color: #fff;
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}

.nav-card:hover h3 {
    color: var(--accent-cyan);
}

.nav-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.5s;
}

.nav-card:hover p {
    transform: translateY(0);
    opacity: 1;
}

/* 底部发光条 */
.card-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.nav-card:hover .card-border {
    transform: scaleX(1);
}

/* 扫光动画 */
.nav-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.nav-card:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

/* --- 底部区 --- */
.index-footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4rem;
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.4;
    letter-spacing: 1px;
    z-index: 5;
}

/* --- 动画 --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .nav-grid {
        flex-direction: column; /* 移动端改为垂直排列 */
        height: auto;
    }

    .nav-card {
        width: 100%; /* 占满宽度 */
        height: 150px; /* 减小高度 */
        flex: none; /* 取消弹性伸缩 */
    }
    
    .nav-card:hover {
        transform: scale(1.02); /* 简单的放大 */
    }

    .main-title {
        font-size: 3rem;
    }

    .index-container {
        margin: 1rem;
        padding: 1rem;
    }
}