/* H5移动端认证页面样式 - Crypto Brain AI */
/* 在PC端模拟手机端显示效果，与主页面保持一致 */
:root {
    --primary-blue: #2196F3;
    --primary-blue-dark: #1976D2;
    --primary-green: #4CAF50;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #e8e8e8;
    --bg-light: #f5f7fa;
    --bg-input: #f8f9fb;
    --white: #ffffff;
    --error-red: #ff4d4f;
    --success-green: #52c41a;
    --mobile-max-width: 500px;  /* 与主页面一致 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    min-height: 100vh;
    /* 与登录页面一致的浅蓝色渐变背景 */
    background: linear-gradient(180deg, #e8f4fc 0%, #d4e8f5 100%);
    background-attachment: fixed;
}

body {
    width: 100%;
    max-width: var(--mobile-max-width);
    min-height: 100vh;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dark);
    background: linear-gradient(180deg, #e8f4fc 0%, #d4e8f5 100%);
    position: relative;
}

/* 页面容器 */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(180deg, #e8f4fc 0%, #d4e8f5 100%);
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: url('/static/images/auth/wave-top.svg') no-repeat center top;
    background-size: cover;
    opacity: 0.5;
}

.auth-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(74, 144, 217, 0.1), transparent);
}

/* 顶部返回按钮 */
.auth-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 20px;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

/* Logo区域 */
.auth-logo {
    text-align: center;
    padding: 40px 20px 30px;
}

.auth-logo img {
    width: 100px;
    height: auto;
    margin-bottom: 16px;
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.auth-logo .subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 8px;
}

/* 主内容区 */
.auth-content {
    flex: 1;
    padding: 0 24px 40px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

/* Tab切换 */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    background: var(--bg-light);
    border-radius: 25px;
    padding: 4px;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.auth-tab {
    flex: 1;
    padding: 10px 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    background: transparent;
    border: none;
    border-radius: 21px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 表单样式 */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input.error {
    border-color: var(--error-red);
}

/* 密码显示切换 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-light);
}

.password-toggle svg {
    width: 22px;
    height: 22px;
}

/* 验证码输入 - 输入框和按钮在同一个圆角框内 */
.code-input-group {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.code-input-group:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.code-input-group .form-input {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 0;
    height: 50px;
}

.code-input-group .form-input:focus {
    box-shadow: none;
    border: none;
}

.get-code-btn {
    flex-shrink: 0;
    padding: 0 16px;
    height: 50px;
    font-size: 14px;
    color: var(--primary-blue);
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
}

.get-code-btn:hover:not(:disabled) {
    background: rgba(33, 150, 243, 0.05);
}

.get-code-btn:disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

/* 忘记密码链接 */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--text-gray);
    text-decoration: none;
    margin-top: -12px;
    margin-bottom: 20px;
}

/* 协议勾选 */
.agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-gray);
}

.agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.agreement a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载状态 */
.submit-btn.loading {
    pointer-events: none;
}

.submit-btn .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.error-msg {
    font-size: 12px;
    color: var(--error-red);
    margin-top: 6px;
    display: none;
}

.form-group.has-error .error-msg {
    display: block;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--white);
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* Alert消息 */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* 页面标题（找回密码页） */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.page-title .logo-small {
    width: 60px;
    height: auto;
}

/* 底部装饰 */
.auth-footer-decoration {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    z-index: -1;
}

.auth-footer-decoration::before {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* 响应式适配 */
@media screen and (max-width: 375px) {
    .auth-content {
        padding: 0 20px 30px;
    }
    
    .auth-logo {
        padding: 30px 20px 24px;
    }
    
    .auth-logo img {
        width: 80px;
    }
    
    .auth-logo h1 {
        font-size: 20px;
    }
    
    .form-input {
        height: 46px;
        font-size: 14px;
    }
    
    .submit-btn {
        height: 46px;
        font-size: 15px;
    }
}

@media screen and (min-width: 768px) {
    .auth-content {
        padding-top: 20px;
    }
    
    .auth-logo {
        padding-top: 60px;
    }
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .auth-page {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 滑块验证码样式 - 保留但默认隐藏 */
.slider-captcha {
    margin-bottom: 20px;
    display: none; /* 默认隐藏 */
}

.slider-captcha.show {
    display: block;
}

.slider-track {
    height: 40px;
    background: var(--bg-input);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.slider-thumb {
    width: 50px;
    height: 36px;
    background: var(--white);
    border-radius: 18px;
    position: absolute;
    left: 2px;
    top: 2px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: left 0.1s ease;
}

.slider-thumb svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.slider-track.verified .slider-thumb {
    background: var(--success-green);
}

.slider-track.verified .slider-thumb svg {
    color: var(--white);
}
