/**
 * 登录页面样式 - Google OAuth 版本
 * 左右分栏布局: 左侧蓝色渐变+Logo+功能介绍, 右侧白色+Google登录
 */

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
                 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    overflow: hidden;
}

/* ========== 主容器 ========== */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ========== 左侧蓝色区域 ========== */
.login-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #4A90E2 0%, #6B5CE7 100%);
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 装饰性背景图案 */
.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* Logo和品牌信息 */
.brand-section {
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
}

/* Logo和标题横向排列 */
.brand-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.brand-name {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 1px;
}

.website {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    margin-top: 0;
    margin-left: 75px;
    font-weight: 500;
}

.slogan {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 75px;
    font-weight: 300;
    line-height: 1.6;
}

/* 功能列表 */
.features-section {
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }
.feature-item:nth-child(5) { animation-delay: 0.5s; }
.feature-item:nth-child(6) { animation-delay: 0.6s; }

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

/* ========== 右侧白色区域 ========== */
.login-right {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 30px 40px;
    overflow-y: auto;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

/* 登录面板 */
.login-panel {
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.5s ease-out;
}

/* 欢迎标题区域 */
.welcome-header {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.welcome-description {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Google 登录按钮 */
.google-signin-btn {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 2px solid #dadce0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 20px;
    margin-bottom: 14px;
}

.google-signin-btn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 1px 6px rgba(66, 133, 244, 0.3);
}

.google-signin-btn:active {
    transform: scale(0.98);
    background: #f1f3f4;
}

.google-signin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-icon {
    flex-shrink: 0;
}

/* 隐私政策和服务条款 */
.terms-section {
    margin-top: 20px;
    text-align: center;
}

.terms-text {
    font-size: 10px;
    color: #5f6368;
    line-height: 1.4;
}

.terms-text a {
    color: #1967d2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.terms-text a:hover {
    color: #1558b0;
    text-decoration: underline;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .login-left {
        flex: 0 0 40%;
        padding: 40px 50px;
    }

    .brand-name {
        font-size: 36px;
    }

    .website {
        font-size: 16px;
    }

    .slogan {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        flex: 0 0 auto;
        padding: 30px 20px;
        min-height: 200px;
    }

    .brand-section {
        margin-bottom: 20px;
    }

    .brand-header {
        justify-content: center;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 28px;
    }

    .website {
        text-align: center;
        margin-left: 0;
        font-size: 14px;
    }

    .slogan {
        text-align: center;
        margin-left: 0;
        font-size: 16px;
    }

    .features-section {
        display: none;
    }

    .login-right {
        flex: 1;
        padding: 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .login-panel {
        max-width: 100%;
    }

    .google-login-title {
        font-size: 24px;
    }

    .login-description {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .google-signin-btn {
        height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 20px 15px;
    }

    .brand-name {
        font-size: 24px;
    }

    .website {
        font-size: 13px;
    }

    .slogan {
        font-size: 14px;
    }

    .google-login-title {
        font-size: 22px;
    }

    .google-signin-btn {
        height: 48px;
        font-size: 14px;
    }
}

/* ========== 邮件登录区域 ========== */
.email-login-section {
    margin-bottom: 20px;
}

/* 邮件登录展开按钮 */
.email-toggle-btn {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    margin-top: 12px;
}

.email-toggle-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.email-toggle-btn:active {
    transform: scale(0.98);
}

.email-icon {
    font-size: 16px;
    opacity: 0.9;
}

.arrow-icon {
    position: absolute;
    right: 18px;
    transition: transform 0.3s ease;
    font-size: 10px;
    opacity: 0.6;
}

.arrow-icon.rotate {
    transform: rotate(180deg);
}

/* 邮件表单容器 */
.email-form-container {
    margin-top: 16px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* 标签切换 */
.form-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.form-tab {
    flex: 1;
    padding: 7px 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-tab:hover {
    background: #e5e7eb;
    color: #6b7280;
}

.form-tab.active {
    color: #ffffff;
    background: #4A90E2;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* 表单样式 */
.email-form {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: #111827;
}

.form-group input:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
    background: #ffffff;
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* 密码输入框包装器 */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    opacity: 0.5;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.toggle-password:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.05);
}

.eye-icon {
    font-size: 18px;
    display: block;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 5px;
}

.strength-bar {
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s, background 0.3s;
    width: 0;
}

.strength-fill.weak {
    width: 33%;
    background: #f44336;
}

.strength-fill.medium {
    width: 66%;
    background: #ff9800;
}

.strength-fill.strong {
    width: 100%;
    background: #4caf50;
}

.strength-text {
    font-size: 10px;
    color: #666;
}

.field-hint {
    margin-top: 3px;
    font-size: 10px;
    color: #6b7280;
    line-height: 1.3;
}

/* 表单操作按钮区 */
.form-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    margin-top: -2px;
}

.forgot-password {
    font-size: 11px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #111827;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 44px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover:not(:disabled) {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: inline;
}

/* 表单底部文本 */
.form-footer-text {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.form-footer-text a {
    color: #111827;
    text-decoration: underline;
    font-weight: 500;
}

.form-footer-text a:hover {
    color: #000000;
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    margin: 12px 0;
    color: #5f6368;
    font-size: 11px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dadce0;
}

.divider span {
    padding: 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .email-toggle-btn {
        height: 48px;
        font-size: 14px;
    }

    .form-group input {
        height: 42px;
        font-size: 14px;
    }

    .submit-btn {
        height: 46px;
        font-size: 15px;
    }
}
