/* 导入现代化无衬线字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4F46E5; /* Indigo 600 */
    --primary-hover: #4338CA; /* Indigo 700 */
    --bg-color: #F9FAFB;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --input-bg: #FFFFFF;
    --focus-ring: rgba(79, 70, 229, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow: hidden; /* 防止出现多余滚动条 */
}

/* 主容器，采用 Flexbox 布局 */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* 左侧动态背景区域 (比例 3) */
.image-section {
    flex: 3;
    position: relative;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); /* 浅靛蓝色基调 */
    overflow: hidden;
}

#bubbleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2; /* 确保在 Canvas 之上 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem;
    color: var(--primary-color); /* 改为使用主题色，适应浅色背景 */
}

.image-overlay h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #312E81; /* 较深的靛蓝色 */
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); /* 浅色发光 */
}

.image-overlay p {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
    max-width: 80%;
    color: #4338CA;
}

/* 右侧登录表单包装器 */
.form-section-wrapper {
    flex: 1;
    display: flex;
    min-width: 450px; /* 保证右侧最小宽度 */
    z-index: 10;
    margin-left: -50px; /* 让右侧区域向左重叠，覆盖在图片之上 */
    filter: drop-shadow(-15px 0 30px rgba(79, 70, 229, 0.1)); /* 阴影也带有一点主题色 */
}

/* 右侧登录表单区域 */
.form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #FFFFFF; /* 纯色右侧，呼应左侧浅色系 */
    padding: 2rem 2rem 2rem 4.5rem;
    clip-path: polygon(50px 0, 100% 0, 100% 100%, 0 100%);
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

/* 邀请码输入框样式 */
.invite-code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.invite-code-box {
    flex: 1;
    width: 0; /* 关键：强制 flex 子项可以缩小到比其内容更小的尺寸 */
    min-width: 0; /* 关键：允许内容收缩 */
    aspect-ratio: 1 / 1.1; /* 保持一定的宽高比，而不是固定高度 */
    max-height: 2.75rem; /* 限制最大高度 */
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    text-transform: uppercase;
    padding: 0;
    box-sizing: border-box;
}

.invite-code-box:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
    transform: translateY(-1px);
}

.invite-code-separator {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0 0.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 记住我 与 忘记密码行 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 登录按钮 */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    background-color: #A5B4FC;
    cursor: not-allowed;
    transform: none;
}

/* 错误提示框 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #F87171;
}

.alert-success {
    background-color: #F0FDF4;
    color: #166534;
    border: 1px solid #86EFAC;
}

.lockout-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.lockout-alert i {
    font-size: 1.375rem;
    line-height: 1;
    flex-shrink: 0;
}

.lockout-text {
    display: inline-block;
    min-width: 250px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.field-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    margin-left: 1rem;
    display: block;
    font-weight: 500;
}

/* 验证码 Modal 弹窗及样式重构 */
.captcha-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    transition: visibility 0.2s;
}

.captcha-modal.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.captcha-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    /* 取消毛玻璃和背景的过渡动画，直接瞬间显示，避免性能负担和延迟感 */
    transition: none;
}

.captcha-modal.is-hidden .captcha-overlay {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.captcha-dialog {
    position: relative;
    width: 92%;
    max-width: 360px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1.5rem;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.15), 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1) inset;
    overflow: hidden;
    transform: translateY(0) scale(1);
    opacity: 1;
    /* 仅保留弹窗主体的极快弹入动画 (0.15s)，使其干脆利落 */
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

@media (max-width: 400px) {
    .captcha-dialog {
        width: 94%;
        border-radius: 1rem;
    }
    
    .captcha-header {
        padding: 1rem 1.25rem 0.75rem;
    }
    
    .captcha-body {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .captcha-stage {
        height: 140px;
    }
}

.captcha-modal.is-hidden .captcha-dialog {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
}

.captcha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.captcha-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.captcha-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    }

