/*
 * 首页入口样式 - 科技风蓝色主色调
 * 汉柏利卫浴 MES系统
 */

/* ============ 基础重置 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #050a16;
    color: #e8f0fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ 背景效果 - 科技炫酷版 ============ */

/* 基础画布 - 暗色渐变动感底 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(20, 60, 140, 0.12), transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(60, 20, 140, 0.08), transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(0, 80, 180, 0.06), transparent 50%);
    animation: bg-shift 10s ease-in-out infinite alternate;
}

@keyframes bg-shift {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 主网格 */
.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* 次级网格 - 对角线菱形纹理增强科技感 */
.bg-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(59, 130, 246, 0.015) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(59, 130, 246, 0.015) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* 大光晕 - 动态呼吸 */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    animation: orb-drift 12s ease-in-out infinite;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
    animation: orb-drift 14s ease-in-out infinite reverse;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    top: 30%;
    right: 25%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.06), transparent 70%);
    animation: orb-drift 10s ease-in-out infinite 2s;
}

@keyframes orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    25% { transform: translate(40px, -30px) scale(1.08); opacity: 0.8; }
    50% { transform: translate(-20px, 20px) scale(0.95); opacity: 0.5; }
    75% { transform: translate(30px, 40px) scale(1.05); opacity: 0.7; }
}

/* CRT 扫描线 */
.scanline {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
}

/* ===== 旋转雷达环 ===== */
.bg-radar {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.06);
    animation: radar-rotate 20s linear infinite;
}

.bg-radar::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(50% + 20px);
    background: linear-gradient(to bottom,
        rgba(59, 130, 246, 0.4),
        rgba(34, 211, 238, 0.2),
        transparent
    );
    border-radius: 1px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

@keyframes radar-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 雷达内圈 */
.bg-radar-inner {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.05);
    animation: radar-rotate 15s linear infinite reverse;
}

.bg-radar-inner::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: calc(50% + 15px);
    background: linear-gradient(to bottom,
        rgba(34, 211, 238, 0.3),
        transparent
    );
}

/* 雷达刻度点 */
.bg-radar .ring-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.bg-radar .ring-dot:nth-child(1) { top: 50%; right: -2px; }
.bg-radar .ring-dot:nth-child(2) { top: 50%; left: -2px; }
.bg-radar .ring-dot:nth-child(3) { top: -2px; left: 50%; }
.bg-radar .ring-dot:nth-child(4) { bottom: -2px; left: 50%; }

