/* 登录页面样式 - 2026-07-27 更新 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #a8c0ff 0%, #c8d5f5 100%) !important;
    min-height: 100vh;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 15px;
    position: relative;
}

/* 隐藏可能存在的旧登录样式 */
body > div:not(.container) {
    display: none !important;
}

.login-showcase,
.login-panel,
.geometric-shapes {
    display: none !important;
}

/* 背景点阵效果 */
body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin: 15px auto;
}

/* 左侧区域 */
.left-section {
    flex: 1;
    padding: 35px 35px;
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 300px;
    overflow-y: auto;
}

.welcome-text h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.welcome-text h2 {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.welcome-text p {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
    max-width: 400px;
}

.illustration {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration img {
    width: 100%;
    height: 380px;
    object-fit: contain;
}

/* 右侧表单区域 */
.right-section {
    flex: 1;
    padding: 35px 35px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.profile-form {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* 表单标题 */
.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
}

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

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

.alert-danger {
    background: #fee;
    border-color: #f56565;
    color: #c53030;
}

.alert-success {
    background: #f0fdf4;
    border-color: #48bb78;
    color: #2f855a;
}

/* 输入组 */
.input-group {
    margin-bottom: 24px;
}

.input-group.full-width {
    width: 100%;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f8f9fb;
}

.input-group input::placeholder {
    color: #a0aec0;
}

.input-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background: white;
}

/* 登录选项 */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.remember-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4299e1;
}

.remember-label span {
    user-select: none;
}

.forgot-password {
    font-size: 14px;
    color: #4299e1;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #718096;
}

.register-link a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.register-link a:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover:not(:disabled) {
    background: #3182ce;
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* 底部版权 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #9ca3af;
}

/* Toast消息 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px 48px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.toast-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
    
    .left-section,
    .right-section {
        padding: 30px 28px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    .left-section,
    .right-section {
        padding: 30px;
    }
    
    .welcome-text h1 {
        font-size: 28px;
    }
    
    .welcome-text h2 {
        font-size: 20px;
    }
    
    .illustration img {
        height: 350px;
    }
}

@media (max-width: 968px) {
    body {
        padding: 10px;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
    }

    .container {
        flex-direction: column;
        margin: 10px auto;
        border-radius: 16px;
        min-height: auto;
    }

    .left-section {
        padding: 30px 25px;
        min-height: auto;
        overflow-y: visible;
    }

    .right-section {
        padding: 30px 25px;
        min-height: auto;
        overflow-y: visible;
    }

    .illustration {
        margin-top: 20px;
    }
    
    .illustration img {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .welcome-text h1 {
        font-size: 26px;
    }

    .welcome-text h2 {
        font-size: 19px;
    }
    
    .illustration img {
        height: 280px;
    }
    
    .profile-form {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    body {
        padding: 5px;
    }

    .container {
        border-radius: 12px;
        margin: 5px auto;
    }

    .left-section {
        padding: 25px 20px;
    }

    .right-section {
        padding: 25px 20px;
    }

    .welcome-text h1 {
        font-size: 24px;
    }

    .welcome-text h2 {
        font-size: 18px;
    }
    
    .welcome-text p {
        font-size: 13px;
    }
    
    .illustration img {
        height: 240px;
    }
    
    .form-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .input-group input[type="text"],
    .input-group input[type="email"],
    .input-group input[type="password"] {
        padding: 11px 14px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 13px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .welcome-text h1 {
        font-size: 22px;
    }

    .welcome-text h2 {
        font-size: 17px;
    }
    
    .welcome-text p {
        font-size: 12px;
    }
    
    .illustration img {
        height: 200px;
    }
    
    .left-section {
        padding: 20px 15px;
    }

    .right-section {
        padding: 20px 15px;
    }
    
    .form-title {
        font-size: 26px;
        margin-bottom: 20px;
    }
}

@media (max-width: 375px) {
    .welcome-text h1 {
        font-size: 20px;
    }

    .welcome-text h2 {
        font-size: 16px;
    }
    
    .illustration img {
        height: 180px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .input-group input[type="text"],
    .input-group input[type="email"],
    .input-group input[type="password"] {
        padding: 10px 14px;
        font-size: 14px;
    }
}