.captcha-stage {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.captcha-background {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.captcha-piece {
    position: absolute;
    left: 0;
    width: 52px;
    height: 52px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255,255,255,0.2) inset;
    will-change: transform;
    pointer-events: none;
}

.captcha-piece-image {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.captcha-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
}

.captcha-loading.is-hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.captcha-slider {
    position: relative;
    height: 48px;
    border-radius: 9999px;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.captcha-slider.is-active {
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.3);
}

.captcha-slider.is-success {
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

.captcha-slider.is-error {
    background: #fef2f2;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.captcha-slider-progress {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: #e0e7ff;
    border-right: 1px solid #c7d2fe;
    pointer-events: none;
}

.captcha-slider.is-success .captcha-slider-progress {
    background: #d1fae5;
    border-right-color: #6ee7b7;
}

.captcha-slider.is-error .captcha-slider-progress {
    background: #fee2e2;
    border-right-color: #fca5a5;
}

.captcha-slider-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #64748b;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.captcha-slider.is-success .captcha-slider-text {
    color: #059669;
}

.captcha-slider.is-error .captcha-slider-text {
    color: #dc2626;
}

.captcha-handle {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
    cursor: grab;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, transform 0.1s;
    touch-action: none;
}

.captcha-handle::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.captcha-slider.is-active .captcha-handle {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.captcha-slider.is-active .captcha-handle::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}

.captcha-handle:active {
    cursor: grabbing;
}

.captcha-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.captcha-status {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.captcha-status[data-state="success"] { color: #10b981; }
.captcha-status[data-state="error"] { color: #ef4444; }

.captcha-refresh {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.captcha-refresh:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.captcha-refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* 注册分步化与模式选择样式 */
.reg-mode-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.reg-mode-card {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-color);
}

.reg-mode-card:hover {
    border-color: var(--primary-color);
    background: #EEF2FF;
    transform: translateY(-4px);
}

.reg-mode-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.reg-mode-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
}

.reg-mode-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    flex: 1;
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.step-item.active .step-number {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.step-item.completed .step-number {
    background: #10b981;
    color: white;
}

.step-line {
    position: absolute;
    top: 1rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step-item:last-child .step-line {
    display: none;
}

.step-item.completed .step-line {
    background: #10b981;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

.step-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-secondary-outline:hover {
    background: var(--bg-color);
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* 步骤底部按钮的主次分布 */
.step-footer .btn-secondary-outline {
    flex: 2;
    min-width: 120px;
}

.step-footer .btn-login {
    flex: 3;
    width: auto;
}

/* 响应式设计：小屏幕时切换为全屏背景卡片布局 */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        align-items: center;
        min-height: 100vh;
        background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
        overflow-y: auto;
        position: relative;
    }
    .image-section {
        flex: none;
        width: 100%;
        height: auto;
        position: static;
        background: transparent;
    }
    #bubbleCanvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 0;
        pointer-events: none;
    }
    .image-overlay {
        position: relative;
        z-index: 1;
        inset: auto;
        padding: 3rem 1rem 1.5rem 1rem;
        height: auto;
    }
    .image-overlay h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    .image-overlay p {
        font-size: 0.95rem;
    }
    .login-logo-overlay {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    .form-section-wrapper {
        position: relative;
        z-index: 10;
        flex: none;
        min-width: unset;
        min-height: auto;
        width: 92%;
        max-width: 420px;
        margin: 0 auto 2rem auto;
        filter: drop-shadow(0 20px 40px rgba(79, 70, 229, 0.15));
    }
    .form-section {
        padding: 2.5rem 1.5rem;
        clip-path: none;
        border-radius: 1.5rem;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.6);
    }
}

@media (max-width: 520px) {
    .form-wrapper {
        max-width: 100%;
    }

    .form-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap; /* 允许换行 */
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem 0.5rem; /* 行间距 0.75rem, 列间距 0.5rem */
    }
}

@media (max-width: 400px) {
    .form-section {
        padding: 2rem 1.25rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-login {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .invite-code-box {
        font-size: 0.9rem;
        border-radius: 0.25rem;
    }

    .invite-code-container {
        gap: 0.15rem;
    }

    .step-indicator {
        gap: 0.5rem;
    }

    .step-item {
        font-size: 0.7rem;
    }
}

/* 智能点击验证（内嵌组件）样式 */
.inline-captcha-container {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    margin-bottom: 0;
}

.inline-captcha-container.is-visible {
    height: 78px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 1.5rem;
}

.inline-captcha {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 78px;
    padding: 0 1.125rem 0 0.875rem;
    border: 1px solid #cbd5e1; /* Increased border contrast */
    border-radius: 8px; /* Less rounded for a more standard look */
    background: #ffffff; /* Solid flat background */
    box-shadow: none; /* Removed idle shadow */
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease;
    user-select: none;
    text-align: left;
    appearance: none;
    overflow: hidden;
}

.inline-captcha:hover {
    border-color: #94a3b8; /* Darker border on hover */
    background: #f8fafc;
    transform: none; /* Removed hover lift */
    box-shadow: none; /* Removed hover shadow */
}

.inline-captcha:active {
    transform: none;
    background: #f1f5f9;
}

.inline-captcha.is-verified {
    border-color: #10b981; /* High contrast green border */
    background: #f0fdf4; /* Very light green flat background */
}

.inline-captcha.is-verified:hover {
    transform: none;
    box-shadow: none;
}

.inline-captcha:disabled {
    cursor: default;
}

.inline-captcha:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14), 0 20px 40px -24px rgba(15, 23, 42, 0.28);
}

.inline-captcha-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 60px; /* Reduced width for a subtler effect */
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent); /* Flat gradient */
    opacity: 1;
}

.inline-captcha.is-verified .inline-captcha-accent {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), transparent);
}

