/**
 * css/mobile.css
 * 职责：手机端相机界面样式
 *  - 全屏相机预览（video 满屏 cover）
 *  - 九宫格构图线（白色细线，透明度 0.5）
 *  - 顶部参数栏（硬编码 ISO / 光圈 / 大小）
 *  - 底部模式切换 + 圆形快门按钮
 *  - Toast 提示样式
 * 所有覆盖层均使用 position: fixed 浮在相机预览之上
 */

/* 手机端默认隐藏电脑遮罩（双重保险） */
body:not(.desktop-block) .desktop-overlay {
    display: none;
}

/* ===== 相机应用容器 ===== */
.camera-app {
    position: fixed;
    inset: 0;
    background: #000;
    overflow: hidden;
    z-index: 1;
}

/* ===== 视频流铺满屏幕 ===== */
.camera-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background: #000;
}

/* 处理用 canvas 隐藏（不参与显示） */
.process-canvas {
    display: none;
}

/* 月亮贴图 canvas：覆盖在视频上方，但不接收指针事件 */
.moon-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* ===== 九宫格构图线 ===== */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.5); /* 透明度 0.5 的白色细线 */
}

.grid-vertical {
    width: 1px;
    height: 100%;
    top: 0;
}
.grid-vertical.v1 { left: 33.333%; }
.grid-vertical.v2 { left: 66.666%; }

.grid-horizontal {
    width: 100%;
    height: 1px;
    left: 0;
}
.grid-horizontal.h1 { top: 33.333%; }
.grid-horizontal.h2 { top: 66.666%; }

/* ===== 顶部参数栏 ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
    z-index: 4;
}

.param-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    min-width: 60px;
}

.param-label {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.param-value {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

/* ===== 底部控制区 ===== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
    z-index: 4;
}

/* 模式切换按钮组 */
.mode-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.2s, color 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.mode-btn:active {
    transform: scale(0.96);
}

.mode-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* 圆形快门按钮 */
.shutter-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.shutter-btn:active {
    transform: scale(0.92);
}

.shutter-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    transition: background 0.12s;
}

.shutter-btn:active .shutter-inner {
    background: #c8c8c8;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}