        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            /* 禁用 iOS 默认触摸高亮，解决阴影位置不对问题 */
            -webkit-tap-highlight-color: transparent;
        }
        
        /* 移动端/触摸设备禁用浮动背景动画 */
        @media (hover: none) and (pointer: coarse) {
            .floating-elements {
                display: none !important;
            }
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 20px;
            overflow: hidden;
            position: relative;
        }
        
        /* ========== 动态背景元素 ========== */
        .floating-elements {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
            z-index: 0;
        }
        
        .floating-item {
            position: absolute;
            color: rgba(255, 255, 255, 0.22);
            /* 使用本地字体，移除 Google Fonts 依赖 */
            font-family: 'Cambria Math', 'Latin Modern Math', 'Georgia', 'Times New Roman', serif;
            font-weight: 400;
            user-select: none;
            animation: float linear infinite;
            text-shadow: 0 2px 12px rgba(255, 255, 255, 0.15);
            letter-spacing: 0.02em;
            /* GPU 加速优化 */
            will-change: transform, opacity;
            transform: translateZ(0);
            backface-visibility: hidden;
        }
        
        /* 所有元素统一正体 */
        .floating-item.is-formula,
        .floating-item.is-symbol,
        .floating-item.is-operator {
            font-style: normal;
            font-weight: 400;
        }
        
        @keyframes float {
            0% {
                transform: translateY(100vh) translateX(0) rotate(0deg) translateZ(0);
                opacity: 0;
            }
            8% {
                opacity: 1;
            }
            92% {
                opacity: 1;
            }
            100% {
                transform: translateY(-100px) translateX(-10px) rotate(360deg) translateZ(0);
                opacity: 0;
            }
        }
        
        /* 不同大小的元素 - 整体缩小 */
        .floating-item.size-xs { font-size: 12px; }
        .floating-item.size-sm { font-size: 16px; }
        .floating-item.size-md { font-size: 22px; }
        .floating-item.size-lg { font-size: 30px; }
        .floating-item.size-xl { font-size: 42px; }
        
        /* 不同层次感 - 使用透明度替代blur滤镜，大幅提升性能 */
        .floating-item.depth-0 { opacity: 0.25; }
        .floating-item.depth-1 { opacity: 0.18; }
        .floating-item.depth-2 { opacity: 0.12; }
        .floating-item.depth-3 { opacity: 0.08; }
        
        .login-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 460px;
        }
        
        .login-card {
            background: white;
            border-radius: 20px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            padding: 36px 32px;
            animation: slideUp 0.5s ease-out;
        }
        
        /* ========== 登录方式Tab ========== */
        .login-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            background: #f3f4f6;
            padding: 6px;
            border-radius: 12px;
        }
        
        .login-tab {
            flex: 1;
            padding: 12px 8px;
            font-size: 14px;
            font-weight: 500;
            color: #6b7280;
            background: transparent;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            /* 精确指定 transition 属性，避免 all 的性能问题 */
            transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            /* 优化触摸响应 */
            touch-action: manipulation;
            -webkit-touch-callout: none;
        }
        
        .login-tab:hover {
            color: #374151;
        }
        
        .login-tab.active {
            background: white;
            color: #667eea;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        
        .login-tab.active.wechat-tab {
            color: #07c160;
        }
        
        .login-tab i {
            font-size: 16px;
        }
        
        .login-tab svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* 页面跳转过渡效果 */
        body.page-leaving {
            animation: fadeOut 0.5s ease-out forwards;
        }
        
        body.page-leaving .floating-elements {
            animation: fadeOut 0.5s ease-out forwards;
        }
        
        @keyframes fadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 28px;
        }
        
        .login-title {
            font-size: 24px;
            font-weight: 700;
            color: #1a1a2e;
            margin-bottom: 8px;
        }
        
        .login-subtitle {
            color: #6c757d;
            font-size: 14px;
        }
        
        /* 消息提示 */
        .message {
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
            margin-bottom: 20px;
            display: none;
        }
        .message.show { display: block; }
        .message.error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
        .message.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
        
        /* 登录面板切换 */
        .login-panel { display: none; }
        .login-panel.active { display: block; }
        
        /* ========== 微信扫码面板 ========== */
        .wechat-panel {
            text-align: center;
            /* 固定最小高度，避免加载前后卡片高度变化 */
            min-height: 255px;
        }
        
        .wechat-title {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 16px;
            font-weight: 600;
            color: #07c160;
            margin-bottom: 20px;
        }
        
        .wechat-title svg {
            width: 24px;
            height: 24px;
            fill: #07c160;
        }
        
        .qrcode-wrapper {
            display: flex;
            justify-content: center;
            margin-bottom: 8px;
        }
        
        .qrcode-box {
            width: 210px;
            height: 210px;
            border: none;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fff;
            position: relative;
            overflow: hidden;
        }
        
        /* 微信SDK创建的内部容器 */
        .qrcode-box #wechat-qrcode-inner {
            width: 300px;
            height: 400px;
            position: absolute;
            top: 10px;
            left: -50px;
        }
        
        .qrcode-box iframe {
            border: none !important;
            width: 300px !important;
            height: 400px !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        
        /* 二维码过期遮罩 */
        .qrcode-expired-mask {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255,255,255,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            cursor: pointer;
        }
        
        .qrcode-expired-mask .refresh-icon {
            width: 60px;
            height: 60px;
            background: rgba(102, 126, 234, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
        }
        
        .qrcode-expired-mask .refresh-icon i {
            font-size: 24px;
            color: white;
        }
        
        .qrcode-timer {
            text-align: center;
            font-size: 13px;
            color: #9ca3af;
            margin-top: 12px;
        }
        
        .qrcode-timer span {
            color: #07c160;
            font-weight: 500;
        }
        
        .qrcode-loading {
            text-align: center;
            color: #9ca3af;
            position: absolute;
            z-index: 5;
        }
        
        .qrcode-loading i {
            font-size: 28px;
            margin-bottom: 8px;
            animation: spin 1s linear infinite;
            color: #07c160;
        }
        
        .qrcode-loading div {
            font-size: 13px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .qrcode-tip {
            text-align: center;
            color: #6b7280;
            font-size: 15px;
            margin-bottom: 16px;
            font-weight: 400;
        }
        
        .qrcode-tip b {
            color: #3b82f6;
            font-weight: 600;
        }
        
        .qrcode-tip .highlight-register {
            color: #dc2626;
            font-weight: 700;
            font-size: 16px;
        }
        
        /* 扫码成功动画 - 简洁版 */
        .scan-success-container {
            width: 210px;
            height: 210px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .scan-success-circle {
            width: 120px;
            height: 120px;
            background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: successPop 0.25s ease-out forwards;
            box-shadow: 0 6px 20px rgba(7, 193, 96, 0.3);
        }
        
        @keyframes successPop {
            0% { transform: scale(0); }
            100% { transform: scale(1); }
        }
        
        .scan-success-check {
            width: 50px;
            height: 50px;
        }
        
        .scan-success-check svg {
            width: 100%;
            height: 100%;
            fill: none;
            stroke: white;
            stroke-width: 6;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        
        .scan-success-check svg path {
            stroke-dasharray: 100;
            stroke-dashoffset: 100;
            animation: checkDraw 0.2s ease-out 0.15s forwards;
        }
        
        @keyframes checkDraw {
            to { stroke-dashoffset: 0; }
        }
        
        /* 登录成功使用紫色主题 */
        .scan-success-circle.login-success {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
        }
        
        /* 其他登录方式按钮 */
        .other-login-btns {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .other-login-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 14px;
            font-size: 15px;
            font-weight: 500;
            background: #f5f5f5;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            color: #333;
        }
        
        .other-login-btn:hover {
            background: #ebebeb;
        }
        
        .other-login-btn i {
            font-size: 18px;
            color: #666;
        }
        
        /* ========== 密码/验证码登录面板 ========== */
        .form-panel-header {
            display: flex;
            align-items: center;
            margin-bottom: 24px;
        }
        
        .back-btn {
            width: 36px;
            height: 36px;
            border: none;
            background: #f3f4f6;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6b7280;
            transition: background-color 0.15s ease, color 0.15s ease;
            margin-right: 12px;
        }
        
        .back-btn:hover {
            background: #e5e7eb;
            color: #374151;
        }
        
        .form-panel-title {
            font-size: 18px;
            font-weight: 600;
            color: #1f2937;
        }
        
        .form-group {
            margin-bottom: 18px;
        }
        
        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: #374151;
            margin-bottom: 8px;
        }
        
        .form-input {
            width: 100%;
            padding: 14px 16px;
            font-size: 15px;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            outline: none;
            transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            background: #f9fafb;
        }
        
        .form-input:focus {
            border-color: #667eea;
            background: white;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }
        
        .form-input::placeholder {
            color: #9ca3af;
        }
        
        .code-input-group {
            display: flex;
            gap: 10px;
        }
        
        .code-input-group .form-input {
            flex: 1;
        }
        
        .send-code-btn {
            padding: 14px 20px;
            font-size: 14px;
            font-weight: 500;
            color: white;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            white-space: nowrap;
            transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            min-width: 110px;
            touch-action: manipulation;
            -webkit-touch-callout: none;
        }
        
        .send-code-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }
        
        .send-code-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        .form-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .remember-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 14px;
            color: #6b7280;
        }
        
        .remember-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #667eea;
        }
        
        .forgot-link {
            font-size: 14px;
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }
        
        .forgot-link:hover {
            text-decoration: underline;
        }
        
        .submit-btn {
            width: 100%;
            padding: 14px;
            font-size: 16px;
            font-weight: 600;
            color: white;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            touch-action: manipulation;
            -webkit-touch-callout: none;
        }
        
        .submit-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
        }
        
        .submit-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }
        
        .loading-spinner {
            display: inline-block;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
        }
        
        /* ========== 底部协议 ========== */
        .agreement-section {
            margin-top: 28px;
            padding-top: 20px;
            border-top: 1px solid #f0f0f0;
        }
        
        .agreement-item {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: 10px;
            font-size: 13px;
            color: #9ca3af;
            margin-bottom: 10px;
        }
        
        .agreement-item input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin-top: 2px;
            accent-color: #07c160;
            flex-shrink: 0;
        }
        
        .agreement-item a {
            color: #667eea;
            text-decoration: none;
        }
        
        .agreement-item a:hover {
            text-decoration: underline;
        }
        
        .register-link {
            text-align: center;
            margin-top: 16px;
            font-size: 14px;
            color: #6b7280;
        }
        
        .register-link a {
            color: #3b82f6;
            text-decoration: none;
            font-weight: 600;
        }
        
        .register-link a:hover {
            text-decoration: underline;
        }
        
        .back-home {
            text-align: center;
            margin-top: 16px;
        }
        
        .back-home a {
            color: #9ca3af;
            text-decoration: none;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        
        .back-home a:hover {
            color: #667eea;
        }
        
        /* 响应式 - 平板 */
        @media (max-width: 768px) {
            body {
                padding: 16px;
            }
            
            .login-container {
                max-width: 420px;
            }
            
            .login-card {
                padding: 28px 24px;
                border-radius: 16px;
            }
            
            .login-header {
                margin-bottom: 20px;
            }
            
            .login-title {
                font-size: 20px;
            }
            
            .login-subtitle {
                font-size: 13px;
            }
            
            .login-tabs {
                gap: 4px;
                padding: 4px;
            }
            
            .login-tab {
                padding: 10px 6px;
                font-size: 13px;
                gap: 4px;
            }
            
            .login-tab i {
                font-size: 14px;
            }
            
            .login-tab svg {
                width: 16px;
                height: 16px;
            }
            
            .qrcode-box {
                width: 190px;
                height: 190px;
            }
            
            .qrcode-box #wechat-qrcode-inner {
                top: 0px;
                left: -55px;
            }
            
            .wechat-panel {
                min-height: 235px;
            }
            
            .other-login-btn {
                padding: 12px;
                font-size: 14px;
            }
            
            .agreement-section {
                margin-top: 20px;
                padding-top: 16px;
            }
        }
        
        /* 响应式 - 手机 */
        @media (max-width: 480px) {
            body {
                padding: 12px;
            }
            
            .login-container {
                max-width: 100%;
            }
            
            .login-card {
                padding: 24px 16px;
                border-radius: 14px;
                box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.2);
            }
            
            .login-header {
                margin-bottom: 14px;
            }
            
            .login-title {
                font-size: 18px;
            }
            
            .login-subtitle {
                font-size: 12px;
            }
            
            .login-tabs {
                gap: 3px;
                padding: 3px;
                margin-bottom: 18px;
            }
            
            .login-tab {
                padding: 9px 4px;
                font-size: 12px;
                gap: 3px;
            }
            
            .login-tab i {
                font-size: 13px;
            }
            
            .login-tab svg {
                width: 14px;
                height: 14px;
            }
            
            .qrcode-wrapper {
                margin-bottom: 4px;
            }
            
            .qrcode-box {
                width: 180px;
                height: 180px;
            }
            
            .qrcode-box #wechat-qrcode-inner {
                top: 0px;
                left: -60px;
            }
            
            .qrcode-timer {
                font-size: 11px;
                margin-top: 8px;
            }
            
            .qrcode-tip {
                font-size: 13px;
            }
            
            .qrcode-tip .highlight-register {
                font-size: 14px;
            }
            
            .wechat-panel {
                min-height: 240px;
            }
            
            .other-login-btns {
                gap: 8px;
            }
            
            .other-login-btn {
                padding: 11px;
                font-size: 13px;
                border-radius: 40px;
            }
            
            .other-login-btn i {
                font-size: 16px;
            }
            
            .form-group {
                margin-bottom: 14px;
            }
            
            .form-label {
                font-size: 13px;
                margin-bottom: 6px;
            }
            
            .form-input {
                padding: 12px 14px;
                font-size: 14px;
                border-radius: 10px;
            }
            
            .code-input-group {
                flex-direction: column;
            }
            
            .send-code-btn {
                width: 100%;
                padding: 12px;
            }
            
            .submit-btn {
                padding: 12px;
                font-size: 15px;
                border-radius: 10px;
            }
            
            .agreement-section {
                margin-top: 16px;
                padding-top: 14px;
            }
            
            .agreement-item {
                font-size: 12px;
            }
            
            .register-link {
                font-size: 12px;
                margin-top: 14px;
            }
            
            .back-home {
                margin-top: 12px;
            }
            
            .back-home a {
                font-size: 12px;
            }
            
            /* 背景元素在手机端更小 */
            .floating-item.size-xs { font-size: 10px; }
            .floating-item.size-sm { font-size: 13px; }
            .floating-item.size-md { font-size: 18px; }
            .floating-item.size-lg { font-size: 24px; }
            .floating-item.size-xl { font-size: 32px; }
        }
        
        /* 响应式 - 超小屏幕 */
        @media (max-width: 360px) {
            body {
                padding: 10px;
            }
            
            .login-card {
                padding: 20px 14px;
            }
            
            .login-title {
                font-size: 17px;
            }
            
            .qrcode-box {
                width: 170px;
                height: 170px;
            }
            
            .qrcode-box #wechat-qrcode-inner {
                top: 0px;
                left: -65px;
            }
        }
