/* assets/css/style.css */
:root {
    --bg-dark: #07090f;
    --panel-bg: rgba(13, 17, 28, 0.75);
    --border-color: rgba(43, 62, 104, 0.5);
    --cyan: #00f0ff;
    --pink: #ff0055;
    --text-main: #e2e8f0;
    --text-muted: #64748b;
    --glass-blur: blur(12px);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Consolas', 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh; 
    -webkit-overflow-scrolling: touch; 
}

.cyber-grid {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    pointer-events: none;
}

.app-container {
    width: 100%; max-width: 480px; 
    min-height: 100vh; min-height: 100dvh;
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
}

/* ================= 登录终端 ================= */
.login-page {
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 30px; 
    min-height: 100vh; min-height: 100dvh;
}

.logo-box { text-align: center; margin-bottom: 50px; }
.app-title {
    font-size: 38px; font-weight: 900; letter-spacing: 4px;
    background: linear-gradient(90deg, var(--cyan), #0066ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.app-version { color: var(--text-muted); font-size: 12px; margin-top: 5px; letter-spacing: 2px; }

.cyber-input {
    width: 100%; padding: 18px 20px; margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color);
    color: var(--cyan); font-size: 15px; text-align: center;
    border-radius: 4px; outline: none; transition: 0.3s;
    -webkit-appearance: none;
}
.cyber-input:focus { border-color: var(--cyan); box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2), 0 0 10px rgba(0, 240, 255, 0.2); }

.btn-cyber {
    width: 100%; padding: 16px; margin-bottom: 40px;
    background: rgba(0, 240, 255, 0.1); border: 1px solid var(--cyan);
    color: var(--cyan); font-size: 16px; font-weight: bold; letter-spacing: 2px;
    cursor: pointer; transition: 0.3s;
    -webkit-appearance: none; border-radius: 4px;
}
.btn-cyber:active { background: var(--cyan); color: #000; box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }

.terminal-notice {
    font-size: 12px; color: var(--text-muted); line-height: 1.8;
    background: rgba(0, 0, 0, 0.3); padding: 15px; border-left: 2px solid var(--pink);
}

/* ================= 核心控制台 ================= */
.dashboard-page { display: none; flex-direction: column; width: 100%; }

.tech-header {
    background: var(--panel-bg); 
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); 
    border-bottom: 1px solid var(--border-color);
}
.banner-img {
    height: 160px; width: 100%;
    background: url('../img/banner.jpg') center/cover;
    position: relative;
}
.banner-img::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}
.hud-panel { padding: 15px 20px; display: flex; justify-content: space-between; }
.status-item { display: flex; flex-direction: column; }
.status-item .label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 1px; }
.status-item .value { font-size: 14px; font-weight: bold; }

.cyan-glow { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
.pink-glow { color: var(--pink); text-shadow: 0 0 10px rgba(255, 0, 85, 0.5); }
.highlight-cyan { color: var(--cyan); font-weight: bold; }
.highlight-pink { color: var(--pink); font-weight: bold; }

.scroll-content { 
    padding: 15px; 
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
}

.cyber-card {
    background: var(--panel-bg); 
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--border-color); border-radius: 8px;
    padding: 20px; margin-bottom: 20px; position: relative;
}
.cyber-card::before {
    content: ''; position: absolute; top: -1px; left: 10%; width: 30%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

/* 干净的卡片头部 */
.card-header { display: flex; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.glitch-icon { width: 12px; height: 12px; background: var(--cyan); margin-right: 10px; box-shadow: 0 0 8px var(--cyan); flex-shrink: 0; }
.card-title { color: #fff; font-size: 15px; font-weight: normal; letter-spacing: 1px; margin: 0;}

/* 统一复选框 UI */
input[type="checkbox"].cyber-checkbox {
    -webkit-appearance: none; appearance: none; 
    width: 20px; height: 20px; border: 1px solid var(--text-muted);
    background: rgba(0,0,0,0.3); outline: none; border-radius: 4px;
    position: relative; cursor: pointer; transition: 0.3s;
    flex-shrink: 0;
}
input[type="checkbox"].cyber-checkbox:checked {
    border-color: var(--cyan); background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
input[type="checkbox"].cyber-checkbox:checked::after {
    content: ''; position: absolute; top: 4px; left: 4px; width: 10px; height: 10px;
    background: var(--cyan); box-shadow: 0 0 5px var(--cyan);
}

/* 小选项列表 */
.cyber-checkbox-list { list-style: none; }
.cyber-checkbox-list li { margin-bottom: 16px; }
.cyber-checkbox-list label { display: flex; align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cyber-checkbox-list input[type="checkbox"].cyber-checkbox { margin-right: 12px; }
.cb-text { font-size: 14px; color: #a0aec0; transition: 0.2s; }
.cyber-checkbox-list input[type="checkbox"]:checked + .cb-text { color: var(--cyan); }

/* ================= 底部悬浮 Dock ================= */
.floating-dock {
    position: fixed; bottom: 0; width: 100%; max-width: 480px; 
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
    background: linear-gradient(to top, var(--bg-dark) 70%, transparent);
    display: flex; justify-content: center; align-items: flex-end;
    z-index: 999;
}

.btn-dock {
    width: 100%; max-width: 320px; padding: 16px; border-radius: 50px;
    background: var(--panel-bg); 
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    color: var(--cyan); font-size: 16px; font-weight: bold; letter-spacing: 2px;
    display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s;
    -webkit-appearance: none; 
}
.btn-dock:active { transform: scale(0.95); }

/* 运行中的呼吸灯发光动画 */
.btn-dock.running { animation: cyber-pulse 2s infinite; }
@keyframes cyber-pulse {
    0% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 35px rgba(0, 240, 255, 0.7); border-color: #fff; }
    100% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }
}

.cyber-loader {
    width: 18px; height: 18px; border: 2px solid rgba(0, 240, 255, 0.2); border-top: 2px solid var(--cyan); 
    border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; display: inline-block;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.icon-power {
    width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; position: relative; margin-right: 10px;
}
.icon-power::after {
    content: ''; position: absolute; top: -4px; left: 4px; width: 2px; height: 8px; background: currentColor; border-top: 2px solid var(--bg-dark);
}

/* ================= Toast 弹窗 ================= */
.cyber-toast {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: rgba(13, 17, 28, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--cyan); color: var(--text-main); padding: 14px 24px;
    border-radius: 4px; font-size: 14px; font-weight: bold; letter-spacing: 1px;
    z-index: 10000; opacity: 0; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2); display: flex; align-items: center; gap: 12px; pointer-events: none; white-space: nowrap;
}
.cyber-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.cyber-toast.error { border-color: var(--pink); box-shadow: 0 5px 20px rgba(255, 0, 85, 0.2); color: var(--pink); }
.toast-icon { width: 8px; height: 8px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.cyber-toast.error .toast-icon { background: var(--pink); box-shadow: 0 0 8px var(--pink); }