:root {
    --bg-deep: #04040c;
    --bg-card: rgba(12, 12, 28, 0.8);
    --neon-cyan: #00f0ff;
    --neon-blue: #4d7cff;
    --neon-purple: #a855f7;
    --text-primary: #e2e2f0;
    --text-secondary: #b0b0cc;
    --text-dim: #70709a;
    --footer-bg: #03030b;
    --border-glow: rgba(0, 230, 250, 0.45);
    --border-card: rgba(70, 90, 160, 0.35);
    --shadow-neon: 0 0 22px rgba(0, 210, 240, 0.35), 0 0 50px rgba(0, 180, 220, 0.15);
    --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#particleCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    pointer-events: none; filter: drop-shadow(0 0 6px rgba(0, 160, 220, 0.15));
}

.bg-ornament { position: fixed; pointer-events: none; z-index: 0; opacity: 0.12; }
.bg-ornament.corner-tl {
    top: -30px; left: -30px; width: 260px; height: 260px;
    border-top: 1.5px solid rgba(0, 200, 240, 0.5); border-left: 1.5px solid rgba(0, 200, 240, 0.5);
    border-radius: 0 0 60px 0;
}
.bg-ornament.corner-br {
    bottom: -30px; right: -30px; width: 260px; height: 260px;
    border-bottom: 1.5px solid rgba(0, 200, 240, 0.5); border-right: 1.5px solid rgba(0, 200, 240, 0.5);
    border-radius: 60px 0 0 0;
}
.bg-ornament.ring {
    top: 15%; right: 5%; width: 180px; height: 180px;
    border: 1.2px dashed rgba(0, 210, 255, 0.25); border-radius: 50%;
    animation: rotateSlow 80s linear infinite;
}
@keyframes rotateSlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 桌面端默认面板样式 */
.system-status-panel {
    position: fixed; top: 18px; left: 18px; z-index: 20;
    background: rgba(5, 5, 18, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 200, 240, 0.3); border-radius: 12px;
    padding: 12px 18px; font-family: var(--font-mono);
    font-size: 0.78rem; color: var(--text-secondary);
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 180, 230, 0.25);
    display: flex; flex-direction: column; gap: 8px; min-width: 190px;
    transition: all 0.3s ease; opacity: 0;
}
.system-status-panel:hover { border-color: rgba(0, 220, 255, 0.7); box-shadow: 0 0 38px rgba(0, 0, 0, 0.8), 0 0 22px rgba(0, 200, 240, 0.5); background: rgba(8, 8, 24, 0.85); }
.status-indicator { display: flex; align-items: center; gap: 7px; color: #b0f0b0; font-weight: 500; letter-spacing: 0.03em; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #5eff6b; box-shadow: 0 0 10px #1eff2e, 0 0 16px rgba(30, 255, 46, 0.5); animation: statusPulse 2s infinite; }
@keyframes statusPulse { 0%, 100% { box-shadow: 0 0 10px #1eff2e, 0 0 16px rgba(30, 255, 46, 0.5); } 50% { box-shadow: 0 0 18px #3cff50, 0 0 30px rgba(60, 255, 80, 0.7); } }
.ip-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.7rem; color: #b0b0d0; border-top: 1px dashed rgba(80, 120, 200, 0.3); padding-top: 6px; margin-top: 2px; }
.ip-label { opacity: 0.7; font-size: 0.65rem; letter-spacing: 0.04em; text-transform: uppercase; }
.ip-value { color: var(--neon-cyan); font-weight: 500; letter-spacing: 0.02em; text-align: right; word-break: break-all; max-width: 120px; }
.ip-value.failed { color: #ff8a8a; }
.panel-title { font-size: 0.65rem; letter-spacing: 0.1em; color: #a0a0cc; text-transform: uppercase; margin-bottom: -2px; }

/* 主容器 */
.main-container { position: relative; z-index: 1; width: 100%; max-width: 1300px; padding: 55px 28px 30px; display: flex; flex-direction: column; align-items: center; flex: 1; }

.header-section { text-align: center; margin-bottom: 55px; }
.main-title {
    font-family: var(--font-mono); font-size: 3.6rem; font-weight: 700;
    letter-spacing: 0.06em; color: #ffffff;
    text-shadow: 0 0 14px var(--neon-cyan), 0 0 40px rgba(0, 200, 240, 0.6), 0 0 75px rgba(0, 160, 220, 0.35);
    position: relative; display: inline-block; padding: 0 8px;
    animation: titleGlowPulse 3.8s ease-in-out infinite; opacity: 0;
}
@keyframes titleGlowPulse { 0%, 100% { text-shadow: 0 0 14px var(--neon-cyan), 0 0 40px rgba(0, 200, 240, 0.6), 0 0 75px rgba(0, 160, 220, 0.35); } 50% { text-shadow: 0 0 22px var(--neon-cyan), 0 0 55px rgba(0, 220, 255, 0.75), 0 0 95px rgba(0, 180, 240, 0.5); } }
.main-title::before, .main-title::after { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 65%; border-top: 2px solid var(--neon-cyan); border-bottom: 2px solid var(--neon-cyan); opacity: 0.75; }
.main-title::before { left: -38px; border-left: 2px solid var(--neon-cyan); border-radius: 5px 0 0 5px; }
.main-title::after { right: -38px; border-right: 2px solid var(--neon-cyan); border-radius: 0 5px 5px 0; }
.subtitle {
    font-family: var(--font-sans); font-size: 1.25rem; color: var(--text-secondary);
    letter-spacing: 0.08em; margin-top: 12px; font-weight: 400; display: block; opacity: 0;
}
.subtitle::before { content: '// '; color: var(--neon-cyan); opacity: 0.8; font-family: var(--font-mono); font-size: 0.85em; }
.subtitle::after { content: ' //'; color: var(--neon-cyan); opacity: 0.8; font-family: var(--font-mono); font-size: 0.85em; }

/* 卡片网格 */
.cards-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; width: 100%; max-width: 1200px; margin-bottom: 55px; }

.card {
    background: var(--bg-card); border: 1.5px solid var(--border-card);
    border-radius: 10px; padding: 26px 18px 22px;
    text-align: center; cursor: pointer; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; min-height: 150px; position: relative; transition: all var(--transition-smooth);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    overflow: hidden; z-index: 1; opacity: 0;
}
.card::before { content: ''; position: absolute; top: 0; left: 15%; width: 70%; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(0, 210, 250, 0.5), rgba(140, 160, 255, 0.6), rgba(0, 210, 250, 0.5), transparent); transition: all var(--transition-smooth); z-index: 2; opacity: 0.6; }
.card::after { content: ''; position: absolute; top: 8px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--neon-cyan); opacity: 0.5; transition: all var(--transition-smooth); box-shadow: 0 0 6px var(--neon-cyan); }
.card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-neon); transform: translateY(-6px); background: rgba(16, 16, 38, 0.9); }
.card:hover::before { opacity: 1; left: 8%; width: 84%; }
.card:hover::after { opacity: 1; box-shadow: 0 0 14px var(--neon-cyan), 0 0 24px rgba(0, 210, 240, 0.6); }

