/* main.css */
/* ========================================
   ConnectBook - 全局样式
   设计：深浅搭配，层次分明
   ======================================== */

/* 重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #4338ca;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   导航栏 - 深色背景
   ======================================== */
.navbar {
    background-color: #0f172a;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.logo:hover {
    color: #e2e8f0;
}

/* 图片 LOGO（后台"基本设置"上传后启用） */
.logo .logo-image {
    display: block;
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    color: #cbd5e1;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    font-size: 15px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4f46e5;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    transition: 0.3s;
}

/* ========================================
   按钮
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background-color: #0f172a;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

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

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: white;
}

/* 导航栏认证按钮 */
.nav-menu .nav-auth-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-menu .nav-auth-btn.login {
    background-color: transparent;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu .nav-auth-btn.login:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-menu .nav-auth-btn.register {
    background-color: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
}

.nav-menu .nav-auth-btn.register:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* ========================================
   卡片
   ======================================== */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ========================================
   警告框
   ======================================== */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #ecfdf5;
    color: #155724;
    border: 1px solid #a7f3d0;
}

/* ========================================
   分页
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
}

.pagination a.active,
.pagination a:hover {
    background-color: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* ========================================
   页脚 - 深色
   ======================================== */
.footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 0;
    text-align: center;
    color: #94a3b8;
    margin-top: 60px;
}

.footer p {
    font-size: 14px;
}

/* ========================================
   工具类
   ======================================== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #0f172a;
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 16px;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .container {
        padding: 0 16px;
    }
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 32px 0;
    margin-top: 64px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.footer .container p {
    margin: 0;
    line-height: 1.8;
}

.footer .beian-info {
    margin-top: 8px;
    color: #9ca3af;
}

.footer .beian-info a {
    color: #9ca3af;
    text-decoration: underline;
}

.footer .beian-info a:hover {
    color: #6b7280;
}

/* theme.css */
:root {
    /* ========================================
       现代化配色系统
       ======================================== */
    
    /* 主色调 - 深蓝紫渐变系 */
    --color-primary: #4F46E5;
    --color-primary-light: #6366F1;
    --color-primary-dark: #3730A3;
    --color-primary-soft: #EEF2FF;
    
    /* 辅助色 - 温暖珊瑚色 */
    --color-secondary: #F97316;
    --color-secondary-light: #FB923C;
    --color-secondary-dark: #EA580C;
    --color-secondary-soft: #FFF7ED;
    
    /* 中性色 */
    --color-text: #1F2937;
    --color-text-light: #4B5563;
    --color-text-muted: #9CA3AF;
    --color-text-inverse: #FFFFFF;
    
    /* 背景色 */
    --color-background: #FFFFFF;
    --color-background-alt: #F9FAFB;
    --color-background-warm: #FEF3F2;
    
    /* 边框色 */
    --color-border: #E5E7EB;
    --color-border-light: #F3F4F6;
    --color-border-focus: #4F46E5;
    
    /* 功能色 */
    --color-success: #10B981;
    --color-success-soft: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-soft: #FEF3C7;
    --color-error: #EF4444;
    --color-error-soft: #FEE2E2;
    --color-info: #3B82F6;
    --color-info-soft: #DBEAFE;
    
    /* ========================================
       字体系统
       ======================================== */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    --font-family-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;
    
    /* ========================================
       间距系统
       ======================================== */
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-3: 12px;
    --spacing-4: 16px;
    --spacing-5: 20px;
    --spacing-6: 24px;
    --spacing-8: 32px;
    --spacing-10: 40px;
    --spacing-12: 48px;
    --spacing-16: 64px;
    
    /* ========================================
       圆角系统
       ======================================== */
    --border-radius-sm: 6px;
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    /* ========================================
       阴影系统
       ======================================== */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    
    /* ========================================
       过渡系统
       ======================================== */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* ========================================
       布局系统
       ======================================== */
    --navbar-height: 72px;
    --sidebar-width: 260px;
    --container-max: 1200px;
    --container-narrow: 800px;
    --container-wide: 1400px;
}

/* ========================================
   深色主题
   ======================================== */
