/* 登录页面样式 */

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

:root {
    /* 主题色 */
    --primary-color: #d74339;
    --primary-light: #ff6b6b;
    --primary-dark: #c0392b;

    /* 品牌色 - 蓝色渐变 */
    --brand-blue-start: #1e3c72;
    --brand-blue-end: #2a5298;
    --brand-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3d5fa8 100%);

    /* 文字颜色 */
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --text-white: #fff;

    /* 背景色 */
    --bg-white: #fff;
    --bg-gray: #f5f5f5;

    /* 边框 */
    --border-color: #e0e0e0;
    --border-radius: 8px;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.login-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.back-home {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-home:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* 主体内容 */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 600px;
}

/* 左侧品牌展示 */
.brand-section {
    background: var(--brand-gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -200px;
    right: -200px;
}

.brand-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -100px;
    left: -100px;
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-white);
}

.brand-title {
    margin-bottom: 40px;
}

.title-main {
    font-size: 72px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 4px;
}

.title-sub {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

.title-desc {
    font-size: 32px;
    font-weight: 600;
    opacity: 0.95;
    letter-spacing: 2px;
}

.brand-text {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 2px;
}

/* 右侧登录表单 */
.form-section {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Tab 切换 */
.login-tabs {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--bg-gray);
}

.tab-btn {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 12px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

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

/* 表单样式 */
.login-form {
    animation: fadeIn 0.3s ease;
}

.login-form.hidden {
    display: none;
}

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

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 50px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(215, 67, 57, 0.1);
}

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

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* 获取验证码按钮 */
.btn-get-code {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 8px;
    transition: opacity 0.3s ease;
}

.btn-get-code:hover {
    opacity: 0.8;
}

.btn-get-code:disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-get-code.counting {
    color: var(--text-light);
    cursor: not-allowed;
}

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

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

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.forgot-link:hover {
    opacity: 0.8;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border: none;
    border-radius: 25px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 154, 158, 0.4);
}

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

/* 协议文本 */
.agreement-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin: 20px 0;
    line-height: 1.8;
}

.agreement-text .link {
    color: var(--primary-color);
    text-decoration: none;
}

.agreement-text .link:hover {
    text-decoration: underline;
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 16px;
}

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

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-white);
    color: #09bb07;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #f0f9f0;
    border-color: #09bb07;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* 底部信息 */
.login-footer {
    background: var(--bg-white);
    padding: 30px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.copyright {
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.8;
}

.copyright p {
    margin: 4px 0;
}

.copyright a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 8px;
}

.copyright a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .brand-section {
        display: none;
    }

    .form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 640px) {
    .login-header {
        padding: 12px 0;
    }

    .header-container {
        padding: 0 20px;
    }

    .logo img {
        height: 32px;
    }

    .logo-text {
        font-size: 14px;
    }

    .back-home {
        font-size: 12px;
        padding: 6px 16px;
    }

    .login-main {
        padding: 20px 16px;
    }

    .form-section {
        padding: 30px 20px;
    }

    .login-tabs {
        gap: 24px;
    }

    .tab-btn {
        font-size: 16px;
    }

    .footer-nav {
        gap: 16px;
    }

    .footer-nav a {
        font-size: 12px;
    }
}

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

.form-wrapper {
    animation: slideInRight 0.5s ease;
}
