/* 主题色变量 */
:root {
    --primary-dark: #0A1A2F;
    /* 深空蓝 */
    --primary-neon: #00FFD1;
    /* 霓虹青 */
    --warning-red: #FF4D4D;
    /* 警戒红 */
    --glass-bg: rgba(10, 26, 47, 0.8);
    --glass-border: rgba(0, 255, 209, 0.2);
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-dark);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 粒子背景 */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 玻璃拟态效果 */
.glass-panel {
    background: rgba(10, 26, 47, 0.8);
    border: 1px solid rgba(0, 255, 209, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* 霓虹文字效果 */
.neon-text {
    color: var(--primary-neon);
    text-shadow: 0 0 5px rgba(0, 255, 209, 0.5),
        0 0 10px rgba(0, 255, 209, 0.5),
        0 0 15px rgba(0, 255, 209, 0.5),
        0 0 20px rgba(0, 255, 209, 0.5),
        0 0 25px rgba(0, 255, 209, 0.5),
        0 0 30px rgba(0, 255, 209, 0.5);
    animation: neon-pulse 1.5s infinite alternate;
}

/* 动画关键帧 */
@keyframes neon-pulse {
    from {
        text-shadow: 0 0 5px rgba(0, 255, 209, 0.5),
            0 0 10px rgba(0, 255, 209, 0.5),
            0 0 15px rgba(0, 255, 209, 0.5),
            0 0 20px rgba(0, 255, 209, 0.5);
    }

    to {
        text-shadow: 0 0 5px rgba(0, 255, 209, 0.5),
            0 0 10px rgba(0, 255, 209, 0.5),
            0 0 15px rgba(0, 255, 209, 0.5),
            0 0 20px rgba(0, 255, 209, 0.5),
            0 0 25px rgba(0, 255, 209, 0.5),
            0 0 30px rgba(0, 255, 209, 0.5),
            0 0 35px rgba(0, 255, 209, 0.5);
    }
}

/* 首页特定样式 */
.home-container {
    padding: 40px;
    min-height: 100vh;
    background: var(--primary-dark);
}

.hero-section {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.system-intro {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    margin: 20px 0;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.feature-card {
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-icon {
    font-size: 2em;
    margin-bottom: 15px;
}

/* 导航菜单样式 */
.nav-menu {
    padding: 0 20px;
    line-height: 60px;
    border: none;
}

.nav-menu.glass-panel {
    background: var(--glass-bg);
}

/* 动画效果 */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.page-transition-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

/* 导航栏占位符初始状态 */
#nav-placeholder {
    min-height: 100px;
    visibility: hidden;
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
}

/* 导航栏基础样式 */
.nav-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 40px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 26, 47, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 0 32px rgba(0, 255, 209, 0.05);
    border-radius: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* 导航标题容器样式 */
.nav-title {
    margin-right: auto;
    padding-right: 40px;
}

/* 导航链接容器样式 */
.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
    margin-left: 0;  /* 确保没有左边距 */
}

/* 用户信息区域样式 */
.user-info {
    margin-left: auto;  /* 将用户信息推到最右边 */
}

/* 导航栏悬停效果 */
.nav-container:hover {
    background: rgba(10, 26, 47, 0.65);
    border-color: rgba(0, 255, 209, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 32px rgba(0, 255, 209, 0.1);
}

/* 系统标题样式 */
h1.system-title,
.nav-title h1,
.neon-text {
    color: #00FFFF;
    font-size: 20px;
    font-weight: bold;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4);
    animation: titleGlow 2s ease-in-out infinite;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
}

/* 标题发光动画 */
@keyframes titleGlow {
    0%,
    100% {
        text-shadow:
            0 0 10px rgba(0, 255, 255, 0.8),
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 30px rgba(0, 255, 255, 0.4);
    }

    50% {
        text-shadow:
            0 0 15px rgba(0, 255, 255, 0.9),
            0 0 25px rgba(0, 255, 255, 0.7),
            0 0 35px rgba(0, 255, 255, 0.5);
    }
}

/* 添加霓虹灯边框效果 */
.nav-title h1::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(8px);
    animation: neonPulse 3s ease-in-out infinite;
    opacity: 0.7;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-title h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            #00FFFF,
            transparent);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0% {
        filter: blur(8px);
        opacity: 0.7;
    }

    50% {
        filter: blur(12px);
        opacity: 0.9;
    }

    100% {
        filter: blur(8px);
        opacity: 0.7;
    }
}

@keyframes borderGlow {
    0% {
        background: linear-gradient(90deg,
                transparent,
                rgba(0, 255, 209, 0.5),
                transparent);
        box-shadow:
            0 0 5px rgba(0, 255, 209, 0.2),
            0 0 10px rgba(0, 255, 209, 0.2);
    }

    50% {
        background: linear-gradient(90deg,
                transparent,
                rgba(0, 255, 209, 0.8),
                transparent);
        box-shadow:
            0 0 10px rgba(0, 255, 209, 0.4),
            0 0 20px rgba(0, 255, 209, 0.2),
            0 0 30px rgba(0, 255, 209, 0.1);
    }

    100% {
        background: linear-gradient(90deg,
                transparent,
                rgba(0, 255, 209, 0.5),
                transparent);
        box-shadow:
            0 0 5px rgba(0, 255, 209, 0.2),
            0 0 10px rgba(0, 255, 209, 0.2);
    }
}

/* 导航链接基础样式 */
.nav-links .nav-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

/* 导航项悬停效果 */
.nav-links .nav-item:hover {
    color: #00FFFF;
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
}

/* 导航项图标样式 */
.nav-links .nav-item i {
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.nav-links .nav-item:hover i {
    color: #00FFFF;
    transform: scale(1.15) rotate(5deg);
}

/* 激活状态样式 */
.nav-links .nav-item.active {
    color: #ffffff;
    background: rgba(0, 255, 255, 0.25);
    border-color: #00FFFF;
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.5),
        0 0 60px rgba(0, 255, 255, 0.3),
        0 0 90px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 激活状态的发光效果 */
.nav-links .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center,
            rgba(0, 255, 255, 0.4) 0%,
            rgba(0, 255, 255, 0.2) 30%,
            transparent 70%);
    animation: activeGlow 2s ease-in-out infinite;
    z-index: 1;
}