[data-theme="dark"] {
    --color-primary: #6366F1;
    --color-primary-light: #818CF8;
    --color-primary-dark: #4F46E5;
    --color-primary-soft: #1E1B4B;
    
    --color-secondary: #FB923C;
    --color-secondary-light: #FDBA74;
    --color-secondary-dark: #F97316;
    --color-secondary-soft: #431407;
    
    --color-text: #F3F4F6;
    --color-text-light: #D1D5DB;
    --color-text-muted: #9CA3AF;
    --color-text-inverse: #1F2937;
    
    --color-background: #0F172A;
    --color-background-alt: #1E293B;
    --color-background-warm: #2A1A15;
    
    --color-border: #374151;
    --color-border-light: #1F2937;
    --color-border-focus: #6366F1;
    
    --color-success: #34D399;
    --color-success-soft: #064E3B;
    --color-warning: #FBBF24;
    --color-warning-soft: #78350F;
    --color-error: #F87171;
    --color-error-soft: #7F1D1D;
    --color-info: #60A5FA;
    --color-info-soft: #1E3A8A;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ========================================
   全局微调
   ======================================== */
::selection {
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
}

:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--spacing-6) 0;
}

/* auth.css */
/* ========================================
   认证页面样式 - 现代极简设计
   ======================================== */

/* 页面基础 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* 背景图片由内联样式设置，这里只做回退 */
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 现代感背景层 */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 主渐变 */
.bg-main {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    animation: bgRotate 20s linear infinite;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 网格 */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
}

/* 光晕 */
.bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

/* 浮动几何图形 */
.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.15;
    filter: blur(40px);
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph1 15s ease-in-out infinite;
}

.shape-2 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    right: 15%;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph2 18s ease-in-out infinite;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
    animation: morph3 12s ease-in-out infinite;
}

@keyframes morph1 {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) rotate(0deg); }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translate(20px, -20px) rotate(180deg); }
}

@keyframes morph2 {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) rotate(0deg); }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(-20px, 20px) rotate(-180deg); }
}

@keyframes morph3 {
    0%, 100% { border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { border-radius: 60% 40% 40% 60% / 30% 70% 30% 70%; transform: translate(-50%, -50%) rotate(180deg) scale(1.1); }
}

/* ========================================
   登录卡片容器
   ======================================== */
.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: var(--spacing-6) var(--spacing-4);
}

/* 登录卡片 */
.auth-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 
                0 0 0 1px rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

/* 卡片顶部装饰条 */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    background-size: 200% 100%;
    animation: cardShine 4s linear infinite;
}

@keyframes cardShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   头部
   ======================================== */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    margin-bottom: 20px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.25);
    transition: transform 0.3s ease;
}

.auth-card:hover .logo-icon {
    transform: translateY(-2px);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
}

/* ========================================
   表单
   ======================================== */
.auth-form {
    margin-bottom: 24px;
}

/* 左右布局 */
.auth-form-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    position: relative;
    padding: 0 32px;
}

.auth-form-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 32px;
}

.auth-form-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    min-width: 140px;
    padding-left: 32px;
    position: relative;
}

/* 中间竖线分隔 - 位于右侧区域左边缘，高度50%且居中 */
.auth-form-right::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), transparent);
}

/* ========================================
   忘记密码页 - 左右布局
   ======================================== */
.forgot-form-layout {
    display: flex;
    gap: 0;
    align-items: center;
    position: relative;
    padding: 0 32px;
}

.forgot-form-left {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-right: 32px;
    max-width: 430px;
}

.forgot-form-left .input-wrapper {
    width: 100%;
}

.forgot-form-divider {
    width: 1px;
    height: 160px;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), transparent);
    margin: 0 32px;
    flex-shrink: 0;
}

.forgot-form-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    min-width: 70px;
    flex: 1;
}

.forgot-form-right .btn-login,
.forgot-form-right .btn-reset {
    width: 100%;
    height: 44px;
}

/* 右侧分隔线和社交登录 */
.auth-form-right .auth-divider {
    margin: 16px 0 12px;
}

.auth-form-right .social-login {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 0;
}

.auth-form-right .social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 0;
}

/* 垂直布局表单组间距 */
.form-vertical .form-group {
    margin-bottom: 32px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    transition: all 0.25s ease;
}

.input-wrapper.focused {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.25s;
}

.input-wrapper.focused .input-icon {
    color: #6366f1;
}

