/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f8fafc; /* 浅灰色背景，更现代化 */
    color: #1a1a1a; /* 纯黑色文字 */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

/* 品牌区域 */
.brand-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 2.8rem;
    color: #2c6ae5; /* 主题蓝色 */
    margin-bottom: 12px;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.brand-tagline {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* 卡片样式 */
.auth-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px 35px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* 标签页切换 */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #777;
    /*cursor: pointer;*/
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #2c6ae5; /* 主题蓝色 */
    border-bottom: 3px solid #2c6ae5;
}

/* 表单样式 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fdfdfd;
}

.form-input:focus {
    outline: none;
    border-color: #2c6ae5; /* 主题蓝色 */
    box-shadow: 0 0 0 3px rgba(44, 106, 229, 0.15);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

/* 密码显示切换 */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
}

/* 记住我选项 */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: #2c6ae5; /* 主题蓝色 */
}

.forgot-password {
    color: #2c6ae5; /* 主题蓝色 */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.auth-button {
    width: 100%;
    padding: 16px;
    background-color: #2c6ae5; /* 主题蓝色 */
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.auth-button:hover {
    background-color: #1a56d9; /* 深一点的蓝色 */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 106, 229, 0.25);
}

.auth-button:active {
    transform: translateY(0);
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #777;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #eaeaea;
}

.divider-text {
    padding: 0 16px;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.social-button {
    flex: 1;
    padding: 14px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    background-color: white;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-button:hover {
    border-color: #bbb;
    background-color: #f9f9f9;
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.switch-auth {
    color: #2c6ae5; /* 主题蓝色 */
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.switch-auth:hover {
    text-decoration: underline;
}

/* 消息提示 */
.message {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: none;
    text-align: center;
}

.message.success {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.message.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* 表单验证错误 */
.error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 6px;
    display: none;
}

.form-input.error {
    border-color: #dc2626;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 25px;
    }

    .brand-name {
        font-size: 1.5rem;
    }

    .social-login {
        flex-direction: column;
    }

    .language-switcher {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-bottom: 15px;
    }

    .top-controls {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        margin-bottom: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form.active {
    animation: fadeIn 0.3s ease forwards;
}

/* 顶部按钮区域 */
.top-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 返回按钮 */
.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-button:hover {
    color: #2c6ae5;
    background-color: #f5f8ff;
}

.back-icon {
    font-size: 0.9rem;
}

/* 语言切换按钮 */
.language-switcher {
    /*position: absolute;*/
    /*top: 20px;*/
    /*right: 20px;*/
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.language-btn:hover {
    color: #2c6ae5;
    background-color: #f5f8ff;
}

.language-btn.active {
    color: #2c6ae5;
    font-weight: 600;
}

.language-switch{
    display: flex;
    align-items: center;
    background-color: #f5f7ff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #e1e6f9;
}

.language-switch i {
    margin-right: 8px;
    color: #2c6ae5;
}

.language-switch:hover {
    background-color: #eef1ff;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 160px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-option:hover {
    background-color: #f5f7ff;
}

.language-option.active {
    background-color: #eef1ff;
    color: #2c6ae5;
    font-weight: 600;
}


