
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --bg: #f0f2f5;
            --surface: #ffffff;
            --primary: #2a7de1;
            --primary-hover: #1a5fb4;
            --danger: #dc2626;
            --text: #1e293b;
            --text-secondary: #64748b;
            --border: #e2e8f0;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
            --radius: 12px;
            --topbar-height: 56px;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            padding-top: var(--topbar-height);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding-left: 16px;
            padding-right: 16px;
            -webkit-user-select: none;
            user-select: none;
        }

        /* ===== 顶栏 ===== */
        .topbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--topbar-height);
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            z-index: 100;
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }

        .topbar-inner {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
        }

        .back-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 30px;
            transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
            font-family: inherit;
            line-height: 1;
        }

        .back-btn i {
            font-size: 18px;
        }

        .back-btn:hover {
            background: var(--bg);
            color: var(--text);
            transform: translateX(-2px);
        }

        .back-btn:active {
            transform: translateX(-2px) scale(0.96);
        }

        /* ===== 卡片容器 ===== */
        .card {
            max-width: 420px;
            width: 100%;
            background: var(--surface);
            border-radius: 24px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
            padding: 36px 30px 40px;
            border: 1px solid var(--border);
            animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 480px;
            position: relative;
        }

        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(12px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .view {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .view.active {
            display: block;
        }

        .card h1 {
            font-size: 28px;
            font-weight: 600;
            color: var(--text);
            letter-spacing: -0.3px;
            margin-bottom: 6px;
        }

        .sub {
            color: var(--text-secondary);
            font-size: 15px;
            margin-bottom: 28px;
        }

        /* ===== 胶囊切换标签 ===== */
        .tabs {
            display: flex;
            background: var(--bg);
            border-radius: 40px;
            padding: 4px;
            margin-bottom: 28px;
            height: 48px;
            position: relative;
            box-sizing: border-box;
        }

        .tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 30px;
            font-weight: 500;
            font-size: 15px;
            color: var(--text-secondary);
            background: transparent;
            border: none;
            cursor: pointer;
            transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
            font-family: inherit;
            line-height: normal;
            padding: 0;
            margin: 0;
            height: 100%;
            box-sizing: border-box;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
        }

        .tab:hover {
            color: var(--text);
        }

        .tab.active {
            background: var(--surface);
            color: var(--text);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            font-weight: 600;
        }

        /* ===== 表单 ===== */
        .form-group {
            margin-bottom: 18px;
        }

        .form-group label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: var(--text);
            margin-bottom: 5px;
        }

        .form-group input[type="text"],
        .form-group input[type="password"],
        .form-group input[type="email"] {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 18px;
            font-size: 15px;
            background: var(--bg);
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
            color: var(--text);
            font-family: inherit;
            outline: none;
            -webkit-user-select: text;
            user-select: text;
        }

        .form-group input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.12);
            background: var(--surface);
        }

        .form-group input::placeholder {
            color: #9aabbf;
        }

        /* ===== 复选框 ===== */
        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 6px 0 18px 0;
            cursor: pointer;
        }

        .checkbox-group input[type="checkbox"] {
            display: none;
        }

        .checkmark {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s ease;
            background: var(--bg);
        }

        .checkbox-group input:checked+.checkmark {
            background: var(--primary);
            border-color: var(--primary);
        }

        .checkbox-group input:checked+.checkmark::after {
            content: "✓";
            color: white;
            font-size: 14px;
            font-weight: 700;
        }

        .checkbox-group:hover .checkmark {
            border-color: var(--primary);
        }

        .checkbox-label {
            font-size: 14px;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .checkbox-label strong {
            color: var(--text);
        }

        /* ===== 按钮 ===== */
        .btn-primary {
            width: 100%;
            padding: 14px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 40px;
            font-size: 17px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
            margin-top: 6px;
            box-shadow: 0 4px 12px rgba(42, 125, 225, 0.2);
            font-family: inherit;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-primary:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(42, 125, 225, 0.35);
        }

        .btn-primary:active {
            transform: scale(0.97);
            box-shadow: 0 4px 12px rgba(42, 125, 225, 0.2);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
            box-shadow: 0 4px 12px rgba(42, 125, 225, 0.1);
        }

        .btn-secondary {
            width: 100%;
            padding: 14px;
            background: var(--bg);
            color: var(--text-secondary);
            border: 1px solid var(--border);
            border-radius: 40px;
            font-size: 17px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.25s ease, transform 0.2s ease;
            font-family: inherit;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 10px;
        }

        .btn-secondary:hover {
            background: #e5e7eb;
            transform: translateY(-1px);
        }

        .btn-secondary:active {
            transform: scale(0.97);
        }

        .btn-danger {
            width: 100%;
            padding: 14px;
            background: #fef2f2;
            color: var(--danger);
            border: 1px solid #fecaca;
            border-radius: 40px;
            font-size: 17px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.25s ease, transform 0.2s ease;
            font-family: inherit;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 10px;
        }

        .btn-danger:hover {
            background: #fee2e2;
            transform: translateY(-1px);
        }

        .btn-danger:active {
            transform: scale(0.97);
        }

        .btn-outline {
            width: 100%;
            padding: 14px;
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border);
            border-radius: 40px;
            font-size: 17px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.25s ease, transform 0.2s ease;
            font-family: inherit;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 10px;
        }

        .btn-outline:hover {
            background: var(--bg);
            transform: translateY(-1px);
        }

        .btn-outline:active {
            transform: scale(0.97);
        }

        .btn-hidden {
            display: none !important;
        }

        /* ===== 授权视图 ===== */
        .user-info {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 18px;
            background: var(--bg);
            border-radius: 16px;
            margin-bottom: 24px;
        }

        .user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 35%;
            /* 圆角35px */
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 600;
            flex-shrink: 0;
            overflow: hidden;
            object-fit: cover;
        }

        .user-avatar img {
            width: 100%;
            height: 100%;
            border-radius: 35%;
            object-fit: cover;
        }

        .user-detail {
            flex: 1;
        }

        .user-detail .name {
            font-size: 17px;
            font-weight: 600;
            color: var(--text);
        }

        .user-detail .hint {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .permission-box {
            background: #f8fafc;
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px 18px;
            margin-bottom: 24px;
        }

        .permission-box .title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 8px;
        }

        .permission-box .item {
            font-size: 15px;
            color: var(--text);
            padding: 4px 0;
        }

        .permission-box .item i {
            color: var(--primary);
            margin-right: 10px;
            width: 18px;
        }

        .auth-actions {
            display: flex;
            gap: 10px;
            margin-top: 4px;
        }

        .auth-actions .btn-primary {
            flex: 2;
        }

        .auth-actions .btn-secondary {
            flex: 1;
            margin-top: 0;
        }

        /* ===== 用户中心 ===== */
        .profile-field {
            margin-bottom: 16px;
        }

        .profile-field label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 2px;
        }

        .profile-field .value {
            font-size: 16px;
            padding: 10px 0;
            border-bottom: 1px solid var(--border);
            color: var(--text);
        }

        .profile-field .value-input {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: 12px;
            font-size: 15px;
            background: var(--bg);
            transition: border-color 0.2s ease;
            color: var(--text);
            font-family: inherit;
            outline: none;
        }

        .profile-field .value-input:focus {
            border-color: var(--primary);
            background: var(--surface);
        }

        .profile-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 12px;
        }

        .profile-actions .row {
            display: flex;
            gap: 8px;
        }

        .profile-actions .row .btn-primary {
            flex: 2;
            margin-top: 0;
        }

        .profile-actions .row .btn-outline {
            flex: 1;
            margin-top: 0;
        }

        /* ===== 消息 ===== */
        .message {
            font-size: 14px;
            margin-top: 16px;
            padding: 12px 16px;
            border-radius: 16px;
            display: none;
            animation: fadeUp 0.3s ease;
        }

        .message.error {
            display: block;
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
        }

        .message.success {
            display: block;
            background: #f0fdf4;
            color: #16a34a;
            border: 1px solid #bbf7d0;
        }

        .message.info {
            display: block;
            background: #eff6ff;
            color: #2563eb;
            border: 1px solid #bfdbfe;
        }

        /* ===== Toast 弹窗 ===== */
        .toast-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 200;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.25s ease;
        }

        .toast-overlay.show {
            display: flex;
        }

        .toast-box {
            background: var(--surface);
            border-radius: 20px;
            padding: 32px 28px 28px;
            max-width: 340px;
            width: 90%;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
            animation: fadeUp 0.3s ease;
        }

        .toast-box .icon {
            font-size: 48px;
            margin-bottom: 12px;
        }

        .toast-box h3 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .toast-box p {
            font-size: 15px;
            color: var(--text-secondary);
            margin-bottom: 20px;
        }

        .toast-box .btn-primary {
            margin-top: 0;
            width: auto;
            padding: 10px 32px;
            display: inline-block;
        }

        /* ===== 响应式 ===== */
        @media (max-width: 480px) {
            .card {
                padding: 24px 18px;
                min-height: 400px;
            }

            .topbar {
                padding: 0 12px;
            }

            .back-btn {
                font-size: 14px;
                padding: 6px 10px;
            }

            .auth-actions {
                flex-direction: column;
            }

            .auth-actions .btn-secondary {
                margin-top: 8px;
            }

            .profile-actions .row {
                flex-direction: column;
            }

            .profile-actions .row .btn-primary,
            .profile-actions .row .btn-outline {
                flex: unset;
            }
        }

        ::-webkit-scrollbar {
            width: 0;
            height: 0;
        }