/* css/core.css — critical shell */

        :root {
            --bg-main: #F4F6F9; 
            --bg-card: #FFFFFF; 
            --primary: #00C853; 
            --secondary: #FF9100; 
            --accent: #0071FF; 
            --text-main: #1A212D; 
            --text-muted: #657786; 
            --danger: #FF3B30; 
            --gold-grad: linear-gradient(135deg, #FFE082 0%, #FFB300 100%);
            --gold-btn: linear-gradient(135deg, #FFD54F 0%, #FF8F00 50%, #FF6F00 100%);
            --top-bar-height: 44px;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; outline: none; }
        body { background-color: var(--bg-main); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, sans-serif; padding: calc(var(--top-bar-height) + 10px) 15px 15px; font-size: 14px; line-height: 1.4; }
        
        .page-view { display: none; }
        .page-view.active { display: block; }

        .login-wrapper { max-width: 400px; margin: 40px auto 0; padding: 30px 20px; background: #FFF; border-radius: 16px; box-shadow: 0 4px 25px rgba(0,0,0,0.06); border: 1px solid #E1E8ED; text-align: center; }
        .login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 25px; font-weight: 500; }
        .input-group { position: relative; margin-bottom: 18px; text-align: left; }
        .input-label { font-size: 12px; font-weight: bold; color: var(--text-main); margin-bottom: 6px; display: block; }
        .login-input { width: 100%; padding: 12px 14px; border: 1px solid #CCD6DD; border-radius: 8px; font-size: 14px; font-weight: bold; color: var(--text-main); background: #F8F9FA; transition: all 0.2s; }
        .login-input:focus { border-color: var(--accent); background: #FFF; }
        .captcha-btn { position: absolute; right: 8px; bottom: 5px; background: var(--accent); color: #FFF; border: none; padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; }
        .captcha-btn.disabled { background: #CCD6DD; color: #657786; cursor: not-allowed; }

        .slider-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
        .slider-modal.show { display: flex; }
        .slider-box { background: #FFF; border-radius: 14px; width: 100%; max-width: 320px; padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
        .slider-box-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .slider-box-title { font-size: 16px; font-weight: bold; color: var(--text-main); }
        .slider-box-refresh { border: none; background: transparent; color: var(--accent); font-size: 12px; cursor: pointer; }
        .slider-box-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; text-align: center; }
        .slider-track { position: relative; height: 46px; background: #F4F6F9; border-radius: 23px; border: 1px solid #E1E8ED; overflow: hidden; touch-action: none; }
        .slider-track-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: rgba(0,113,255,.12); pointer-events: none; }
        .slider-track-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); pointer-events: none; }
        .slider-thumb { position: absolute; left: 0; top: 2px; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #0071FF 0%, #00C853 100%); color: #FFF; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; z-index: 2; box-shadow: 0 2px 8px rgba(0,113,255,.35); }
        .slider-thumb:active { cursor: grabbing; }
        .btn-login-submit { width: 100%; background: linear-gradient(135deg, #0071FF 0%, #00C853 100%); color: #FFF; border: none; padding: 14px; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 12px rgba(0,113,255,0.2); margin-top: 10px; }
        

        .bottom-action-bar {
            display: none;
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 9000;
            padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
            background: rgba(255, 255, 255, 0.97);
            border-top: 1px solid #E1E8ED;
            box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
            backdrop-filter: blur(8px);
            gap: 2px;
        }
        .bottom-action-bar.show { display: flex; }
        .bottom-action-bar .tab-btn {
            flex: 1;
            border: none;
            background: transparent;
            border-radius: 10px;
            padding: 8px 2px 6px;
            font-size: 10px;
            font-weight: 800;
            cursor: pointer;
            line-height: 1.15;
            color: #90A4AE;
        }
        .bottom-action-bar .tab-btn .tab-ico {
            display: block;
            font-size: 16px;
            margin-bottom: 2px;
            line-height: 1;
        }
        .bottom-action-bar .tab-btn .tab-ico.tab-ico-img {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            margin-bottom: 2px;
        }
        .bottom-action-bar .tab-btn .tab-ico.tab-ico-img img {
            width: 22px;
            height: 22px;
            object-fit: contain;
            display: block;
            pointer-events: none;
        }
        .bottom-action-bar .tab-btn[data-tab="messages"].active {
            color: #E53935;
            background: rgba(229, 57, 53, 0.08);
        }
        .bottom-action-bar .tab-btn.active {
            color: #0071FF;
            background: rgba(0, 113, 255, 0.08);
        }
        .bottom-action-bar .tab-btn.tab-master.active { color: #E65100; background: rgba(255, 143, 0, 0.12); }

        /* ===== 椤堕儴妯帓鎮诞澶?===== */
        .floating-top-bar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--top-bar-height);
            z-index: 1100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 12px;
            background: color-mix(in srgb, var(--bg-card) 94%, transparent);
            border-bottom: 1px solid color-mix(in srgb, var(--text-muted) 18%, transparent);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
            transition: border-color .15s ease, box-shadow .15s ease;
        }
        .floating-top-bar.skin-changed {
            border-bottom-color: color-mix(in srgb, var(--primary) 50%, transparent);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
                        0 2px 0 color-mix(in srgb, var(--primary) 35%, transparent);
        }
        .top-bar-brand {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            font-size: 16px;
            font-weight: 900;
            color: #e80000;
            letter-spacing: 0.2px;
            white-space: nowrap;
            min-width: 0;
        }
        .top-bar-logo {
            width: 34px;
            height: 34px;
            object-fit: contain;
            flex-shrink: 0;
            display: block;
        }
        .top-bar-brand-text {
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 42vw;
        }
        .login-brand {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 6px;
        }
        .login-logo-img {
            width: 112px;
            height: 112px;
            object-fit: contain;
            display: block;
            margin-bottom: 2px;
        }
        .login-logo {
            font-size: 28px;
            font-weight: 900;
            color: #e80000;
            margin-bottom: 6px;
            letter-spacing: 1px;
            line-height: 1.2;
        }
        .skin-dropdown-wrap {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }
        .skin-dropdown-label {
            display: block;
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 900;
            margin-bottom: 0;
            white-space: nowrap;
        }
        .skin-dropdown {
            width: 132px;
            appearance: none;
            -webkit-appearance: none;
            background: color-mix(in srgb, var(--bg-main) 6%, var(--bg-card) 94%);
            color: var(--text-main);
            border: 1px solid color-mix(in srgb, var(--text-muted) 26%, transparent);
            border-radius: 10px;
            padding: 6px 28px 6px 10px;
            font-size: 12px;
            font-weight: 900;
            cursor: pointer;
            outline: none;
            background-image:
                linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
            background-position:
                calc(100% - 16px) calc(50% + 1px),
                calc(100% - 11px) calc(50% + 1px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
        }
        .skin-dropdown:hover {
            border-color: color-mix(in srgb, var(--primary) 28%, transparent);
            background: color-mix(in srgb, var(--bg-main) 2%, var(--bg-card) 98%);
        }
        .skin-dropdown:focus-visible {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
        }
        .skin-dropdown option { color: var(--text-main); }

        .top-bar-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
        }
        .lang-dropdown-wrap {
            display: flex;
            align-items: center;
            gap: 4px;
            position: relative;
        }
        .lang-dropdown {
            width: 118px;
            appearance: none;
            -webkit-appearance: none;
            background: color-mix(in srgb, var(--bg-main) 6%, var(--bg-card) 94%);
            color: var(--text-main);
            border: 1px solid color-mix(in srgb, var(--text-muted) 26%, transparent);
            border-radius: 10px;
            padding: 6px 24px 6px 8px;
            font-size: 11px;
            font-weight: 800;
            cursor: pointer;
            background-image:
                linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
            background-position:
                calc(100% - 14px) calc(50% + 1px),
                calc(100% - 9px) calc(50% + 1px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
        }
        .phone-row {
            display: flex;
            gap: 8px;
            align-items: stretch;
        }
        .country-select {
            flex: 0 0 132px;
            width: 132px;
            padding: 12px 6px;
            border: 1px solid #CCD6DD;
            border-radius: 8px;
            font-size: 11px;
            font-weight: bold;
            color: var(--text-main);
            background: #F8F9FA;
        }
        .phone-row .login-input {
            flex: 1;
            min-width: 0;
        }

        /* 图片国旗下拉（兼容 Windows 不显示国旗 Emoji） */
        .flag-select {
            position: relative;
            flex: 0 0 auto;
        }
        .flag-select-country {
            width: 132px;
        }
        .flag-select-locale {
            min-width: 118px;
        }
        .flag-select-native {
            position: absolute !important;
            opacity: 0 !important;
            pointer-events: none !important;
            width: 1px !important;
            height: 1px !important;
            left: 0;
            top: 0;
        }
        .flag-select-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 100%;
            min-height: 40px;
            padding: 6px 26px 6px 8px;
            border: 1px solid #CCD6DD;
            border-radius: 8px;
            background: #F8F9FA;
            color: var(--text-main);
            font-size: 11px;
            font-weight: 800;
            cursor: pointer;
            text-align: left;
            position: relative;
        }
        .flag-select-locale .flag-select-btn {
            min-height: 32px;
            border-radius: 10px;
            border-color: color-mix(in srgb, var(--text-muted) 26%, transparent);
            background: color-mix(in srgb, var(--bg-main) 6%, var(--bg-card) 94%);
        }
        .flag-select-img {
            width: 22px;
            height: 15px;
            object-fit: cover;
            border-radius: 2px;
            flex: 0 0 auto;
            box-shadow: 0 0 0 1px rgba(0,0,0,.08);
        }
        .flag-select-text {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .flag-select-caret {
            position: absolute;
            right: 10px;
            top: 50%;
            width: 0;
            height: 0;
            margin-top: -2px;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid var(--text-muted, #8899a6);
        }
        .flag-select-panel {
            position: absolute;
            left: 0;
            top: calc(100% + 4px);
            z-index: 80;
            min-width: 100%;
            max-height: 240px;
            overflow-y: auto;
            background: #fff;
            border: 1px solid #E1E8ED;
            border-radius: 10px;
            box-shadow: 0 10px 28px rgba(0,0,0,.12);
            padding: 4px;
        }
        .flag-select-locale .flag-select-panel {
            right: 0;
            left: auto;
            min-width: 148px;
        }
        .flag-select-item {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            border: none;
            background: transparent;
            padding: 8px 10px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-main);
            text-align: left;
        }
        .flag-select-item:hover,
        .flag-select-item.is-active {
            background: #FFF4EC;
            color: #E83B1A;
        }

        @media (max-width: 480px) {
            :root { --top-bar-height: 40px; }
            .top-bar-brand { font-size: 14px; gap: 6px; }
            .top-bar-logo { width: 30px; height: 30px; }
            .skin-dropdown-label { font-size: 10px; }
            .skin-dropdown {
                width: 108px;
                padding: 5px 24px 5px 8px;
                font-size: 11px;
            }
        }