.inline-captcha-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.inline-captcha-checkbox {
    position: relative;
    flex: 0 0 auto;
    width: 32px; /* Slightly smaller */
    height: 32px;
    border: 2px solid #cbd5e1; /* Flat, thicker border */
    border-radius: 6px; /* Squarer */
    transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease; /* Removed shadow transition */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff; /* Flat white background */
    box-shadow: none; /* Removed idle shadow */
}

.inline-captcha:hover .inline-captcha-checkbox {
    border-color: #94a3b8;
    transform: none; /* Removed hover scale */
}

.inline-captcha.is-loading .inline-captcha-checkbox {
    border-color: transparent;
    background: transparent;
}

.inline-captcha.is-loading .inline-captcha-checkbox::after {
    content: '';
    position: absolute;
    inset: 4px; /* Adjusted inset for smaller size */
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.inline-captcha.is-verified .inline-captcha-checkbox {
    border-color: transparent;
    background: #10b981; /* Solid flat green */
    box-shadow: none; /* Removed verified shadow */
    border-radius: 50%; /* Circle for verified state */
}

.inline-captcha.is-verified .inline-captcha-checkbox::after {
    content: '';
    position: absolute;
    left: 11px; /* Adjusted for smaller size */
    top: 7px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.inline-captcha-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.18rem;
}

.inline-captcha-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.inline-captcha-subtitle {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}

.inline-captcha-side {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    padding-left: 1rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(226, 232, 240, 0.85);
    flex: 0 0 auto;
}

.inline-captcha-side svg {
    width: 28px;
    height: 28px;
    color: #94a3b8;
}

.inline-captcha-badge {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.inline-captcha.is-verified .inline-captcha-title {
    color: #047857;
}

.inline-captcha.is-verified .inline-captcha-subtitle {
    color: #059669;
}

.inline-captcha.is-verified .inline-captcha-side svg,
.inline-captcha.is-verified .inline-captcha-badge {
    color: #10b981;
}

@media (max-width: 520px) {
    .inline-captcha-container.is-visible {
        height: auto;
        min-height: 78px;
    }

    .inline-captcha {
        height: auto;
        min-height: 78px;
        padding: 0.75rem 0.9rem;
    }

    .inline-captcha-side {
        display: none;
    }
    
    .inline-captcha-title {
        font-size: 0.9rem;
    }
    
    .inline-captcha-subtitle {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .inline-captcha-main {
        gap: 0.6rem;
    }
    
    .inline-captcha-checkbox {
        width: 28px;
        height: 28px;
    }
    
    .inline-captcha-title {
        font-size: 0.85rem;
    }
}

/* Logo 样式 */
.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
    vertical-align: middle;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.login-logo-overlay {
    width: 140px;
    height: 140px;
    margin-bottom: 2.5rem;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(79, 70, 229, 0.2)); /* 调整为浅色主题的阴影 */
    transition: transform 0.5s ease;
}

.image-section:hover .login-logo-overlay {
    transform: translateY(-10px) scale(1.05);
}

@media (max-width: 900px) {
    .login-logo-overlay {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
}

/* Personal Center Styles - Modern Dashboard Look */
.personal-container {
    background-color: #f8fafc;
    min-height: 100%;
}

.personal-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.personal-header-card {
    background: #f0efff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.personal-header-info h3 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1;
}

.personal-header-info p {
    color: #4b5563;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.personal-header-icon {
    width: 64px;
    height: 64px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.personal-header-icon svg {
    width: 32px;
    height: 32px;
    color: #6366f1;
    stroke-width: 1.8;
}

/* Staggered Reveal Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--stagger-delay, 0s);
}
@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.personal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.personal-stat-mini-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-mini-info .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 2px;
}

.stat-mini-info .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.personal-logs-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.personal-logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.personal-logs-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.log-list {
    list-style: none;
    padding: 0;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    transition: background-color 0.2s;
    margin-bottom: 8px;
}

.log-item:hover {
    background-color: #f8fafc;
}

.log-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.log-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.log-info {
    display: flex;
    flex-direction: column;
}

.log-desc {
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
}

.log-time {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 2px;
}

.log-amount {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 4px 12px;
    border-radius: 8px;
}

.log-positive {
    color: #10b981;
    background-color: #ecfdf5;
}

.log-negative {
    color: #ef4444;
    background-color: #fef2f2;
}

.empty-logs {
    text-align: center;
    color: #94a3b8;
    padding: 48px 0;
}

.empty-logs svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* VIP 特权列表 */
.privilege-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.privilege-item {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 0.9rem;
}

.privilege-item svg {
    color: #10b981;
    width: 18px;
    height: 18px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 640px) {
    .personal-header-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .personal-header-icon {
        order: -1;
    }
}