/* ===== 星点粒子群 ===== */
.bg-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-stars::before,
.bg-stars::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 20% 40%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1.5px 1.5px at 30% 10%, rgba(59, 130, 246, 0.5), transparent),
        radial-gradient(1px 1px at 40% 60%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 50% 30%, rgba(34, 211, 238, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 70% 15%, rgba(59, 130, 246, 0.4), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 90% 80%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 15% 75%, rgba(34, 211, 238, 0.3), transparent),
        radial-gradient(1px 1px at 25% 55%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 35% 85%, rgba(59, 130, 246, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 45% 15%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(1px 1px at 65% 90%, rgba(34, 211, 238, 0.35), transparent),
        radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1.5px 1.5px at 85% 65%, rgba(59, 130, 246, 0.4), transparent),
        radial-gradient(1px 1px at 95% 25%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 5% 90%, rgba(34, 211, 238, 0.25), transparent),
        radial-gradient(1px 1px at 12% 45%, rgba(255, 255, 255, 0.15), transparent);
    animation: stars-twinkle 4s ease-in-out infinite alternate;
}

.bg-stars::after {
    animation-direction: alternate-reverse;
    animation-duration: 3s;
    opacity: 0.6;
}

@keyframes stars-twinkle {
    0% { opacity: 0.3; transform: translate(0, 0); }
    100% { opacity: 0.8; transform: translate(10px, -10px); }
}

/* ===== 流动数据线 ===== */
.bg-dataflow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.bg-dataflow-1 {
    top: 22%;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(90deg,
        transparent,
        transparent 20px,
        rgba(59, 130, 246, 0.15) 20px,
        rgba(59, 130, 246, 0.15) 22px,
        transparent 22px,
        transparent 40px
    );
    animation: dataflow-move 3s linear infinite;
}

.bg-dataflow-2 {
    top: 72%;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(90deg,
        transparent,
        transparent 15px,
        rgba(34, 211, 238, 0.1) 15px,
        rgba(34, 211, 238, 0.1) 17px,
        transparent 17px,
        transparent 30px
    );
    animation: dataflow-move 2.5s linear infinite reverse;
}

.bg-dataflow-3 {
    top: 10%;
    bottom: 10%;
    left: 8%;
    width: 1px;
    background: repeating-linear-gradient(180deg,
        transparent,
        transparent 12px,
        rgba(99, 102, 241, 0.1) 12px,
        rgba(99, 102, 241, 0.1) 14px,
        transparent 14px,
        transparent 24px
    );
    animation: dataflow-move-v 4s linear infinite;
}

.bg-dataflow-4 {
    top: 15%;
    bottom: 15%;
    right: 5%;
    width: 1px;
    background: repeating-linear-gradient(180deg,
        transparent,
        transparent 18px,
        rgba(59, 130, 246, 0.08) 18px,
        rgba(59, 130, 246, 0.08) 20px,
        transparent 20px,
        transparent 36px
    );
    animation: dataflow-move-v 3.5s linear infinite reverse;
}

@keyframes dataflow-move {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

@keyframes dataflow-move-v {
    0% { background-position: 0 0; }
    100% { background-position: 0 24px; }
}

/* ===== 扩散脉冲环 ===== */
.bg-pulse-ring {
    position: fixed;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(59, 130, 246, 0.08);
    transform: translate(-50%, -50%);
    animation: pulse-ring-expand 4s ease-out infinite;
}

.bg-pulse-ring:nth-child(2) {
    animation-delay: 1.3s;
}

.bg-pulse-ring:nth-child(3) {
    animation-delay: 2.6s;
    border-color: rgba(34, 211, 238, 0.06);
}

@keyframes pulse-ring-expand {
    0% { width: 100px; height: 100px; opacity: 0.5; border-width: 2px; }
    100% { width: 700px; height: 700px; opacity: 0; border-width: 1px; }
}

/* ===== 角落科技边框 ===== */
.bg-corner {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.bg-corner-tl {
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-top: 2px solid rgba(59, 130, 246, 0.2);
    border-left: 2px solid rgba(59, 130, 246, 0.2);
}

.bg-corner-tr {
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-top: 2px solid rgba(59, 130, 246, 0.2);
    border-right: 2px solid rgba(59, 130, 246, 0.2);
}

.bg-corner-bl {
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    border-left: 2px solid rgba(59, 130, 246, 0.2);
}

.bg-corner-br {
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    border-right: 2px solid rgba(59, 130, 246, 0.2);
}

/* 角落附加小角标 */
.bg-corner-tl::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 8px;
    height: 8px;
    border-top: 1px solid rgba(34, 211, 238, 0.25);
    border-left: 1px solid rgba(34, 211, 238, 0.25);
}

.bg-corner-br::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.25);
    border-right: 1px solid rgba(34, 211, 238, 0.25);
}

/* 边沿发光条 */
.bg-edge {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.bg-edge-top {
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.08) 20%,
        rgba(59, 130, 246, 0.3) 40%,
        rgba(34, 211, 238, 0.4) 50%,
        rgba(59, 130, 246, 0.3) 60%,
        rgba(59, 130, 246, 0.08) 80%,
        transparent 100%
    );
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
    animation: edge-pulse 3s ease-in-out infinite;
}

.bg-edge-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.05) 20%,
        rgba(99, 102, 241, 0.2) 40%,
        rgba(99, 102, 241, 0.3) 50%,
        rgba(99, 102, 241, 0.2) 60%,
        rgba(59, 130, 246, 0.05) 80%,
        transparent 100%
    );
    animation: edge-pulse 4s ease-in-out infinite 1s;
}

@keyframes edge-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ===== 星座粒子连接线 ===== */
.bg-constellation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
}