/* 激活状态的底部指示器 */
.nav-links .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 4px;
    background: linear-gradient(90deg,
            transparent,
            #00FFFF,
            #ffffff,
            #00FFFF,
            transparent);
    border-radius: 4px;
    animation: indicatorPulse 2s ease-in-out infinite;
    box-shadow:
        0 0 20px #00FFFF,
        0 0 40px rgba(0, 255, 255, 0.5);
}

/* 激活状态的图标样式 */
.nav-links .nav-item.active i {
    color: #ffffff;
    transform: scale(1.2);
    animation: iconFloat 2s ease-in-out infinite;
    text-shadow:
        0 0 10px #00FFFF,
        0 0 20px #00FFFF,
        0 0 30px rgba(0, 255, 255, 0.8);
}

@keyframes activeGlow {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes indicatorPulse {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 40px rgba(0, 255, 255, 0.4);
        opacity: 0.9;
    }

    50% {
        box-shadow:
            0 0 30px rgba(0, 255, 255, 0.8),
            0 0 60px rgba(0, 255, 255, 0.6);
        opacity: 1;
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: scale(1.2) translateY(0);
    }

    50% {
        transform: scale(1.2) translateY(-2px);
    }
}

/* 添加点击反馈效果 */
.nav-links .nav-item:active {
    transform: scale(0.98) translateY(0);
    transition: all 0.1s ease-in-out;
}

/* 确保激活状态的文本在发光效果之上 */
.nav-links .nav-item span {
    position: relative;
    z-index: 2;
}

/* 用户信息区域 */
.user-info {
    display: flex;
    align-items: center;
}

.user-info .login-btn {
    text-decoration: none;
    color: #00FFD1;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 16px;
    border: 1.5px solid rgba(0, 255, 209, 0.4);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 255, 209, 0.05);
}

.user-info .login-btn:hover {
    background: rgba(0, 255, 209, 0.15);
    border-color: #00FFD1;
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 255, 209, 0.2),
        0 0 40px rgba(0, 255, 209, 0.1);
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu .username {
    color: var(--primary-neon);
    font-weight: 500;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: rgba(10, 26, 47, 0.98);
    border: 1px solid rgba(0, 255, 209, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
}

.dropdown-menu a:hover {
    background: rgba(0, 255, 209, 0.1);
    color: var(--primary-neon);
    padding-left: 20px;
}

@keyframes navFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 光效背景 */
.light-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.light-beam {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(0, 255, 209, 0.3),
            transparent);
    animation: beam-move 8s infinite;
}

.light-beam:nth-child(1) {
    left: 20%;
    animation-delay: -2s;
}

.light-beam:nth-child(2) {
    left: 50%;
    animation-delay: -4s;
}

.light-beam:nth-child(3) {
    left: 80%;
    animation-delay: -6s;
}

@keyframes beam-move {
    0% {
        transform: translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateY(100%) rotate(45deg);
    }
}

/* 调整主要内容区域的上边距 */
main {
    padding-top: 50px;
}

/* 数据大屏特殊样式 */
.dashboard-nav {
    height: 40px !important;
}

.dashboard-container {
    padding-top: 50px !important;
}

/* 调整其他页面容器的上边距 */
.feedback-container,
.analysis-container,
.alerts-container,
.hot-topics-container {
    padding-top: 120px !important;
}

/* 添加渐变装饰线 */
.nav-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 255, 209, 0.2),
            transparent);
}

.nav-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 255, 209, 0.1),
            transparent);
}

.system-title {
    color: #00FFFF;
    font-size: 32px;
    font-weight: bold;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2);
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(0, 255, 255, 0.5),
            0 0 20px rgba(0, 255, 255, 0.3),
            0 0 30px rgba(0, 255, 255, 0.2);
    }

    50% {
        text-shadow:
            0 0 15px rgba(0, 255, 255, 0.6),
            0 0 25px rgba(0, 255, 255, 0.4),
            0 0 35px rgba(0, 255, 255, 0.3);
    }
}