* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* 左侧宣传区域 */
.left-panel {
    width: 55%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #5f27cd 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: inherit;
}

.cloud-1 {
    width: 120px;
    height: 40px;
    top: 15%;
    left: 10%;
    animation-duration: 12s;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 20px;
}

.cloud-1::after {
    width: 70px;
    height: 70px;
    top: -35px;
    left: 50px;
}

.cloud-2 {
    width: 100px;
    height: 35px;
    top: 35%;
    right: 15%;
    animation-duration: 15s;
    animation-delay: -3s;
}

.cloud-2::before {
    width: 45px;
    height: 45px;
    top: -22px;
    left: 15px;
}

.cloud-2::after {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 40px;
}

.cloud-3 {
    width: 140px;
    height: 45px;
    bottom: 25%;
    left: 20%;
    animation-duration: 18s;
    animation-delay: -6s;
}

.cloud-3::before {
    width: 55px;
    height: 55px;
    top: -28px;
    left: 25px;
}

.cloud-3::after {
    width: 75px;
    height: 75px;
    top: -38px;
    left: 55px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(0) translateX(-10px); }
    75% { transform: translateY(20px) translateX(5px); }
}

.plane-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    color: rgba(255, 255, 255, 0.2);
    animation: fly 20s linear infinite;
}

@keyframes fly {
    0% { transform: translate(-50%, -50%) rotate(45deg); opacity: 0; }
    10% { opacity: 0.3; }
    50% { transform: translate(50%, -30%) rotate(45deg); opacity: 0.2; }
    90% { opacity: 0.3; }
    100% { transform: translate(-50%, -50%) rotate(45deg); opacity: 0; }
}

.brand-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 40px;
}

.brand-content .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.brand-content .logo i {
    font-size: 32px;
}

.slogan {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.slogan-sub {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.desc {
    font-size: 18px;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.desc-sub {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 20px;
}

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

/* 右侧表单区域 */
.right-panel {
    width: 45%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.form-logo i {
    font-size: 28px;
    color: #667eea;
}

.form-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
    text-align: center;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin-bottom: 40px;
}

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

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

.input-icon {
    position: absolute;
    left: 15px;
    color: #a0aec0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    background: #f7fafc;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrap input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrap input:focus + .input-icon {
    color: #667eea;
}

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

.eye-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
}

.eye-btn:hover {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

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

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.forgot-pwd {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-pwd:hover {
    color: #5a6fd6;
}

.login-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

.login-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.login-btn.loading i {
    animation: spin 1s linear infinite;
}

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

.register-link {
    text-align: center;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 30px;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #5a6fd6;
}

.register-link-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.3s ease;
}

.register-link-btn:hover {
    color: #5a6fd6;
    text-decoration: underline;
}

.register-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

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

.login-link {
    text-align: center;
    font-size: 14px;
    color: #4a5568;
    margin-top: 30px;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #5a6fd6;
    text-decoration: underline;
}

.divider {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    display: inline-block;
    padding: 0 15px;
    background: white;
    color: #a0aec0;
    font-size: 14px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.ding-btn {
    color: #667eea;
    border-color: #667eea;
}

.ding-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: #a0aec0;
    margin-top: 40px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    overflow: auto;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
}

.close-btn:hover {
    color: #667eea;
}

.modal-body {
    padding: 24px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #4a5568;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #667eea;
}

.checkbox-group a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.register-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.forgot-desc {
    font-size: 14px;
    color: #4a5568;
    text-align: center;
    margin-bottom: 20px;
}

.close-modal-btn {
    width: 100%;
    height: 48px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #4a5568;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* 错误状态 */
.input-wrap.error input {
    border-color: #fc8181;
}

.input-wrap.error .input-icon {
    color: #fc8181;
}

.error-message {
    color: #fc8181;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 成功状态 */
.login-btn.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* 响应式设计 */
@media (max-width: 1023px) {
    .left-panel {
        width: 50%;
    }
    
    .right-panel {
        width: 50%;
    }
    
    .slogan {
        font-size: 42px;
    }
    
    .slogan-sub {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .login-container {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }
    
    .left-panel {
        width: 100%;
        height: auto;
        min-height: 280px;
        padding: 30px 20px;
    }
    
    .right-panel {
        width: 100%;
        height: auto;
        min-height: calc(100vh - 280px);
        padding: 30px 20px;
        flex-shrink: 0;
    }
    
    .bg-animation {
        display: none;
    }
    
    .plane-icon {
        display: none;
    }
    
    .features {
        display: none;
    }
    
    .slogan {
        font-size: 32px;
    }
    
    .slogan-sub {
        font-size: 18px;
    }
    
    .desc, .desc-sub {
        display: none;
    }
    
    .brand-content .logo {
        margin-bottom: 15px;
    }
    
    .form-container {
        max-width: 100%;
        width: 100%;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .form-subtitle {
        font-size: 13px;
        margin-bottom: 30px;
    }
    
    .input-wrap input {
        height: 44px;
        font-size: 14px;
    }
    
    .login-btn {
        height: 46px;
        font-size: 15px;
    }
    
    .copyright {
        margin-top: 30px;
        font-size: 11px;
    }
}

/* 钉钉扫码登录区域样式 */
.ding-login-area {
    margin-top: 20px;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
}

.qrcode-box-inline {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.qrcode-box-inline canvas,
.qrcode-box-inline img {
    display: block;
}

.qrcode-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #718096;
}

.qrcode-loading i {
    font-size: 32px;
    color: #667eea;
}

.qrcode-loading p {
    font-size: 14px;
}

.qrcode-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #e53e3e;
}

.qrcode-error i {
    font-size: 32px;
}

.qrcode-error p {
    font-size: 14px;
}

.qrcode-tip {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
}

.qrcode-tip strong {
    color: #667eea;
    font-weight: 600;
}

.ding-status {
    font-size: 13px;
    color: #718096;
    min-height: 20px;
    margin-bottom: 12px;
}

.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.refresh-btn i {
    font-size: 14px;
}