/* ==================== 认证弹窗样式 ==================== */

/* 弹窗容器 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-modal.show {
    display: flex;
}

/* 遮罩层 */
.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* 弹窗内容 */
.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 32px;
    animation: authModalIn 0.3s ease;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.auth-modal-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

@keyframes authModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 关闭按钮 */
.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #E5E7EB;
    color: #374151;
    cursor: pointer;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    padding: 0;
    font-family: Arial, sans-serif;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    z-index: 10;
}

.auth-modal-close:hover {
    background: #E2E8F0;
    color: #1F2937;
}

/* Tab切换 */
.auth-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E8ECF0;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    background: #F1F5F9;
    color: #1F2937;
}

.auth-tab.active {
    background: #5B5FC7;
    color: white;
}

/* 面板 */
.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* 表单样式 */
.auth-modal-form {
    margin-bottom: 20px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
    margin-bottom: 6px;
}

.auth-input-group {
    position: relative;
}

.auth-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    pointer-events: none;
}

.auth-form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    border: 2px solid #E8ECF0;
    border-radius: 10px;
    background: #FAFBFC;
    color: #1F2937;
    transition: all 0.2s;
    outline: none;
}

.auth-form-input:focus {
    border-color: #5B5FC7;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(91, 95, 199, 0.1);
}

.auth-form-input::placeholder {
    color: #94A3B8;
}

/* 输入行（带按钮） */
.auth-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* 验证码图片 */
.auth-captcha-img {
    height: 46px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid #E8ECF0;
}

/* 表单提示 */
.auth-form-hint {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 4px;
}

.auth-optional {
    color: #94A3B8;
    font-weight: normal;
}

.auth-required {
    color: #EF4444;
}

/* 表单行 */
.auth-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 复选框 */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748B;
    cursor: pointer;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 链接 */
.auth-link {
    font-size: 13px;
    color: #5B5FC7;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* 按钮 */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.auth-btn-primary {
    background: #5B5FC7;
    color: white;
}

.auth-btn-primary:hover {
    background: #4B4FB7;
    transform: translateY(-1px);
}

.auth-btn-primary:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-outline {
    background: transparent;
    border: 2px solid #E8ECF0;
    color: #64748B;
    width: auto;
    flex-shrink: 0;
    padding: 10px 16px;
}

.auth-btn-outline:hover {
    border-color: #5B5FC7;
    color: #5B5FC7;
}

.auth-btn-outline:disabled {
    border-color: #E8ECF0;
    color: #94A3B8;
    cursor: not-allowed;
}

.auth-btn-qq {
    background: #12B7F5;
    color: white;
}

.auth-btn-qq:hover {
    background: #0099D8;
}

.auth-send-code-btn {
    white-space: nowrap;
    min-width: 100px;
}

/* 分割线 */
.auth-modal-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8ECF0;
}

.auth-modal-divider span {
    padding: 0 12px;
    font-size: 13px;
    color: #94A3B8;
}

/* 底部 */
.auth-modal-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #E8ECF0;
}

.auth-modal-footer p {
    margin: 0;
    font-size: 13px;
    color: #64748B;
}

.auth-modal-footer a {
    color: #5B5FC7;
    text-decoration: none;
    font-weight: 500;
}

.auth-modal-footer a:hover {
    text-decoration: underline;
}

/* ==================== 暗色主题 ==================== */
body.dark-theme .auth-modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-theme .auth-modal-close {
    background: #333;
    color: #aaa;
}

body.dark-theme .auth-modal-close:hover {
    background: #444;
    color: #fff;
}

body.dark-theme .auth-modal-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .auth-tab {
    color: #888;
}

body.dark-theme .auth-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
}

body.dark-theme .auth-tab.active {
    background: #444;
    color: #fff;
}

body.dark-theme .auth-form-label {
    color: #aaa;
}

body.dark-theme .auth-input-group i {
    color: #666;
}

body.dark-theme .auth-form-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.dark-theme .auth-form-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.dark-theme .auth-form-input::placeholder {
    color: #555;
}

body.dark-theme .auth-form-hint {
    color: #666;
}

body.dark-theme .auth-captcha-img {
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .auth-checkbox {
    color: #888;
}

body.dark-theme .auth-link {
    color: #aaa;
}

body.dark-theme .auth-btn-primary {
    background: #444;
}

body.dark-theme .auth-btn-primary:hover {
    background: #555;
}

body.dark-theme .auth-btn-primary:disabled {
    background: #333;
}

body.dark-theme .auth-btn-outline {
    border-color: rgba(255, 255, 255, 0.15);
    color: #888;
}

body.dark-theme .auth-btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #ccc;
}

body.dark-theme .auth-btn-outline:disabled {
    border-color: rgba(255, 255, 255, 0.08);
    color: #555;
}

body.dark-theme .auth-modal-divider::before,
body.dark-theme .auth-modal-divider::after {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .auth-modal-divider span {
    color: #555;
}

body.dark-theme .auth-modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .auth-modal-footer p {
    color: #666;
}

body.dark-theme .auth-modal-footer a {
    color: #aaa;
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .auth-modal-content {
        max-width: calc(100% - 32px);
        padding: 24px;
        margin: 16px;
    }
    
    .auth-modal-close {
        top: 10px;
        right: 10px;
    }
    
    .auth-modal-tabs {
        gap: 4px;
    }
    
    .auth-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .auth-input-row {
        flex-direction: column;
    }
    
    .auth-send-code-btn {
        width: 100%;
    }
}