.input-wrapper input {
    flex: 1;
    height: 48px;
    padding: 0 12px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #1e293b;
    outline: none;
    font-weight: 500;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-password:hover {
    color: #6366f1;
    transform: scale(1.1);
}

.toggle-password.active {
    color: #6366f1;
}

/* 选项行 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-wrapper:hover .checkbox-custom {
    border-color: #6366f1;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.forgot-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
    color: #8b5cf6;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

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

.btn-login .btn-text {
    transition: opacity 0.3s;
    letter-spacing: 0.3px;
}

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

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: none;
}

.btn-login.loading .btn-loader {
    opacity: 1;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 按钮光泽效果 */
.btn-login::after {
    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;
}

.btn-login:hover::after {
    left: 100%;
}

/* 按钮横向排列 */
.auth-button-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.auth-button-row .btn-login {
    flex: 1;
    width: auto;
}

.auth-button-row .btn-reset {
    flex: 1;
    width: auto;
}

/* 重置按钮 */
.btn-reset {
    height: 44px;
    background: transparent;
    color: #6366f1;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-reset:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

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

/* 验证码图片 */
.captcha-image {
    height: 44px;
    margin-left: 10px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.captcha-image:hover {
    border-color: #6366f1;
    transform: scale(1.02);
}

/* ========================================
   分割线
   ======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(226, 232, 240, 0.8);
}

.auth-divider span {
    padding: 0 16px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   社交登录
   ======================================== */
.social-login {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #64748b;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.social-wechat:hover {
    background: #07c160;
    color: white;
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.25);
}

.social-qq:hover {
    background: #12b7f5;
    color: white;
    box-shadow: 0 8px 20px rgba(18, 183, 245, 0.25);
}

.social-weibo:hover {
    background: #e6162d;
    color: white;
    box-shadow: 0 8px 20px rgba(230, 22, 45, 0.25);
}

/* 右侧横向排列的社交按钮 */
.auth-form-right .social-login {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.auth-form-right .social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

/* ========================================
   底部
   ======================================== */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.auth-footer p {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.register-link {
    color: #6366f1;
    font-weight: 700;
    text-decoration: none;
}

.register-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* 版权 */
.auth-copyright {
    text-align: center;
    margin-top: 24px;
    color: #94a3b8;
    font-size: 12px;
}

/* ========================================
   警告框
   ======================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .logo-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }
    
    .logo-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .input-wrapper,
    .btn-login,
    .social-btn {
        border-radius: 10px;
    }
    
    .social-login {
        gap: 12px;
    }
    
    .social-btn {
        width: 44px;
        height: 44px;
    }
    
    /* 移动端表单布局 */
    .auth-form-layout {
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }
    
    .auth-form-right::before {
        display: none;
    }
    
    .auth-form-left {
        padding-right: 0;
    }
    
    .auth-form-right {
        padding-left: 0;
    }
    
    .auth-form-right {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        gap: 12px;
        padding-left: 0;
    }
    
    .btn-reset {
        width: 100%;
        flex: none;
    }
    
    .forgot-link {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   深色主题适配
   ======================================== */
[data-theme="dark"] .auth-page {
    background: #0f172a;
}

[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .auth-card::before {
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #ec4899);
    background-size: 200% 100%;
}

[data-theme="dark"] .auth-title {
    color: #f1f5f9;
}

[data-theme="dark"] .auth-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .input-wrapper {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .input-wrapper.focused {
    background: rgba(30, 41, 59, 0.9);
    border-color: #6366f1;
}

[data-theme="dark"] .input-wrapper input {
    color: #f1f5f9;
}

[data-theme="dark"] .input-wrapper input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .input-icon {
    color: #64748b;
}

[data-theme="dark"] .toggle-password {
    color: #64748b;
}

[data-theme="dark"] .toggle-password:hover {
    color: #6366f1;
}

[data-theme="dark"] .checkbox-custom {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .checkbox-label {
    color: #94a3b8;
}

[data-theme="dark"] .forgot-link {
    color: #8b5cf6;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-divider span {
    color: #64748b;
}

[data-theme="dark"] .social-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

[data-theme="dark"] .btn-login {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .btn-login:hover {
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.35);
}

[data-theme="dark"] .btn-reset {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

[data-theme="dark"] .btn-reset:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
}

[data-theme="dark"] .auth-form-right::before {
    background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.5), transparent);
}

[data-theme="dark"] .captcha-image {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .captcha-image:hover {
    border-color: #6366f1;
}

[data-theme="dark"] .auth-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-footer p {
    color: #94a3b8;
}

[data-theme="dark"] .register-link {
    color: #8b5cf6;
}

[data-theme="dark"] .alert-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .alert-success {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .auth-copyright {
    color: #64748b;
}

/* 忘记密码链接 */
.forgot-link-mobile {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
}

.forgot-link-mobile a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link-mobile a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .forgot-link-mobile {
        display: block;
    }
}
