/* 🌟 核心基建：移动端原生触控引擎优化 */
* {
    box-sizing: border-box;
    /* 取消点击高亮，干掉所有蓝色/灰色闪烁遮罩 */
    -webkit-tap-highlight-color: transparent;
    /* 取消文字被意外选中 */
    user-select: none;
    -webkit-user-select: none;
    /* 优化触控响应，消除经典的 300ms 延迟 */
    touch-action: manipulation;
}

:root {
    --primary: #007aff;
    --primary-light: #e5f1ff;
    --danger: #ff3b30;
    --warning: #ff9500;
    --success: #34c759;
    --bg-color: #f2f2f7;
    --card-bg: #ffffff;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --border-color: #e5e5ea;
}

body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 15px;
    display: flex; justify-content: center;
    color: var(--text-main);
}

#app { width: 100%; max-width: 480px; }
[v-cloak] { display: none; }

/* =======================================================
   原生按键系统 (极速反馈，真实物理手感)
   ======================================================= */
button {
    font-family: inherit; outline: none; border: none; cursor: pointer;
    border-radius: 8px; font-weight: 600; font-size: 14px;
    transition: transform 0.08s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.1s;
}
/* 真正的物理回弹：只要手指按下，瞬间缩小 */
button:active { transform: scale(0.92); opacity: 0.85; }
button:disabled { opacity: 0.5; transform: none !important; cursor: not-allowed; }

.btn { padding: 12px 0; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: white; }
.btn-warning { background: var(--warning); color: white; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.btn-primary-outline { background: var(--primary-light); color: var(--primary); }
.btn-action { background: #f2f2f7; color: var(--text-main); font-size: 18px; flex: 0.6 !important; }

/* =======================================================
   布局与组件
   ======================================================= */
.offline-mask { opacity: 0.5; pointer-events: none; filter: grayscale(80%); transition: 0.3s; }

/* 原生级 Toast 弹窗 */
.native-toast {
    position: fixed; top: -50px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.8); color: white; padding: 10px 20px;
    border-radius: 20px; font-size: 13px; font-weight: 500;
    z-index: 9999; opacity: 0; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(5px); white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.native-toast.show { top: 20px; opacity: 1; }
.native-toast.error { background: rgba(255, 59, 48, 0.9); }
.native-toast.success { background: rgba(52, 199, 89, 0.9); }

/* 卡片容器 */
.login-card, .panel-card, .channel-card {
    background: var(--card-bg); border-radius: 14px; padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); margin-bottom: 12px;
}

/* 登录页 */
.login-container { margin-top: 15vh; }
.login-card { text-align: center; }
.login-card h2 { margin: 0 0 5px; font-size: 22px; color: var(--text-main); }
.subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 25px; }
.login-input {
    width: 100%; padding: 14px; margin-bottom: 20px; border: 1px solid var(--border-color);
    border-radius: 10px; font-size: 15px; text-align: center; background: #fafafa;
    outline: none; transition: 0.2s;
}
.login-input:focus { border-color: var(--primary); background: white; }

/* 顶栏 */
.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: white; padding: 12px 15px; border-radius: 12px; margin-bottom: 12px;
}
.status-badge { display: flex; align-items: center; font-size: 12px; font-weight: bold; }
.status-badge.online { color: var(--success); }
.status-badge.offline { color: var(--text-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.icon-btn { background: transparent; padding: 5px 10px; font-size: 13px; }
.danger-text { color: var(--danger); }

/* 信息播报栏 */
.info-bar {
    background: white; padding: 10px 15px; border-radius: 10px; margin-bottom: 12px;
    font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.info-bar span { color: var(--text-main); font-weight: bold; }

/* 双通道面板 */
.dual-channels { display: flex; gap: 10px; margin-bottom: 12px; }
.channel-card { flex: 1; padding: 15px 12px; margin-bottom: 0; position: relative; border-top: 4px solid transparent; }
.card-a { border-top-color: #007aff; }
.card-b { border-top-color: #5856d6; }
.ch-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ch-title { font-size: 13px; font-weight: bold; }
.card-a .ch-title { color: #007aff; }
.card-b .ch-title { color: #5856d6; }
.emergency-btn { background: transparent; color: var(--danger); font-size: 12px; padding: 2px 6px; border: 1px solid var(--danger); border-radius: 4px;}
.ch-val { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 15px; font-family: monospace; }
.ch-val small { font-size: 14px; color: var(--text-muted); font-weight: normal; }
.btn-group { display: flex; gap: 6px; }
.btn-group .btn { flex: 1; }

/* 波形区 */
.wave-panel { padding: 15px; }
.tabs { display: flex; background: #f2f2f7; border-radius: 8px; padding: 3px; margin-bottom: 15px; }
.tab { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; font-weight: bold; color: var(--text-muted); border-radius: 6px; transition: 0.2s; }
.tab.active { background: white; color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.wave-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wave-btn {
    position: relative; height: 38px; background: #f2f2f7; color: var(--text-main);
    border: 1px solid transparent; display: flex; align-items: center; justify-content: center;
}
.wave-selected { background: var(--primary-light); color: var(--primary); border-color: rgba(0, 122, 255, 0.2); }
.wave-playing { background: var(--success); color: white; border-color: transparent; box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3); }
.play-icon { position: absolute; left: 6px; font-size: 10px; }

/* 闪电快捷区 */
.zap-section { display: flex; gap: 10px; }
.zap-btn { flex: 1; height: 50px; color: white; letter-spacing: 0.5px; border-radius: 12px; }
.zap-a { background: linear-gradient(135deg, #007aff, #0056b3); }
.zap-b { background: linear-gradient(135deg, #5856d6, #3f3e9b); }


/* =======================================================
   专属 GIF 展示区
   ======================================================= */
.custom-gif-container {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.master-gif {
    max-width: 100%;       /* 保证图片宽度绝对不会撑爆手机屏幕 */
    max-height: 180px;     /* 限制一下最大高度，避免显得喧宾夺主 */
    border-radius: 12px;   /* 加上和顶部卡片一样优雅的圆角 */
    object-fit: cover;     /* 保证图片比例协调，不会被拉伸 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); /* 加上一丝丝悬浮阴影 */
    transition: transform 0.2s ease;
}

/* 小彩蛋：按压图片时也会有极其轻微的互动缩放手感 */
.master-gif:active {
    transform: scale(0.97);
}