/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ===== 头部 ===== */
.header {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
}
.status-dot {
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    transition: background 0.3s;
}
.status-dot.online::before { background: #22c55e; box-shadow: 0 0 6px #22c55e66; }
.status-dot.offline::before { background: #ef4444; }
.last-update {
    color: #808095;
    font-size: 0.8rem;
}

/* ===== 容器 ===== */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
}

/* ===== 面板 ===== */
.panel {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    overflow: hidden;
}
.panel-header {
    background: #222;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}
.panel-title {
    font-weight: 700;
    font-size: 0.95rem;
}
.panel-time {
    color: #808095;
    font-size: 0.8rem;
    font-family: monospace;
}
.panel-body {
    padding: 12px 16px 16px;
    min-height: 300px;
}
.empty-hint {
    text-align: center;
    padding: 60px 20px;
    color: #808095;
    font-size: 0.9rem;
}

/* ===== 数据项 ===== */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1f1f1f;
}
.info-item:last-child { border-bottom: none; }
.info-label {
    color: #808095;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-value {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

/* ===== 电池进度条 ===== */
.battery-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.battery-track {
    width: 60px;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}
.battery-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s, background 0.5s;
    background: #22c55e;
}
.battery-fill.warning { background: #f59e0b; }
.battery-fill.danger { background: #ef4444; }
.battery-text {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}

/* ===== 进度条（CPU/内存） ===== */
.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.progress-track {
    flex: 1;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: #4f8cff;
    transition: width 0.5s;
}
.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 44px;
    text-align: right;
    font-family: monospace;
}

/* ===== 状态标签 ===== */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
}
.tag-green { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; }
.tag-red { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }
.tag-blue { background: #4f8cff22; color: #4f8cff; border: 1px solid #4f8cff44; }
.tag-yellow { background: #f59e0b22; color: #f59e0b; border: 1px solid #f59e0b44; }
.tag-gray { background: #80809522; color: #808095; border: 1px solid #80809544; }

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 20px;
    color: #555;
    font-size: 0.75rem;
}

/* ===== 应用列表 ===== */
.app-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    background: #4f8cff22;
    color: #4f8cff;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ===== 网速 ===== */
.speed-row {
    display: flex;
    gap: 12px;
}
.speed-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #a0a0b0;
}
.speed-item .arrow { font-weight: 700; }
.speed-item .up { color: #4f8cff; }
.speed-item .down { color: #22c55e; }
