:root {
    /* 核心配色：清新蓝紫渐变 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    --success-gradient: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --danger-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    
    /* 毛玻璃变量 (浅色系) */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --blur-amount: 20px;
    
    /* 文字颜色 */
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    --radius: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f0f2f5; /* 备用背景色 */
}

/* ========== 动态背景层 ========== */
.bg-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

.bg-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    /* 增加一个淡淡的白色遮罩，让背景图不会干扰文字阅读 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0px); /* 可以在配置中动态修改 */
}

/* ========== 毛玻璃容器 ========== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

/* ========== 布局组件 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    margin-bottom: 30px;
    border-radius: 50px; /* 胶囊型导航栏 */
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255,255,255,0.5);
    color: #667eea;
}

/* ========== 卡片与排版 ========== */
.card {
    padding: 30px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== 表单元素 ========== */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255,255,255,0.5);
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ========== 按钮 ========== */
.btn {
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: white;
}

.btn:active { transform: scale(0.96); }

.btn-primary { background: var(--primary-gradient); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
.btn-success { background: var(--success-gradient); box-shadow: 0 4px 15px rgba(132, 250, 176, 0.3); color: #2d3748; }
.btn-danger { background: var(--danger-gradient); box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid rgba(0,0,0,0.1); }
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ========== 表格 ========== */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }

.table th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table td {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.03);
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.3); }

/* ========== 状态徽章 ========== */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-running { background: #e6fffa; color: #2c7a7b; }
.badge-stopped { background: #fff5f5; color: #c53030; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-running .dot { animation: pulse 2s infinite; }

/* ========== 登录页专用 ========== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.logo-bounce { font-size: 48px; margin-bottom: 20px; display: inline-block; animation: bounce 2s infinite; }

/* ========== 模态框 ========== */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active { display: flex; opacity: 1; }

.modal-content {
    background: #fff;
    width: 90%; max-width: 600px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content { transform: scale(1); }

/* 日志框美化 */
.log-box {
    background: #1a202c;
    color: #a0aec0;
    padding: 15px;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    height: 300px;
    overflow-y: auto;
    text-align: left;
    line-height: 1.5;
}

/* 动画 */
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* 移动端适配 */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; border-radius: 20px; }
    .table-wrapper { margin: 0 -15px; }
    .table td, .table th { padding: 10px; font-size: 13px; }
    .btn { width: 100%; justify-content: center; margin-bottom: 5px; }
    .form-row { flex-direction: column; }
}
/* ========== 紧急修复点击问题 ========== */

/* 1. 强制所有背景层不响应鼠标事件，并置于底层 */
.bg-layer, 
.bg-overlay, 
.particles {
    pointer-events: none !important; /* 关键：让鼠标穿透背景 */
    z-index: -1 !important;          /* 关键：强制置于底层 */
}

/* 2. 提升所有交互容器的层级 */
.container, 
.navbar, 
.auth-wrapper, 
.glass-panel {
    position: relative !important;
    z-index: 10 !important;          /* 确保在背景之上 */
}

/* 3. 确保模态框（弹窗）在最顶层 */
.modal {
    z-index: 9999 !important;
}
.modal.active {
    pointer-events: auto !important; /* 确保弹窗打开时可点击 */
}

/* 4. 修复表格中的按钮 */
.btn {
    position: relative;
    z-index: 20;
}