* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: sans-serif;
        }
        body {
            background-color: #000;
            color: #fff;
            overflow: hidden; /* 禁止页面滚动 */
            height: 100vh; /* 占满整个视口高度 */
        }
        /* 顶部导航栏 - 半透明悬浮 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 44px;
            background-color: rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
            padding: 0 16px;
            z-index: 100;
        }
        .back-btn {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #fff;
        }
        .nav-title {
            flex: 1;
            text-align: center;
            font-size: 17px;
            font-weight: 500;
        }
        .right-btn {
            width: 24px;
            height: 24px;
            cursor: pointer;
        }

        /* 扫描区域 - 全屏显示 */
        .scan-container {
            width: 100%;
            height: 100vh; /* 占满整个屏幕高度 */
            position: relative;
        }
        #video-preview {
            width: 100%;
            height: 100%;
            object-fit: cover; /* 视频铺满屏幕，保持比例 */
        }

        /* 扫描线动画 */
        .scan-line {
            position: absolute;
            left: 0;
            right: 0;
            height: 3px;
            background-color: #00ff00;
            animation: scan 2s linear infinite;
            z-index: 10;
        }
        @keyframes scan {
            0% { top: 20%; }
            100% { top: 80%; }
        }

        /* 扫描框边框（模拟原生扫码框） */
        .scan-frame {
            position: absolute;
            top: 20%;
            left: 50%;
            width: 80%;
            height: 60%;
            transform: translateX(-50%);
            border: 2px solid rgba(0,255,0,0.6);
            z-index: 10;
            background: linear-gradient(
                to top,
                rgba(0,255,0,0.2) 0%,
                transparent 5%,
                transparent 95%,
                rgba(0,255,0,0.2) 100%
            ),
            linear-gradient(
                to left,
                rgba(0,255,0,0.2) 0%,
                transparent 5%,
                transparent 95%,
                rgba(0,255,0,0.2) 100%
            );
        }
        /* 扫描框角落标记 */
        .scan-corner {
            position: absolute;
            width: 20px;
            height: 20px;
            border: 3px solid #00ff00;
            z-index: 11;
        }
        .corner-top-left {
            top: 19%;
            left: 10%;
            border-right: none;
            border-bottom: none;
        }
        .corner-top-right {
            top: 19%;
            right: 10%;
            border-left: none;
            border-bottom: none;
        }
        .corner-bottom-left {
            bottom: 19%;
            left: 10%;
            border-right: none;
            border-top: none;
        }
        .corner-bottom-right {
            bottom: 19%;
            right: 10%;
            border-left: none;
            border-top: none;
        }

        /* 底部操作栏 */
        .bottom-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 15px;
            background-color: rgba(0,0,0,0.7);
            display: flex;
            justify-content: center;
            z-index: 100;
        }
        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            background-color: rgba(0,122,255,0.9);
            color: white;
            font-size: 16px;
            cursor: pointer;
            margin: 0 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .btn:disabled {
            background-color: rgba(204,204,204,0.7);
            cursor: not-allowed;
        }
        .flash-btn.on {
            background-color: rgba(255,149,0,0.9);
        }
        .album-btn {
            background-color: rgba(88,86,214,0.9);
        }

        /* 相册选择相关样式 */
        #file-input {
            display: none;
        }

        /* 扫描结果弹窗 */
        .result-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 400px;
            background-color: white;
            border-radius: 12px;
            padding: 20px;
            z-index: 200;
            display: none;
        }
        .result-modal.show {
            display: block;
        }
        .result-modal h3 {
            color: #007aff;
            margin-bottom: 15px;
            font-size: 18px;
            text-align: center;
        }
        .result-content {
            color: #333;
            word-break: break-all;
            padding: 15px;
            background-color: #f5f5f5;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .modal-btn {
            width: 100%;
            padding: 12px;
            background-color: #007aff;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            cursor: pointer;
        }

        /* 遮罩层 */
        .mask {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,0.5);
            z-index: 150;
            display: none;
        }
        .mask.show {
            display: block;
        }