:root {
    --bg-color: #000;
    --card-width: 320px;
    --card-height: 180px;
    --purple: #a855f7;
    --beam-h: 235px;
    --red: #ef4444;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

/* --- 系统头部一致性 --- */
.system-header {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 500000;
}

.header-frame {
    position: relative;
    padding: 14px 22px;
    background: rgba(168, 85, 247, 0.25);
    border-left: 3px solid var(--purple);
    clip-path: polygon(0 0, 96% 0, 100% 20%, 100% 100%, 0 100%);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #fff;
    letter-spacing: 2.5px;
    opacity: 1;
    font-weight: 700;
}

.header-slogan {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.header-metadata {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #ffffff !important;
    display: flex;
    gap: 12px;
    letter-spacing: 1.2px;
    align-items: center;
}

.header-metadata span {
    color: #ffffff !important;
}

/* ---------------------------------------------------- */
/* 核心修正：下轨道（白卡形态）的全量颜色极性转换 */
.track-lower .card.base {
    z-index: 5;
    background: #ffffff;
    clip-path: inset(0 100% 0 0);
}

/* 下轨道白色卡片下半部分：背景、文字、甚至小高亮标签全部变黑 */
.track-lower .card.base .card-bottom {
    background: rgba(0, 0, 0, 0.05);
    color: #000000 !important;
    /* 强制底部文字变黑 */
}

/* 这里的关键：强制解决 STATUS/CORE 等标签在白底上不可见的问题 */
.track-lower .card.base .highlight {
    color: #000000 !important;
    opacity: 0.85;
}

.track-lower .card.base .card-main-title,
.track-lower .card.base .card-halo {
    color: #000000 !important;
}

/* ---------------------------------------------------- */
/* 上轨道（黑卡形态）保持常态 */
.track-upper .card.base {
    z-index: 5;
    background: #0d1117;
    clip-path: inset(0 100% 0 0);
}

.track-upper .card.base .card-bottom {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

/* ---------------------------------------------------- */
/* 布局与动画（保持顶级稳定） */
.main-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-top: 250vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 110px;
    padding-top: 100px; /* 控制内容中心下移 50px */
    padding-bottom: 0px;
    box-sizing: border-box;
    z-index: 20;
    background-image: radial-gradient(circle at 10% 20%, #1a1a35 0%, #000 100%);
    box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.8);
}

.central-hero-text {
    position: absolute;
    top: calc(50% + 50px); /* 保持与轨道同步下移 50px */
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: left;
    width: auto;
    min-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
}

.hero-main {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 14px;
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    white-space: nowrap;
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

.card-wrapper {
    position: absolute;
    width: var(--card-width);
    height: var(--card-height);
    will-change: transform;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    z-index: 100;
    transition: filter 0.2s ease, box-shadow 0.3s ease;
}

.card-wrapper:hover {
    filter: brightness(1.2) contrast(1.1);
    z-index: 99999;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.4s;
}

.card-wrapper:hover .card {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* 扫过之前的灰色初始态维持不变 */
.card.aurora {
    z-index: 1;
    background: #000;
}

.card.aurora .card-top {
    background: linear-gradient(135deg, #4f46e5, #a855f7, #db2711);
    background-size: 300% 300%;
    animation: aurora-f-run 6s linear infinite;
}

.card.aurora .card-bottom {
    background: rgba(45, 45, 60, 0.9);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.82);
}

.card-top {
    height: 60%;
    padding: 2rem 2.4rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-bottom {
    flex: 1;
    padding: 1.2rem 2.4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.72rem;
}

.card-halo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 3px;
}

.card-main-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
}

.highlight {
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
}

.carousel-track {
    position: relative;
    width: 100vw;
    height: var(--card-height);
    overflow: visible;
}

.track-upper .scan-beam-wrapper {
    left: 65%;
}

.track-lower .scan-beam-wrapper {
    left: 35%;
}

.scan-beam-wrapper {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: var(--beam-h);
    z-index: 999999999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.beam-core {
    position: absolute;
    width: 4.5px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #fff 15%, #fff 85%, transparent);
    box-shadow: 0 0 15px #fff, 0 0 40px var(--purple);
    z-index: 100;
}

.beam-aura {
    position: absolute;
    width: 110px;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--purple) 20%, transparent 80%);
    border-radius: 100% / 50%;
    filter: blur(20px);
    opacity: 0.85;
    z-index: 10;
    animation: spindle-pulse-run 3s ease-in-out infinite;
}

@keyframes aurora-f-run {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes spindle-pulse-run {

    0%,
    100% {
        transform: scaleX(0.85);
        opacity: 0.6;
    }

    50% {
        transform: scaleX(1.4);
        opacity: 1;
    }
}

@keyframes sensor-ring {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }

    100% {
        width: 35px;
        height: 35px;
        opacity: 0;
    }
}

/* --- 视差滚动 --- */
.parallax-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    background-color: #000;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.layer-grid {
    background-image: linear-gradient(rgba(168, 85, 247, 0.2) 1px, transparent 1px), linear-gradient(90deg, rgba(168, 85, 247, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    transform-origin: center bottom;
    transform: perspective(1000px) rotateX(60deg) translateY(-80px) translateZ(-250px);
    animation: grid-move 5s linear infinite;
    border-bottom: 2px solid var(--purple);
    box-shadow: 0 10px 80px rgba(168, 85, 247, 0.5);
    opacity: 0.8;
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 50px;
    }
}

.parallax-content {
    position: relative;
    z-index: 20;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.glitch-text {
    font-size: 5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 12px;
    text-shadow: 0 0 25px var(--purple);
    margin: 0;
    position: relative;
}

.cyber-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: #a855f7;
    letter-spacing: 5px;
    animation: pulse 2.5s infinite;
}

.scroll-indicator {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.scroll-indicator .arrow {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--purple));
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* --- 天气面板模块 --- */
.weather-panel {
    position: absolute; right: 60px; top: 40%; 
    width: 240px; background: rgba(168, 85, 247, 0.05); border: 1px solid rgba(168, 85, 247, 0.2);
    border-right: 4px solid var(--purple); padding: 25px; color: #fff;
    backdrop-filter: blur(15px); font-family: 'JetBrains Mono', monospace;
    z-index: 100; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
    pointer-events: auto;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.location-tag { font-size: 0.65rem; letter-spacing: 3px; color: rgba(255,255,255,0.4); font-weight: 700; }
.connection-light { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; animation: status-pulse 2s infinite; }

.weather-display { display: flex; flex-direction: column; gap: 20px; }
.day-label { font-size: 0.6rem; color: rgba(255,255,255,0.3); letter-spacing: 2px; }
.temp-main { font-size: 2.8rem; font-weight: 800; margin: 10px 0; color: #fff; text-shadow: 0 0 20px rgba(168, 85, 247, 0.4); }
.weather-status { font-size: 0.75rem; color: var(--purple); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.temp-sub { font-size: 1.1rem; font-weight: 700; margin: 8px 0; letter-spacing: 1px; }

.day-divider { height: 1px; background: linear-gradient(90deg, rgba(168,85,247,0.4), transparent); }

.weather-panel .scan-line {
    position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    animation: weather-panel-scan 4s linear infinite; opacity: 0.5;
}

@keyframes weather-panel-scan { 0% { top: 0; } 100% { top: 100%; } }
@keyframes status-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

/* --- 环境守卫样式 --- */
.guard-wrapper {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(40px);
    z-index: 10000000; display: flex; justify-content: center; align-items: center;
    color: #fff; font-family: 'Inter', sans-serif;
}
.guard-box {
    width: 90%; max-width: 600px; padding: 40px; border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(20, 20, 25, 0.8); position: relative; overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 95% 100%, 0 100%);
}
.guard-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.warning-icon { width: 40px; height: 40px; background: #ef4444; color: #fff; display: flex; justify-content: center; align-items: center; font-weight: 900; border-radius: 4px; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
.guard-title { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; letter-spacing: 2px; color: #ef4444; font-weight: 800; }
.main-msg { line-height: 1.8; opacity: 0.9; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; font-size: 0.95rem; }
.info-section { margin-bottom: 25px; }
.info-label { font-size: 0.7rem; color: rgba(255,255,255,0.4); letter-spacing: 2px; margin-bottom: 8px; display: block; font-weight: 800; }
.alert { padding: 15px; background: rgba(255,255,255,0.03); border-left: 3px solid #ef4444; }
.guard-box .scan-bar { position: absolute; left: 0; width: 100%; height: 2px; background: #ef4444; opacity: 0.3; animation: guard-scan-run 2.5s linear infinite; }
@keyframes guard-scan-run { 0% { top: 0; } 100% { top: 100%; } }