.card-name, .card-action { opacity: 0; }
.card-name { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: #ececf8; letter-spacing: 0.03em; z-index: 3; }
.card-action { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em; z-index: 3; display: flex; align-items: center; gap: 6px; }
.card-link .card-action { color: var(--neon-cyan); }
.card-link:hover .card-action { color: #8ff0ff; text-shadow: 0 0 12px rgba(0, 220, 255, 0.7); }
.card-link .card-action::after { content: '→'; transition: transform var(--transition-fast); }
.card-link:hover .card-action::after { transform: translateX(5px); }

.card-disabled {
    cursor: default;
    border-color: rgba(50, 50, 80, 0.45);
    background: rgba(10, 10, 22, 0.65);
}
.card-disabled::before { background: linear-gradient(90deg, transparent, rgba(90, 90, 130, 0.3), rgba(110, 110, 150, 0.3), rgba(90, 90, 130, 0.3), transparent); }
.card-disabled::after { background: #ff4d6d !important; opacity: 0.7 !important; box-shadow: 0 0 8px #ff4d6d !important; }
.card-disabled .card-action { color: #7e7ea0; }
.card-disabled .card-action::before { content: '🔒 '; font-size: 0.8em; }

.coming-soon-badge {
    position: absolute; top: 10px; left: 10px; z-index: 5;
    font-family: var(--font-mono); font-size: 0.65rem;
    letter-spacing: 0.06em; color: #ff4d6d;
    background: rgba(255, 77, 109, 0.25); border: 1px solid rgba(255, 77, 109, 0.5);
    border-radius: 3px; padding: 2px 6px; pointer-events: none;
    text-transform: uppercase; font-weight: 600; opacity: 0;
}

/* 淡入动画 */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.fade-in { animation: fadeIn 0.5s ease forwards; }

/* Footer */
.site-footer { position: relative; z-index: 1; width: 100%; background: #060610; border-top: 1.5px solid rgba(50, 50, 90, 0.45); padding: 22px 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.6); }
.footer-info p { font-size: 0.9rem; color: #b8b8d0; letter-spacing: 0.03em; text-align: center; margin: 0; }
.social-icons { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.social-icon-link { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(90, 110, 170, 0.4); color: #c8c8e0; text-decoration: none; font-size: 1.15rem; transition: all var(--transition-smooth); background: rgba(18, 18, 38, 0.55); }
.social-icon-link:hover { border-color: var(--neon-cyan); color: #ffffff; box-shadow: 0 0 18px rgba(0, 200, 240, 0.45); transform: translateY(-3px); background: rgba(28, 28, 55, 0.75); }
.social-icon-link.disabled { cursor: not-allowed; opacity: 0.4; pointer-events: none; }

/* ========== 平板及桌面小屏适配 ========== */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .main-title { font-size: 2.5rem; }
    .main-title::before, .main-title::after { width: 20px; }
    .system-status-panel { padding: 10px 14px; font-size: 0.7rem; min-width: 160px; }
}

/* ========== 手机端适配（≤768px） ========== */
@media (max-width: 768px) {
    .bg-ornament { display: none; }
    .main-container { padding: 25px 12px 20px; }
    .header-section { margin-bottom: 30px; }
    .main-title {
        font-size: 2rem;
        padding: 0 4px;
    }
    .main-title::before, .main-title::after { left: -22px; right: -22px; width: 14px; }
    .subtitle { font-size: 0.85rem; }
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card {
        padding: 16px 8px 14px;
        min-height: 100px;
        gap: 8px;
        border-radius: 8px;
    }
    .card-name { font-size: 0.9rem; }
    .card-action { font-size: 0.75rem; }
    .coming-soon-badge { font-size: 0.55rem; top: 6px; left: 6px; padding: 1px 4px; }

    /* 系统状态面板缩小为圆形按钮 */
    .system-status-panel {
        top: 10px;
        left: 10px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: unset;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.3s ease;
        opacity: 1; /* 覆盖淡入初始透明，确保按钮可见 */
    }
    .system-status-panel > *:not(.status-indicator) {
        display: none;
    }
    .system-status-panel .status-indicator {
        margin: 0;
        font-size: 0;  /* 隐藏文字“在线” */
        gap: 0;
        justify-content: center;
    }
    .system-status-panel .status-dot {
        width: 12px;
        height: 12px;
        margin: 0;
    }
    /* 展开状态 */
    .system-status-panel.expanded {
        width: auto;
        height: auto;
        border-radius: 12px;
        padding: 10px 14px;
        min-width: 170px;
        flex-direction: column;
        align-items: flex-start;
        cursor: default;
    }
    .system-status-panel.expanded > * {
        display: flex;
    }
    .system-status-panel.expanded .status-indicator {
        font-size: inherit;
        gap: 7px;
    }
    .system-status-panel.expanded .panel-title { display: block; }
    .system-status-panel.expanded .ip-row { display: flex; }

    .site-footer { padding: 16px 12px 12px; }
    .footer-info p { font-size: 0.75rem; }
    .social-icon-link { width: 36px; height: 36px; font-size: 1rem; }
    .social-icons { gap: 12px; }
}