/* ═══════════════════════════════════════════
   CV情绪量化系统 — Web版 样式
   深色主题，参考桌面版UI设计
   ═══════════════════════════════════════════ */

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

body {
    background: #0a0a0f;
    font-family: 'Microsoft YaHei', 'SimHei', 'PingFang SC', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
    -webkit-user-select: none;
}

/* ── 摄像头视频 (全屏填充) ── */
#video {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* 镜像翻转 */
    z-index: 0;
}

/* ── 叠加层 ── */
#overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
}
#overlay > * {
    pointer-events: auto;
}

/* ── 毛玻璃面板 ── */
.glass {
    background: rgba(10, 10, 20, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(80, 80, 100, 0.4);
    border-radius: 12px;
    color: #e0e0e0;
}

/* ── 左侧数据面板 ── */
#panel {
    position: absolute;
    top: 12px; left: 12px;
    width: 290px;
    padding: 14px 18px 10px;
    font-size: 15px;
    line-height: 1.5;
}
.panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding-bottom: 6px;
}
.panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}
.panel-row .label {
    color: #9098a0;
    font-size: 14px;
    min-width: 70px;
}
.panel-row .value {
    color: #e8e8e8;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
}

/* ── 专注度进度条 ── */
.progress-bar-container {
    height: 16px;
    background: rgba(50, 50, 60, 0.6);
    border-radius: 8px;
    margin: 4px 0 8px 0;
    overflow: hidden;
    border: 1px solid rgba(80, 80, 100, 0.3);
}
.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 7px;
    transition: width 0.3s ease, background 0.3s ease;
    background: #2ecc71;
}

/* ── 分割线 ── */
.divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 0;
}

/* ── 右上角大情绪标签 ── */
#big-emotion {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 52px;
    font-weight: 900;
    padding: 6px 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    letter-spacing: 4px;
}

/* ── 人脸框 ── */
#face-box {
    position: absolute;
    border: 3px solid #2ecc71;
    border-radius: 8px;
    display: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.3);
}

/* ── 无脸提示 ── */
#no-face {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #e74c3c;
    font-weight: bold;
    display: none;
    text-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
}

/* ── 底部操作栏 ── */
#bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 38px;
    background: rgba(10, 10, 18, 0.8);
    border-top: 1px solid rgba(80, 80, 100, 0.3);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    font-size: 13px;
    color: #a0a8b0;
}
.key-hint {
    color: #b0b8c0;
}
.key-hint.link {
    color: #5dade2;
    text-decoration: none;
    cursor: pointer;
}
.key-hint.link:hover {
    color: #85c1e9;
}
kbd {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}
.separator {
    color: rgba(255,255,255,0.2);
}

/* ── 状态指示 ── */
.status-on {
    color: #2ecc71 !important;
}
.status-off {
    color: #7f8c8d !important;
}

/* ── 记录闪烁 ── */
@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.recording-blink {
    animation: blink-dot 0.8s ease-in-out infinite;
}

/* ── 响应式 ── */
@media (max-width: 768px) {
    #panel {
        width: 240px;
        font-size: 13px;
        padding: 10px 12px;
        top: 6px; left: 6px;
    }
    #big-emotion {
        font-size: 36px;
        top: 8px; right: 10px;
    }
    .panel-title { font-size: 14px; }
    .panel-row .label, .panel-row .value { font-size: 12px; }
}
