/* CSS文件: css/login.css - 登录页面专用样式（紧凑版） */

.login-container {
    width: 80%;
    max-width: 500px; /* 减小最大宽度 */
    margin: 20px auto; /* 减小外边距 */
    padding: 30px; /* 减小内边距 */
    background-color: #ffffff;
    border-radius: 16px; /* 减小圆角 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #eaeaea;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px; /* 减小间距 */
    padding-bottom: 15px; /* 减小间距 */
    border-bottom: 1px solid #f0f0f0; /* 减小边框宽度 */
}

.auth-header h1 {
    font-size: 26px; /* 减小字体大小 */
    color: #2c3e50;
    margin-bottom: 8px; /* 减小间距 */
    font-weight: 700;
    letter-spacing: 0.3px;
}

.auth-header p {
    font-size: 14px; /* 减小字体大小 */
    color: #7f8c8d;
    font-weight: 400;
}

.login-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 25px; /* 减小内边距 */
    border-radius: 12px; /* 减小圆角 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px; /* 减小间距 */
    border: 1px solid #e8eef3;
}

.form-group {
    margin-bottom: 20px; /* 减小间距 */
}

.form-label {
    display: block;
    margin-bottom: 8px; /* 减小间距 */
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px; /* 减小字体大小 */
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px; /* 减小内边距 */
    border: 2px solid #dbe1e8;
    border-radius: 10px; /* 减小圆角 */
    font-size: 15px; /* 减小字体大小 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background-color: white;
    color: #333;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15); /* 减小阴影 */
    background-color: #f8fafc;
}

.form-control:hover {
    border-color: #b8c2cc;
}

.remember-group {
    display: flex;
    align-items: center;
    margin: 18px 0; /* 减小间距 */
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px; /* 减小字体大小 */
    color: #5a6c7d;
    font-weight: 500;
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: #3498db;
}

.checkbox-label input {
    margin-right: 10px; /* 减小间距 */
    width: 18px; /* 减小尺寸 */
    height: 18px; /* 减小尺寸 */
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid #cbd5e0;
}

.checkbox-label input:checked {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px; /* 减小内边距 */
    font-size: 16px; /* 减小字体大小 */
    font-weight: 600;
    border-radius: 10px; /* 减小圆角 */
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    width: 100%;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.2); /* 减小阴影 */
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2573a7 100%);
    transform: translateY(-2px); /* 减小悬停移动距离 */
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.3); /* 减小阴影 */
}

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

.alternative-login {
    margin: 25px 0 30px; /* 减小间距 */
    padding: 20px; /* 减小内边距 */
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px; /* 减小圆角 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* 减小阴影 */
    border: 1px solid #e8eef3;
}

.alternative-title {
    text-align: center;
    color: #5a6c7d;
    font-size: 14px; /* 减小字体大小 */
    font-weight: 600;
    margin-bottom: 18px; /* 减小间距 */
    position: relative;
    padding: 0 15px; /* 减小内边距 */
}

.alternative-title:before {
    content: "";
    position: absolute;
    left: 15px; /* 调整位置 */
    top: 50%;
    width: calc(50% - 50px); /* 调整宽度 */
    height: 1px;
    background: linear-gradient(90deg, transparent, #dbe1e8);
}

.alternative-title:after {
    content: "";
    position: absolute;
    right: 15px; /* 调整位置 */
    top: 50%;
    width: calc(50% - 50px); /* 调整宽度 */
    height: 1px;
    background: linear-gradient(90deg, #dbe1e8, transparent);
}

/* 三个按钮紧凑排列 - 缩小按钮 */
.alternative-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px; /* 减小间隙 */
    flex-wrap: nowrap;
}

/* 三个按钮等分宽度 - 缩小按钮 */
.alternative-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px; /* 进一步减小内边距 */
    border-radius: 8px; /* 减小圆角 */
    text-decoration: none;
    font-weight: 600;
    font-size: 13px; /* 减小字体大小 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent; /* 减小边框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); /* 减小阴影 */
    letter-spacing: 0.1px;
    min-height: 50px; /* 减小最小高度 */
    text-align: center;
    flex-direction: column;
}

.alternative-btn i {
    font-size: 18px; /* 减小图标大小 */
    margin-bottom: 4px; /* 减小间距 */
}

.qq-login {
    background: linear-gradient(135deg, #12B7F5 0%, #0A9BD9 100%);
    color: white;
}

.qq-login:hover {
    background: linear-gradient(135deg, #0A9BD9 0%, #0988C1 100%);
    transform: translateY(-2px); /* 减小悬停移动距离 */
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.2); /* 减小阴影 */
}

.digital-login {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.digital-login:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    transform: translateY(-2px); /* 减小悬停移动距离 */
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2); /* 减小阴影 */
}

