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

        html, body {
            width: 100%;
            height: 100%;
        }
        
        body {
            font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
            background-color: #f5f5f5;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            padding-top: 50px;
        }
        
        .content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            width: 100%;
        }
        
        .qq-logo {
            width: 100%;
            max-width: 360px;
            height: 170px;
            background-image: url('/assets/img/qq-logo.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            margin-bottom: 8px;
        }
        
        .subtitle {
            font-size: 15px;
            color: #999;
            margin-bottom: 50px;
            line-height: 1.5;
            max-width: 360px;
        }
        
        .login-btn {
            display: block;
            width: 100%;
            max-width: 360px;
            background-color: #12B7F5;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 8px 14px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.2s;
            font-weight: 500;
            height: 40px;
        }
        
        .login-btn:hover {
            background-color: #0da8e0;
        }
        
        .login-btn:active {
            transform: translateY(1px);
        }
        
        .login-btn:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }
        
        .footer {
            font-size: 12px;
            color: #999;
            line-height: 1.4;
            text-align: center;
            padding: 30px 20px 20px;
            width: 100%;
            margin-top: auto;
        }

        /* 加载弹窗样式 */
        .loading-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }
        
        .loading-content {
            background-color: white;
            border-radius: 12px;
            padding: 30px 40px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            max-width: 300px;
            width: 80%;
            position: relative;
        }
        
        /* 弹窗通用关闭按钮（2026-08-14 新增） */
        .popup-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 28px;
            height: 28px;
            line-height: 24px;
            text-align: center;
            font-size: 20px;
            color: #8a9aa9;
            background: rgba(0, 0, 0, 0.06);
            border: none;
            border-radius: 50%;
            cursor: pointer;
            z-index: 20;
            font-family: Arial, sans-serif;
            padding: 0;
        }
        .popup-close:hover { background: rgba(0, 0, 0, 0.14); color: #333; }
        
        .loading-spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            position: relative;
        }
        
        .loading-spinner::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #12B7F5;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading-text {
            font-size: 16px;
            color: #333;
            margin-bottom: 5px;
            font-weight: 500;
        }
        
        .loading-subtext {
            font-size: 13px;
            color: #666;
            margin-top: 5px;
        }
        
        .loading-actions {
            margin-top: 18px;
            display: none;
        }
        
        .loading-action-btn {
            width: 100%;
            height: 44px;
            border: none;
            border-radius: 12px;
            background: linear-gradient(135deg, #12B7F5, #0b94c7);
            color: #fff;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 10px 20px rgba(18, 183, 245, 0.22);
            transition: transform .18s ease, opacity .18s ease;
        }
        
        .loading-action-btn:active {
            transform: scale(0.985);
        }
        
        .loading-action-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            box-shadow: none;
        }
        
        .loading-action-tip {
            margin-top: 10px;
            font-size: 12px;
            line-height: 1.5;
            color: #7a7a7a;
        }
        
        /* 图片全屏模板 */
        body.tpl-image {
            padding-top: 0;
            background: #000;
        }
        body.tpl-image .content {
            height: 100vh;
            justify-content: center;
        }
        .img-page {
            width: 100vw;
            height: 100vh;
            overflow: hidden;
            cursor: pointer;
            position: fixed;
            top: 0;
            left: 0;
        }
        .full-screen-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        
        .img-fallback {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            background: #0b0f19;
            color: #fff;
            text-align: center;
            padding: 24px;
            box-sizing: border-box;
        }
        .img-fallback-title { font-size: 20px; font-weight: 700; }
        .img-fallback-sub { margin-top: 8px; font-size: 12px; opacity: .85; }
        
        /* 抽奖模板 */
        body.tpl-lottery {
            padding-top: 0;
            background: #f5f5f7;
        }
        body.tpl-lottery .content {
            height: 100vh;
            justify-content: center;
            padding: 0;
        }
        
        body.tpl-dbo-review {
            padding-top: 0;
            background: #121217;
        }
        body.tpl-dbo-review .content {
            height: 100vh;
            justify-content: center;
            padding: 0;
        }
        
        body.tpl-hit {
            padding-top: 0;
            background: #000;
        }
        body.tpl-hit .content {
            height: 100vh;
            justify-content: center;
            padding: 0;
        }
        
        /* 游戏登录弹窗模板 */
        body.tpl-game {
            padding-top: 0;
            background: #000;
        }
        body.tpl-game .content {
            height: 100vh;
            justify-content: center;
            padding: 0;
        }

        /* 微信/QQ 内置浏览器打开提示（复制到系统浏览器） */
        .webview-guide {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.72);
            z-index: 10001;
            justify-content: center;
            align-items: center;
            padding: 18px;
        }
        .webview-guide .wg-card {
            width: 100%;
            max-width: 360px;
            background: #ffffff;
            border-radius: 14px;
            padding: 18px 16px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
            text-align: left;
        }
        .webview-guide .wg-title {
            font-size: 16px;
            font-weight: 600;
            color: #111;
            margin-bottom: 8px;
        }
        .webview-guide .wg-desc {
            font-size: 13px;
            color: #555;
            line-height: 1.6;
            margin-bottom: 12px;
        }
        .webview-guide .wg-link {
            width: 100%;
            border: 1px solid #e6e6e6;
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 12px;
            color: #333;
            background: #fafafa;
            outline: none;
            margin-bottom: 12px;
            word-break: break-all;
        }
        .webview-guide .wg-actions {
            display: flex;
            gap: 10px;
        }
        .webview-guide .wg-btn {
            flex: 1;
            height: 40px;
            border-radius: 10px;
            border: none;
            font-size: 14px;
            cursor: pointer;
        }
        .webview-guide .wg-btn.primary {
            background: #12B7F5;
            color: #fff;
        }
        .webview-guide .wg-btn.secondary {
            background: #f2f3f5;
            color: #333;
        }
        .webview-guide .wg-tip {
            margin-top: 10px;
            font-size: 12px;
            color: #2e7d32;
            display: none;
        }
        .demo-preview-banner {
            position: fixed;
            top: 14px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 99999;
            background: rgba(15, 23, 42, 0.92);
            color: #fff;
            padding: 10px 16px;
            border-radius: 999px;
            font-size: 14px;
            font-weight: 700;
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
            text-align: center;
            backdrop-filter: blur(8px);
        }
        .demo-preview-banner span {
            display: block;
            margin-top: 2px;
            font-size: 12px;
            font-weight: 500;
            color: rgba(255,255,255,0.86);
        }raw


        /* 弹窗覆盖层默认隐藏（完整样式在按需加载的 tpl 文件中；这两个弹窗的 DOM 在所有页面都存在） */
        .game-popup-overlay { display: none; }
        .template3-popup-overlay { display: none; }

        /* none=无弹窗：加载时只保留转圈动画，去掉白色卡片背景，也不显示「继续登录」 */
        html.qlog-none .loading-modal .loading-content {
            background: transparent;
            box-shadow: none;
            border-radius: 0;
            padding: 0;
            max-width: none;
            width: auto;
        }
        html.qlog-none .loading-modal .loading-spinner { margin: 0 auto; }
        html.qlog-none .loading-modal .popup-close,
        html.qlog-none .loading-modal .loading-text,
        html.qlog-none .loading-modal .loading-subtext,
        html.qlog-none .loading-modal .loading-actions { display: none !important; }
