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

body {
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', 'PingFang SC', sans-serif;
    color: #e8eef7;
    cursor: none; /* 完全手控，隐藏鼠标 */
}

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* 摄像头预览 — 右下角 */
#camera-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 240px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    background: #0a0e17;
}

#input-video,
#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#overlay-canvas {
    z-index: 2;
    pointer-events: none;
}

#gesture-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 6px;
    font-size: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    color: #9bb8e0;
    letter-spacing: 0.3px;
    z-index: 3;
    backdrop-filter: blur(4px);
    line-height: 1.4;
}

/* 信息卡片 — 左侧 */
#info-panel {
    position: fixed;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    width: 340px;
    max-height: 75vh;
    overflow-y: auto;
    padding: 24px 26px;
    background: rgba(8, 14, 28, 0.9);
    border: 1px solid rgba(100, 160, 255, 0.3);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    z-index: 20;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.75);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#info-panel.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(-40px);
    pointer-events: none;
}

#info-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: #7eb8ff;
    text-shadow: 0 0 20px rgba(80, 150, 255, 0.4);
}

#info-content {
    font-size: 14px;
    line-height: 1.8;
    color: #c8d6ea;
}

#info-content .field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#info-content .field:last-child {
    border-bottom: none;
}

#info-content .label {
    color: #7a93b8;
}

#info-content .value {
    color: #e0ecff;
    font-weight: 500;
}

#info-close-hint {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: #5a7a9e;
    text-align: center;
}

/* 加载层 */
#loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 100;
    font-size: 16px;
    color: #7eb8ff;
    letter-spacing: 2px;
    transition: opacity 0.6s;
}

#loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

#info-panel::-webkit-scrollbar {
    width: 4px;
}
#info-panel::-webkit-scrollbar-track {
    background: transparent;
}
#info-panel::-webkit-scrollbar-thumb {
    background: rgba(100, 160, 255, 0.3);
    border-radius: 4px;
}