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

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

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

.tech-doc{position:relative;z-index:4;max-width:1144px;margin:0 auto 80px;padding:26px 24px;background:rgba(15,23,42,.96);border:1px solid rgba(148,163,184,.24);border-radius:18px;color:#e5e7eb}.doc-flow{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:16px 0;padding:16px;background:#0b1324;border-radius:12px}.doc-flow span{padding:9px 12px;border:1px solid #42516b;border-radius:8px;background:#111c31;font-size:12px}.doc-flow b{color:#f6c453;font-size:18px}.tech-doc .info-table{width:100%;border-collapse:collapse;margin:12px 0 22px;font-size:13px}.tech-doc .info-table td{border:1px solid #334155;padding:10px}.tech-doc .info-table td:first-child{width:130px;color:#f6c453}.tech-doc .design-list{line-height:1.8;padding-left:22px;color:#cbd5e1}.tech-doc .design-list strong{color:#f6c453}.tech-doc .code-block{overflow:auto;white-space:pre-wrap;line-height:1.7;font-size:12px}.tech-doc .tech-desc{line-height:1.8;color:#a9b8ce;font-size:13px}

.research-workbench{position:relative;z-index:4;max-width:1180px;margin:28px auto 110px;padding:0 18px;display:grid;grid-template-columns:1.25fr 1fr;gap:18px}.research-card{background:rgba(15,23,42,.94);border:1px solid rgba(148,163,184,.24);border-radius:18px;padding:22px;color:#e5e7eb;box-shadow:0 12px 34px rgba(0,0,0,.24)}.section-heading{display:flex;gap:12px;align-items:flex-start}.section-heading>span{font-size:28px}.section-heading h2{margin:0 0 5px;font-size:19px}.section-heading p{margin:0;color:#94a3b8;font-size:13px}.pattern-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:18px 0}.pattern-item{min-height:112px;background:#111c31;border:1px solid #2b3b56;border-radius:12px;color:#dbeafe;padding:10px 6px;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer}.pattern-item.selected{border-color:#f59e0b;box-shadow:0 0 0 2px rgba(245,158,11,.24)}.pattern-icon{font-size:26px;color:#f6c453}.pattern-item strong{font-size:12px}.pattern-item small,.pattern-item em{font-size:10px;color:#94a3b8;font-style:normal;text-align:center}.pattern-item em{color:#f6c453}.course-grid,.assessment-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.research-card label{display:flex;flex-direction:column;gap:5px;color:#a9b8ce;font-size:12px}.research-card input,.research-card select,.research-card textarea{background:#0b1324;border:1px solid #334155;border-radius:8px;color:#f8fafc;padding:9px;font:inherit}.research-card textarea{width:100%;min-height:70px;margin:12px 0;resize:vertical}.step-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.step-list label{background:#111c31;padding:8px;border-radius:8px;font-size:11px}.step-list input{accent-color:#f59e0b}.primary-btn,.secondary-btn{border:0;border-radius:8px;padding:10px 15px;cursor:pointer;font-weight:600;margin-right:8px}.primary-btn{background:#f59e0b;color:#201105}.secondary-btn{background:#243b5b;color:#dbeafe}.form-msg{font-size:12px;margin-left:6px}.ok{color:#34d399}.error-text{color:#fb7185}.privacy-note{grid-column:1/-1;text-align:center;color:#94a3b8;font-size:12px}@media(max-width:900px){.research-workbench{grid-template-columns:1fr}.pattern-list{grid-template-columns:repeat(3,1fr)}}

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

/* 摄像头优先：研究区在首屏以下，避免遮挡视频画面 */
.research-workbench{margin-top:100dvh}
.camera-start{margin-left:auto;border:1px solid rgba(246,196,83,.65);background:rgba(246,196,83,.12);color:#f6c453;border-radius:7px;padding:6px 10px;cursor:pointer;font-size:12px}
.camera-start:hover{background:rgba(246,196,83,.22)}

/* ── 叠加层 ── */
#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; }
}