/* 使用多点渐变模拟星点之间的连线 */
.bg-constellation::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        /* 斜向连线组 1 */
        linear-gradient(45deg,
            transparent calc(50% - 1px),
            rgba(59, 130, 246, 0.2) calc(50%),
            transparent calc(50% + 1px)
        ),
        linear-gradient(-30deg,
            transparent calc(50% - 0.5px),
            rgba(34, 211, 238, 0.12) calc(50%),
            transparent calc(50% + 0.5px)
        ),
        linear-gradient(60deg,
            transparent calc(50% - 0.5px),
            rgba(99, 102, 241, 0.1) calc(50%),
            transparent calc(50% + 0.5px)
        );
    background-size: 100% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position:
        15% 20%, 70% 60%, 40% 75%;
    animation: constel-pulse 6s ease-in-out infinite alternate;
}

@keyframes constel-pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 暗角效果 - 增加画面深度 */
.bg-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

/* ============ 登录遮罩 ============ */
#login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050a16;
    display: flex;
    align-items: center;
    justify-content: center;
}

#login-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(0, 168, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(100, 80, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-box {
    position: relative;
    width: 400px;
    padding: 48px 40px 40px;
    background: linear-gradient(135deg, rgba(10, 18, 48, 0.95), rgba(6, 10, 24, 0.98));
    border: 1px solid rgba(0, 168, 255, 0.35);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(0, 168, 255, 0.08),
        inset 0 1px 0 rgba(0, 168, 255, 0.1);
    text-align: center;
    animation: login-enter 0.5s ease;
}

@keyframes login-enter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.6), transparent);
}

.login-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border: 2px solid rgba(0, 168, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 168, 255, 0.08);
    box-shadow: 0 0 40px rgba(0, 168, 255, 0.15);
}

.login-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: #00a8ff;
    stroke-width: 2;
}

.login-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: #e8f0fa;
    margin-bottom: 6px;
    letter-spacing: 3px;
}

.login-box .login-sub {
    font-size: 13px;
    color: #6078a0;
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.login-form {
    text-align: left;
}

.login-form label {
    display: block;
    font-size: 14px;
    color: #90a8ca;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.25);
    border-radius: 8px;
    color: #e8f0fa;
    font-size: 18px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.login-form input[type="password"] {
    letter-spacing: 4px;
}

.login-form input:focus {
    border-color: #00a8ff;
    box-shadow: 0 0 30px rgba(0, 168, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
    font-size: 14px;
}

.login-form .login-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.login-form .login-btn:hover {
    background: linear-gradient(135deg, #0097e6, #007bff);
    box-shadow: 0 0 40px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

.login-form .login-btn:active {
    transform: translateY(0);
}

#login-error {
    margin-top: 12px;
    font-size: 14px;
    color: #ff4757;
    text-align: center;
    min-height: 20px;
    letter-spacing: 1px;
}

#login-error.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ============ 主内容区 ============ */
#main-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#main-content.visible {
    opacity: 1;
}

/* ============ 头部 ============ */
header {
    position: relative;
    text-align: center;
    padding: 48px 20px 32px;
    flex-shrink: 0;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.4), transparent);
}

header h1 {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 40%, #9c88ff 70%, #00d4ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-shimmer 5s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

@keyframes title-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header h1::after {
    content: '汉柏利卫浴';
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(0, 212, 255, 0.4), 0 0 120px rgba(156, 136, 255, 0.2);
    filter: blur(16px);
    opacity: 0.7;
    animation: title-glow 5s ease-in-out infinite;
}

@keyframes title-glow {
    0% { opacity: 0.6; filter: blur(16px); }
    50% { opacity: 1; filter: blur(20px); }
    100% { opacity: 0.6; filter: blur(16px); }
}

header .subtitle {
    font-size: 15px;
    color: #6078a0;
    margin-top: 12px;
    letter-spacing: 8px;
    font-weight: 300;
}

/* ============ 角落装饰 ============ */
.header-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
}

.header-decoration.top-left {
    top: 20px;
    left: 30px;
    border-top: 2px solid rgba(0, 168, 255, 0.15);
    border-left: 2px solid rgba(0, 168, 255, 0.15);
}

.header-decoration.top-right {
    top: 20px;
    right: 30px;
    border-top: 2px solid rgba(0, 168, 255, 0.15);
    border-right: 2px solid rgba(0, 168, 255, 0.15);
}

/* ============ 模块网格 ============ */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 20px 40px 40px;
    min-height: 0;
    flex-wrap: wrap;
    align-content: center;
    max-width: 1300px;
    margin: 0 auto;
}

