/* =====================================================
   佰医互联 HIS 登录页面 - 现代化设计
   采用渐变背景 + 玻璃拟态 + 流畅动画
   ===================================================== */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
}

/* =====================================================
   背景层
   ===================================================== */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 25%, #38bdf8 50%, #06b6d4 75%, #0891b2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 渐变遮罩 */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

/* 粒子效果容器 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(100px);
        opacity: 0;
    }
}

/* =====================================================
   主容器
   ===================================================== */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* =====================================================
   左侧品牌区域
   ===================================================== */
.login-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

.brand-content {
    max-width: 500px;
}

/* Logo 区域 */
.logo-section {
    text-align: center;
    margin-bottom: 60px;
}

.logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
}

.logo-icon i {
    font-size: 60px;
    color: white;
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 4px;
}

.brand-subtitle {
    font-size: 18px;
    opacity: 0.9;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 特性展示 */
.brand-features {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 28px;
}

.feature-item span {
    font-size: 14px;
    font-weight: 500;
}

/* =====================================================
   右侧登录表单
   ===================================================== */
.login-form-wrapper {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* 登录卡片 - 玻璃拟态效果 */
.login-card {
    width: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.login-header p {
    color: #6b7280;
    font-size: 15px;
}

/* =====================================================
   表单样式
   ===================================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-label i {
    color: #0ea5e9;
    width: 16px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* 密码可见切换 */
.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #0ea5e9;
}

/* 验证码区域 */
.captcha-wrapper {
    display: flex;
    gap: 12px;
}

.captcha-input {
    flex: 1;
}

.captcha-img-wrapper {
    width: 140px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.captcha-img-wrapper:hover {
    transform: scale(1.02);
}

.captcha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 选项区域 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -8px;
}

/* 记住我 */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'FontAwesome';
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.remember-me input:checked + .checkmark {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.remember-me input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.forgot-password {
    font-size: 14px;
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    height: 56px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #06b6d4 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14,165,233,0.4);
    margin-top: 10px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14,165,233,0.5);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(4px);
}

.login-btn.loading .btn-text,
.login-btn.loading i {
    opacity: 0;
}

.loading-spinner {
    position: absolute;
    font-size: 24px;
}

/* 登录底部 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    color: #9ca3af;
    font-size: 13px;
}

/* =====================================================
   响应式设计
   ===================================================== */
@media (max-width: 1024px) {
    .login-brand {
        display: none;
    }
    
    .login-form-wrapper {
        width: 100%;
        padding: 20px;
    }
    
    .login-card {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .login-header h2 {
        font-size: 26px;
    }
    
    .captcha-wrapper {
        flex-direction: column;
    }
    
    .captcha-img-wrapper {
        width: 100%;
        height: 60px;
    }
}

/* =====================================================
   动画效果增强
   ===================================================== */
/* 输入框聚焦时标签动画 */
.form-group:focus-within .form-label {
    color: #0ea5e9;
}

.form-group:focus-within .form-label i {
    transform: scale(1.1);
}

/* 错误提示 */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 成功提示 */
.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