.scan-login {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.scan-login:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    transform: translateY(-2px); /* 减小悬停移动距离 */
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2); /* 减小阴影 */
}

/* 页脚样式 - 修改为一行显示 */
.auth-footer {
    text-align: center;
    margin-top: 25px; /* 减小间距 */
    padding-top: 20px; /* 减小间距 */
    border-top: 1px solid #f0f0f0; /* 减小边框宽度 */
}

.auth-footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-footer-text {
    color: #5a6c7d;
    font-weight: 500;
    font-size: 14px;
}

.auth-footer-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    font-size: 14px;
}

.auth-footer-link:hover {
    color: #2980b9;
    text-decoration: none;
    background-color: rgba(52, 152, 219, 0.1);
}

.auth-footer-link:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 6px;
    right: 6px;
    height: 1px;
    background-color: #3498db;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.auth-footer-link:hover:after {
    transform: scaleX(1);
}

.auth-footer-separator {
    color: #d1d5db;
    font-weight: 400;
    margin: 0 2px;
}

.alert-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 14px 18px; /* 减小内边距 */
    border-radius: 10px; /* 减小圆角 */
    margin-bottom: 20px; /* 减小间距 */
    border-left: 4px solid #c62828; /* 减小边框宽度 */
    font-size: 14px; /* 减小字体大小 */
    font-weight: 500;
    box-shadow: 0 3px 12px rgba(198, 40, 40, 0.1); /* 减小阴影 */
    display: flex;
    align-items: center;
}

.alert-error:before {
    content: "⚠️";
    margin-right: 10px; /* 减小间距 */
    font-size: 18px; /* 减小字体大小 */
}

/* 响应式设计 - 针对平板设备 */
@media (max-width: 1024px) and (min-width: 769px) {
    .login-container {
        width: 85%;
        max-width: 550px;
        padding: 25px;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .alternative-buttons {
        gap: 6px;
    }
    
    .alternative-btn {
        padding: 8px 6px;
        font-size: 12px;
        min-height: 45px;
    }
    
    .alternative-btn i {
        font-size: 16px;
        margin-bottom: 3px;
    }
}

/* 响应式设计 - 针对平板（较小）和手机（横屏） */
@media (max-width: 768px) and (min-width: 481px) {
    .login-container {
        width: 90%;
        padding: 20px;
    }
    
    .login-card {
        padding: 18px 15px;
    }
    
    .alternative-buttons {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .alternative-btn {
        padding: 8px 6px;
        font-size: 11px;
        min-height: 42px;
        min-width: 80px;
    }
    
    .alternative-btn i {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 15px;
    }
}

/* 响应式设计 - 针对手机（竖屏） */
@media (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 15px;
        margin: 15px auto;
    }
    
    .login-card {
        padding: 15px 12px;
    }
    
    /* 在手机上，按钮垂直排列 */
    .alternative-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .alternative-btn {
        width: 100%;
        padding: 12px 10px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        min-height: auto;
        font-size: 14px;
    }
    
    .alternative-btn i {
        font-size: 18px;
        margin-bottom: 0;
        margin-right: 10px;
        width: 22px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
    
    .auth-header p {
        font-size: 13px;
    }
    
    .alternative-title {
        font-size: 13px;
    }
    
    .auth-footer-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .auth-footer-separator {
        display: none;
    }
}

/* 针对非常小的手机屏幕 */
@media (max-width: 360px) {
    .login-container {
        padding: 12px 10px;
    }
    
    .login-card {
        padding: 12px 10px;
    }
    
    .alternative-btn {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .alternative-btn i {
        font-size: 16px;
        margin-right: 8px;
    }
}

/* 确保在PC端常见分辨率下不显示垂直滚动条 */
@media (min-height: 700px) {
    .login-container {
        margin: 30px auto;
    }
}

/* 针对小高度屏幕进一步压缩 */
@media (max-height: 700px) {
    .login-container {
        margin: 10px auto;
        padding: 20px;
    }
    
    .auth-header {
        margin-bottom: 15px;
    }
    
    .login-card {
        margin-bottom: 15px;
        padding: 20px;
    }
    
    .alternative-login {
        margin: 15px 0 20px;
        padding: 15px;
    }
    
    .auth-footer {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.5s ease-out;
}

.login-card {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.alternative-login {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.auth-footer {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}