.module-card {
    width: 340px;
    min-height: auto;
    background: linear-gradient(160deg, rgba(8, 24, 64, 0.92), rgba(4, 12, 36, 0.96));
    border: 1px solid rgba(0, 120, 220, 0.3);
    border-radius: 16px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 100, 200, 0.06);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: card-enter 0.6s ease backwards;
}

.module-card:nth-child(1) { animation-delay: 0.1s; }
.module-card:nth-child(2) { animation-delay: 0.18s; }
.module-card:nth-child(3) { animation-delay: 0.26s; }
.module-card:nth-child(4) { animation-delay: 0.34s; }
.module-card:nth-child(5) { animation-delay: 0.42s; }

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.5), transparent);
}

.module-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.module-card:hover {
    border-color: rgba(0, 168, 255, 0.5);
    box-shadow:
        0 12px 60px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 168, 255, 0.12);
    transform: translateY(-4px);
}

.module-card:hover::after {
    opacity: 1;
}

/* 卡片标题区 */
.module-card .card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 28px 16px;
    border-bottom: 1px solid rgba(0, 120, 220, 0.15);
    background: linear-gradient(90deg, rgba(0, 80, 180, 0.08), transparent);
}

.module-card .card-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 120, 220, 0.15);
    border: 1px solid rgba(0, 120, 220, 0.25);
}

.module-card .card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #40b8ff;
    stroke-width: 1.8;
}

.module-card .card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #e8f0fa;
    margin: 0;
    letter-spacing: 3px;
}

/* 卡片内容区 */
.module-card .card-body {
    flex: 1;
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(0, 30, 70, 0.45), rgba(0, 15, 45, 0.5));
    border: 1px solid rgba(0, 100, 200, 0.15);
    border-radius: 10px;
    text-decoration: none;
    color: #c8d8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sub-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 3px;
    background: linear-gradient(180deg, #0088ff, #40b8ff);
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s ease;
}

.sub-entry:hover {
    background: linear-gradient(135deg, rgba(0, 60, 140, 0.5), rgba(0, 30, 80, 0.5));
    border-color: rgba(0, 140, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 120, 220, 0.12), inset 0 0 20px rgba(0, 100, 200, 0.05);
    transform: translateX(4px);
    color: #ffffff;
}

.sub-entry:hover::before {
    opacity: 1;
}

.sub-entry .entry-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 80, 180, 0.2);
    border: 1px solid rgba(0, 100, 200, 0.2);
}

.sub-entry:hover .entry-icon {
    background: rgba(0, 120, 220, 0.3);
    border-color: rgba(0, 140, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 120, 220, 0.15);
}

.sub-entry .entry-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #50b8ff;
    stroke-width: 1.8;
}

.sub-entry:hover .entry-icon svg {
    stroke: #70d0ff;
}

.sub-entry .entry-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #d0e0f8;
}

.sub-entry:hover .entry-text {
    color: #ffffff;
}

.sub-entry .entry-arrow {
    font-size: 18px;
    color: rgba(0, 120, 220, 0.3);
    transition: all 0.3s ease;
}

.sub-entry:hover .entry-arrow {
    color: #60c0ff;
    transform: translateX(6px);
}

