/* ========================================
   登录/注册页面样式
   PC 端适配 + 响应式设计
   ======================================== */

.auth-body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景装饰 */
.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.auth-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 0% 50%, rgba(168, 85, 247, 0.15), transparent 50%),
        radial-gradient(ellipse at 100% 50%, rgba(212, 175, 55, 0.1), transparent 50%);
}

.auth-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.08) 1.5px, transparent 1.5px),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.08) 1.5px, transparent 1.5px);
    background-size: 300px 300px;
    background-position: 0 0, 150px 150px;
    opacity: 0.6;
    animation: particlesMove 60s linear infinite;
}

@keyframes particlesMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-300px); }
}

/* 主容器 */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
}

/* 品牌区域（左侧） */
.auth-brand {
    flex: 1;
    display: none;
    padding: 60px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--glass-border);
}

@media (min-width: 992px) {
    .auth-brand {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 100px; /* 调整左侧顶部位置 */
    }
}

/* 表单容器（右侧） */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    max-width: 480px; 
    margin: 0 auto;
}

@media (min-width: 992px) {
    .auth-form-container {
        /* 关键对齐：设为 105px，补偿“创建账号”大字体的行高，使其与左侧 Logo 视觉对齐 */
        padding: 105px 60px 40px; 
    }
}
}

/* 移动端品牌 Logo - 针对 PC 端进行极致缩小 */
.mobile-brand {
    text-align: center;
    padding: 0; /* 彻底移除 padding */
    margin-bottom: 20px; /* 仅保留少量下边距 */
}

.mobile-brand .logo-icon {
    font-size: 36px; /* 从 48px 缩小到 36px */
    margin-bottom: 4px;
}

.mobile-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 20px; /* 从 32px 显著缩小到 20px */
    background: linear-gradient(to bottom, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

/* 表单容器（右侧） */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    max-width: 480px; /* 缩小容器宽度，让布局更紧凑 */
    margin: 0 auto;
}

@media (min-width: 992px) {
    .auth-form-container {
        padding: 40px 60px 20px; /* 顶部间距由 80px 减半至 40px */
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 输入框间距从 16px 缩小到 12px */
}

.form-group label {
    display: block;
    font-size: 13px; /* 标签字体缩小 */
    color: var(--text-muted);
    margin-bottom: 4px; /* 缩小标签与输入框间距 */
}

/* 协议弹窗美化 */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.terms-modal-card {
    max-width: 700px !important;
    width: 90% !important;
    max-height: 85vh !important;
    background: #120a21 !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 24px !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8) !important;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 30px 40px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    text-align: center;
    position: relative;
}

.modal-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 24px !important;
    color: var(--primary-gold) !important;
    margin: 0 !important;
}

.terms-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
}

.terms-close-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-gold);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px 40px !important;
    overflow-y: auto !important;
    line-height: 1.8 !important;
    color: rgba(255,255,255,0.7) !important;
    font-size: 15px !important;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

.modal-footer {
    padding: 20px 40px 30px !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
}

/* 弹窗底部按钮样式 */
.modal-footer .btn,
.terms-modal-card .btn {
    padding: 14px 28px !important;
    border-radius: 12px !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-footer .btn-primary,
.terms-modal-card .btn-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #F59E0B 100%) !important;
    border: 1.5px solid transparent !important;
    color: #0A0118 !important;
}

.modal-footer .btn-primary:hover,
.terms-modal-card .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4) !important;
}

@media (max-width: 576px) {
    .modal-body { padding: 20px !important; }
    .modal-header { padding: 20px !important; }
    .terms-close-btn { top: 15px; right: 15px; }
}
}

/* 表单容器（右侧） */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 30px 20px; /* 减小默认内边距 */
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .auth-form-container {
        padding: 80px 80px 40px; /* 强制设为 80px, 与左侧对齐 */
    }
}
}

.brand-content {
    max-width: 480px;
    /* 移除内部可能导致下压的额外边距 */
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 32px; /* 稍微减小间距 */
}

.brand-logo .logo-icon {
    font-size: 56px;
    color: var(--primary-gold);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
    line-height: 1;
}

.brand-logo .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-gold);
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    line-height: 1.2;
    background: linear-gradient(to bottom, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 48px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-icon {
    font-size: 32px; /* 调大矢量图标的基础大小 */
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    color: var(--primary-gold);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.feature-icon i {
    line-height: 1;
    display: block;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-text strong {
    font-size: 17px;
    color: var(--text-main);
}

.feature-text span {
    font-size: 14px;
    color: var(--text-muted);
}

/* 移动端品牌 Logo - 在 PC 端作为表单头部显示 */
.mobile-brand {
    text-align: center;
    padding: 0 0 20px 0; /* 彻底移除顶部 padding，只保留少量底部间距 */
}

.mobile-brand .logo-icon {
    font-size: 48px; /* 稍微缩小图标 */
    margin-bottom: 8px;
    display: block;
}

/* 针对 PC 端进一步压缩右侧头部 */
@media (min-width: 992px) {
    .mobile-brand {
        padding-bottom: 10px;
    }
}

/* 表单容器内容包装器 */
.auth-form-wrapper {
    width: 100%;
    margin-top: 0; /* 确保不产生额外的顶部下压 */
}

.mobile-brand .logo-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: block;
}

.mobile-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    background: linear-gradient(to bottom, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 表单容器（右侧） */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 统一改为顶部对齐 */
    padding: 60px 20px;
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .auth-form-container {
        padding: 12vh 80px 60px; /* 顶部预留 12% 的视口间距，确保内容上移 */
    }
}

.auth-form-wrapper {
    width: 100%;
}

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    background: linear-gradient(to bottom, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px; /* 减小标题下边距 */
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px; /* 减小副标题下边距 */
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px; /* 减小输入框之间的间距 */
}

@media (min-width: 768px) {
    .form-title {
        font-size: 40px;
    }
}

.form-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group input {
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.password-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.forgot-link {
    font-size: 13px;
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--accent-purple);
}

/* 按钮样式 */
.btn-block {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* 确保 auth 页面的 btn-primary 使用金色渐变 */
.btn-block.btn-primary,
.btn-primary.btn-block {
    background: linear-gradient(135deg, #D4AF37 0%, #F59E0B 100%) !important;
    border: 1.5px solid transparent !important;
    color: #0A0118 !important;
}

.btn-block.btn-primary:hover,
.btn-primary.btn-block:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4) !important;
}

/* 分割线 */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

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

.auth-divider span {
    position: relative;
    background: var(--bg-deep);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* 社交登录 */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-main);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.05);
}

.social-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4285f4, #34a853);
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

/* 底部文字 */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 15px;
}

.auth-terms {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    line-height: 1.6;
}

.auth-footer a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-terms {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-terms a {
    color: var(--primary-gold);
    text-decoration: underline;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14px;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.toast.error {
    border-color: #ef4444;
    color: #ef4444;
}

/* 加载状态 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 响应式优化 */
@media (max-width: 767px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-form-container {
        padding: 20px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .auth-form-container {
        padding: 40px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.brand-content {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}
