/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: transparent;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-dim: #6b7280;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-light: #60a5fa;
    --border-color: #2a2a2a;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* 背景装饰 */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 主容器 */
.login-container {
    position: relative;
    z-index: 10;
    max-width: 450px;
    width: 100%;
    background: transparent;
    border: none;
    padding: 50px 40px 40px;
    animation: fadeInUp 0.6s ease-out;
    transition: max-width 0.3s ease, padding 0.3s ease;
}

/* 用户协议和帮助中心页面容器扩展到界面边缘 */
.login-container:has(#agreementContainer:not(.hidden)),
.login-container:has(#helpContainer:not(.hidden)) {
    max-width: calc(100vw - 80px);
    padding: 50px 60px 40px;
}

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

/* Logo区域 */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    overflow: hidden;
    border-radius: 8px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.logo-subtext {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* 标题 */
.page-title {
    font-size: 32px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* 描述文字 */
.page-description {
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.help-link {
    color: var(--accent-blue-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.help-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

/* 验证码输入组 */
.verification-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.verification-group input {
    flex: 1;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    cursor: pointer;
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
    background: #000000;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--accent-blue-light);
}

/* 用户协议复选框 */
.agreement-checkbox {
    margin: 20px 0 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 0;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 2px solid #2a2a2a;
    border-radius: 3px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container:hover .checkmark {
    border-color: var(--accent-blue-light);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-label {
    margin-left: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.agreement-link {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
}

.agreement-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* 获取验证码按钮 */
.get-code-btn {
    padding: 14px 20px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: var(--accent-blue-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.get-code-btn:hover:not(:disabled) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.get-code-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    color: var(--text-dim);
}

.get-code-btn.sending {
    pointer-events: none;
}

.get-code-btn.sending .btn-text {
    opacity: 0.5;
}

/* 继续按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 分隔线 */
.divider {
    position: relative;
    text-align: center;
    margin: 30px 0 25px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: #000000;
    color: var(--text-dim);
    font-size: 13px;
    z-index: 1;
}

/* 社交登录按钮 */
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: #0a0a0a;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px var(--shadow-color);
}

.social-btn.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-btn.apple:hover {
    background: #000000;
    border-color: #000000;
}

.social-btn.google:hover {
    background: #ffffff;
    color: #1a1f2e;
    border-color: #ffffff;
}

/* 其他登录方式 */
.other-login-methods {
    margin: 30px 0 20px;
}

.divider-text {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider-text span {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    z-index: 1;
}

.login-methods {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.method-btn {
    flex: 1;
    max-width: 180px;
    padding: 14px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.method-btn i {
    font-size: 24px;
    color: var(--accent-blue-light);
}

.method-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.method-btn:hover i {
    color: var(--accent-blue);
}

/* 底部链接 */
.footer-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.login-link,
.switch-link {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.login-link:hover,
.switch-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* 页面指示器 */
.page-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: var(--accent-blue);
    width: 24px;
    border-radius: 4px;
}

.dot:hover {
    background: var(--accent-blue-light);
}

/* 表单容器切换 */
.form-container {
    animation: fadeIn 0.5s ease-out;
}

.form-container.hidden {
    display: none;
}

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

/* 用户协议内容 */
.agreement-content {
    padding: 30px 40px;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 协议页面Grid布局 - 从左到右、从上到下排列 */
#agreementContainer .agreement-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 40px;
}

#agreementContainer .agreement-section {
    grid-column: span 1;
}

/* 协议底部信息横跨两列 */
#agreementContainer .agreement-footer {
    grid-column: 1 / -1;
}

/* 帮助中心页面Grid布局 */
#helpContainer .help-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 40px;
}

#helpContainer .help-section {
    grid-column: span 1;
}

#helpContainer .help-footer {
    grid-column: 1 / -1;
}

.agreement-section {
    margin-bottom: 30px;
}

.agreement-section:last-child {
    margin-bottom: 15px;
}

.agreement-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    margin-top: 25px;
    letter-spacing: 0.5px;
}

.agreement-section h3:first-child {
    margin-top: 0;
}

.agreement-section h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-blue-light);
    margin: 18px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-blue);
}

.agreement-section p {
    font-size: 14px;
    line-height: 2;
    color: #d1d5db;
    margin-bottom: 12px;
    text-align: justify;
    letter-spacing: 0.3px;
}

.agreement-section ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.agreement-section li {
    font-size: 13px;
    line-height: 2;
    color: #d1d5db;
    padding-left: 28px;
    position: relative;
    margin-bottom: 10px;
}

.agreement-section li::before {
    content: '●';
    position: absolute;
    left: 12px;
    color: var(--accent-blue);
    font-size: 8px;
    top: 8px;
}

.agreement-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.agreement-footer p {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 10px;
    line-height: 1.8;
}

.agreement-footer a {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
}

.agreement-footer a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.agreement-footer .update-time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.agreement-actions {
    margin-top: 20px;
    margin-bottom: 15px;
}

.agreement-actions .submit-btn {
    width: 100%;
}

/* 帮助中心内容 - 与协议样式完全一致 */
.help-content {
    padding: 30px 40px;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.help-section {
    margin-bottom: 30px;
}

.help-section:last-child {
    margin-bottom: 15px;
}

.help-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    margin-top: 25px;
    letter-spacing: 0.5px;
}

.help-section h3:first-child {
    margin-top: 0;
}

.help-item {
    margin-bottom: 20px;
}

.help-item:last-child {
    margin-bottom: 0;
}

.help-item h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-blue-light);
    margin: 18px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-blue);
}

.help-item:first-child h4 {
    margin-top: 0;
}