/* ============ 卡片展开提示 ============ */
.card-expand-hint {
    font-size: 12px;
    color: #4a7aaa;
    letter-spacing: 1px;
    margin-left: auto;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.module-card:hover .card-expand-hint {
    opacity: 1;
    color: #60c0ff;
}

/* ============ 模块弹窗 ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(2, 6, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.modal-overlay.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    background: linear-gradient(160deg, rgba(10, 24, 56, 0.98), rgba(4, 10, 28, 0.98));
    border: 1px solid rgba(0, 140, 255, 0.3);
    border-radius: 16px;
    box-shadow:
        0 20px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(0, 100, 200, 0.1);
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.modal-visible .modal-container {
    transform: scale(1) translateY(0);
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.5), transparent);
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 22px 28px 16px;
    border-bottom: 1px solid rgba(0, 120, 220, 0.15);
    background: linear-gradient(90deg, rgba(0, 80, 180, 0.08), transparent);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #e8f0fa;
    margin: 0;
    letter-spacing: 3px;
    flex: 1;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 120, 220, 0.25);
    border-radius: 8px;
    background: rgba(0, 80, 180, 0.15);
    color: #80b0e0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    font-family: inherit;
}

.modal-close-btn:hover {
    background: rgba(200, 60, 60, 0.25);
    border-color: rgba(200, 60, 60, 0.4);
    color: #ff6b6b;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 55vh;
}

/* 弹窗内子条目 */
.modal-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(0, 30, 70, 0.45), rgba(0, 15, 45, 0.5));
    border: 1px solid rgba(0, 100, 200, 0.15);
    border-radius: 10px;
    text-decoration: none;
    color: #c8d8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: modal-entry-enter 0.4s ease backwards;
}

.modal-entry:nth-child(1) { animation-delay: 0.05s; }
.modal-entry:nth-child(2) { animation-delay: 0.1s; }
.modal-entry:nth-child(3) { animation-delay: 0.15s; }

@keyframes modal-entry-enter {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 3px;
    background: linear-gradient(180deg, #0088ff, #40b8ff);
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-entry:hover {
    background: linear-gradient(135deg, rgba(0, 60, 140, 0.5), rgba(0, 30, 80, 0.5));
    border-color: rgba(0, 140, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 120, 220, 0.12), inset 0 0 20px rgba(0, 100, 200, 0.05);
    transform: translateX(4px);
    color: #ffffff;
}

.modal-entry:hover::before {
    opacity: 1;
}

.modal-entry-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 80, 180, 0.2);
    border: 1px solid rgba(0, 100, 200, 0.2);
}

.modal-entry:hover .modal-entry-icon {
    background: rgba(0, 120, 220, 0.3);
    border-color: rgba(0, 140, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 120, 220, 0.15);
}

.modal-entry-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #50b8ff;
    stroke-width: 1.8;
}

.modal-entry:hover .modal-entry-icon svg {
    stroke: #70d0ff;
}

.modal-entry-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #d0e0f8;
}

.modal-entry:hover .modal-entry-text {
    color: #ffffff;
}

.modal-entry-arrow {
    font-size: 18px;
    color: rgba(0, 120, 220, 0.3);
    transition: all 0.3s ease;
}

.modal-entry:hover .modal-entry-arrow {
    color: #60c0ff;
    transform: translateX(6px);
}

/* ============ 弹窗响应式 ============ */
@media (max-height: 600px) {
    .modal-container {
        max-height: 90vh;
    }
    .modal-body {
        max-height: 65vh;
    }
    .modal-header {
        padding: 14px 20px 10px;
    }
    .modal-body {
        padding: 12px 16px 16px;
    }
}

/* ============ 页脚 ============ */
footer {
    flex-shrink: 0;
    text-align: center;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 168, 255, 0.08);
}

footer p {
    font-size: 12px;
    color: #3a5070;
    letter-spacing: 2px;
}

/* ============ 隐藏工具类 ============ */
.hidden {
    display: none !important;
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
    main {
        gap: 24px;
        padding: 16px 24px 24px;
    }

    .module-card {
        width: 300px;
    }

    .card-expand-hint {
        display: none;
    }
}

@media (max-width: 700px) {
    main {
        flex-direction: column;
        gap: 20px;
        padding: 12px 16px 20px;
        max-width: 100%;
    }

    .module-card {
        width: 100%;
        max-width: 360px;
    }

    header h1 {
        font-size: 36px;
        letter-spacing: 12px;
    }

    header .subtitle {
        font-size: 13px;
        letter-spacing: 4px;
    }

    header {
        padding: 32px 16px 24px;
    }

    .header-decoration {
        display: none;
    }

    .login-box {
        width: 90%;
        max-width: 380px;
        padding: 36px 24px 32px;
    }

    .modal-container {
        width: 95vw;
        max-height: 85vh;
    }

    .modal-body {
        max-height: 60vh;
        padding: 16px;
    }

    .modal-header {
        padding: 16px 20px 12px;
    }
}
