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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.login-card {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-left {
    flex: 1;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-content {
    text-align: center;
}

.logo {
    font-size: 4rem;
    margin-bottom: 20px;
}

.welcome-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.feature-item {
    text-align: center;
    margin: 15px;
}

.feature-item i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-item span {
    display: block;
    font-size: 0.9rem;
}

.card-right {
    flex: 1;
    padding: 50px 40px;
}

.login-form h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn.active {
    color: #4facfe;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #4facfe;
    border-radius: 3px 3px 0 0;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

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

.input-wrapper i:first-child {
    position: absolute;
    left: 15px;
    color: #999;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4facfe;
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #999;
}

.captcha-wrapper {
    display: flex;
    gap: 10px;
}

.captcha-img {
    height: 45px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.refresh-captcha {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.refresh-captcha:hover {
    background: #e9ecef;
}

.error-msg {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 1.2rem;
}

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

.remember-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.remember-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remember-checkbox input:checked + .checkmark {
    background: #4facfe;
    border-color: #4facfe;
}

.remember-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.forgot-password {
    color: #4facfe;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #3a8bc9;
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

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

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.register-link {
    text-align: center;
    margin-top: 25px;
    color: #666;
    font-size: 0.95rem;
}

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

.register-link a:hover {
    color: #3a8bc9;
    text-decoration: underline;
}


/* 手机端优化 - features水平排列 */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
    }
    
    .card-left {
        padding: 40px 20px;
    }
    
    .card-right {
        padding: 40px 20px;
    }
    
    /* 关键修改：让features在手机端水平排列 */
    .features {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    .feature-item {
        text-align: center;
        margin: 10px;
        flex: 1;
        min-width: 80px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .captcha-wrapper {
        flex-direction: column;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .features {
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .feature-item {
        min-width: 70px;
        margin: 5px;
    }
    
    .feature-item i {
        font-size: 1.5rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }


/* 错误输入框样式 */
.error-input {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

/* 验证码输入框样式 */
.captcha-wrapper .input-wrapper input {
    flex: 1;
    margin-right: 10px;
}

/* 确保错误消息显示 */
.error-msg {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 1.2rem;
    display: none; /* 默认隐藏，js会控制显示 */
}