.help-item p {
    font-size: 14px;
    line-height: 2;
    color: #d1d5db;
    margin-bottom: 12px;
    text-align: justify;
    letter-spacing: 0.3px;
}

.help-item a {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
}

.help-item a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.help-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.help-footer p {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 10px;
    line-height: 1.8;
}

.help-footer a {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
}

.help-footer a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* APP扫码登录页面 */
.qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

.qrcode-box {
    text-align: center;
}

.qrcode-image {
    width: 280px;
    height: 280px;
    margin: 0 auto 25px;
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.qrcode-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.4);
}

.qrcode-image svg {
    width: 100%;
    height: 100%;
}

.qrcode-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.qrcode-status i {
    font-size: 32px;
    color: var(--accent-blue-light);
}

.status-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.refresh-qrcode {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto 30px;
}

.refresh-qrcode:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue-light);
    background: rgba(59, 130, 246, 0.05);
}

.refresh-qrcode i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.refresh-qrcode:hover i {
    transform: rotate(180deg);
}

.qrcode-tips {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.tip-item i {
    color: var(--accent-blue-light);
    font-size: 16px;
}

.download-link {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.download-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* 扫码成功状态 */
.qrcode-box.scanned .qrcode-image {
    border: 3px solid #10b981;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.qrcode-box.scanned .status-text {
    color: #10b981;
}

/* 二维码过期状态 */
.qrcode-box.expired .qrcode-image {
    opacity: 0.4;
    filter: grayscale(100%);
}

.qrcode-box.expired .status-text {
    color: #ef4444;
}

/* 返回首页按钮 */
.back-home {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #2a2a2a;
    border-radius: 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.back-home:hover {
    background: #0a0a0a;
    color: var(--text-primary);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.back-home i {
    font-size: 14px;
}

/* 表单验证样式 */
.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group select.success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #0a0a0a;
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.info {
    border-left: 4px solid var(--accent-blue);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.notification-icon {
        font-size: 18px;
    }
    
/* 响应式设计 */
@media (max-width: 1200px) {
    .login-container:has(#agreementContainer:not(.hidden)),
    .login-container:has(#helpContainer:not(.hidden)) {
        max-width: calc(100vw - 60px);
        padding: 50px 40px 40px;
    }
}

@media (max-width: 1024px) {
    #agreementContainer .agreement-content {
        grid-template-columns: 1fr;
    }

    #helpContainer .help-content {
        grid-template-columns: 1fr;
    }

    .login-container:has(#agreementContainer:not(.hidden)),
    .login-container:has(#helpContainer:not(.hidden)) {
        max-width: calc(100vw - 40px);
        padding: 40px 30px 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .login-container {
        padding: 40px 30px 30px;
        max-width: 100%;
    }

    .login-container:has(#agreementContainer:not(.hidden)),
    .login-container:has(#helpContainer:not(.hidden)) {
        max-width: calc(100vw - 40px);
        padding: 40px 20px 30px;
    }

    .logo-icon {
        width: 160px;
        height: 160px;
    }

    .page-title {
        font-size: 28px;
    }

    .agreement-content {
        padding: 20px;
    }

    #agreementContainer .agreement-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .agreement-section h3 {
        font-size: 16px;
    }

    .agreement-section h4 {
        font-size: 13px;
        padding-left: 10px;
    }

    .agreement-section p {
        font-size: 13px;
        line-height: 1.9;
    }

    .agreement-section li {
        font-size: 12px;
        padding-left: 24px;
    }

    .agreement-section li::before {
        left: 10px;
        font-size: 7px;
    }

    .back-home {
        top: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .back-home span {
        display: none;
    }

    .notification {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px 25px;
    }

    .login-container:has(#agreementContainer:not(.hidden)),
    .login-container:has(#helpContainer:not(.hidden)) {
        max-width: calc(100vw - 20px);
        padding: 30px 15px 25px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-description {
        font-size: 13px;
    }

    .qrcode-image {
        width: 220px;
        height: 220px;
        padding: 12px;
    }

    .qrcode-status i {
        font-size: 28px;
    }

    .status-text {
        font-size: 14px;
    }

    .qrcode-section {
        padding: 30px 0;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .get-code-btn {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 100px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }

    .checkbox-label {
        font-size: 12px;
    }

    .checkmark {
        height: 16px;
        width: 16px;
    }

    .checkmark::after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .logo-icon {
        width: 120px;
        height: 120px;
    }

    .login-methods {
        flex-direction: column;
    }

    .method-btn {
        max-width: 100%;
        flex-direction: row;
        justify-content: center;
    }

    .method-btn i {
        font-size: 20px;
    }

    .agreement-content {
        padding: 18px 20px;
    }

    #agreementContainer .agreement-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .agreement-section {
        margin-bottom: 15px;
    }

    .agreement-section h3 {
        font-size: 15px;
        margin-top: 15px;
    }

    .agreement-section h4 {
        font-size: 12px;
        padding-left: 8px;
        margin: 12px 0 8px;
    }

    .agreement-section p {
        font-size: 12px;
        line-height: 1.8;
    }

    .agreement-section li {
        font-size: 11px;
        padding-left: 20px;
        margin-bottom: 8px;
    }

    .agreement-section li::before {
        left: 8px;
        font-size: 6px;
        top: 6px;
    }
}

/* 暗色模式优化 */
@media (prefers-color-scheme: dark) {
    body {
        background: #000000;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .login-container {
        border-width: 2px;
    }

    .form-group input,
    .form-group select,
    .social-btn {
        border-width: 2px;
    }
}

/* 减少动画（可访问性） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
