/* 登录和认证页面样式 */

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.login-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fcc;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d2e;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #c3e6c3;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.info-message {
    background: #e3f2fd;
    color: #1565c0;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.login-tips {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.login-tips h4 {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
    margin-bottom: 10px;
}

.login-tips p {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
    line-height: 1.4;
}

.login-tips .highlight {
    font-weight: 500;
    color: #333;
}

/* Logo样式 */
.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-school-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.login-school-english {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.login-system-name {
    font-size: 16px;
    color: #6366f1;
    margin-top: 8px;
    font-weight: 600;
}

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

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

/* 表单动画 */
.form-group {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* 记住我复选框样式 */
.remember-group {
    text-align: left;
    margin: 20px 0;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
    transition: color 0.3s ease;
}

.remember-checkbox:hover {
    color: #333;
}

.remember-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.remember-checkbox:hover .checkmark {
    border-color: #6366f1;
}

.remember-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #6366f1;
    border-color: #6366f1;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.remember-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .login-container {
        margin: 15px;
        padding: 30px 20px;
        max-width: none;
    }
    
    .login-header h2 {
        font-size: 20px;
    }
    
    .login-school-name {
        font-size: 18px;
    }
    
    .login-system-name {
        font-size: 14px;
    }
    
    .form-control {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .login-btn {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .login-tips {
        padding: 12px;
        margin-top: 20px;
    }
    
    .login-tips p {
        font-size: 11px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 380px) {
    .login-container {
        margin: 10px;
        padding: 25px 15px;
    }
    
    .login-header {
        margin-bottom: 25px;
    }
}

/* 输入框样式优化 */
.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
}

.form-control::-webkit-input-placeholder {
    color: #999;
    font-style: italic;
}

.form-control::-moz-placeholder {
    color: #999;
    font-style: italic;
}

.form-control:-ms-input-placeholder {
    color: #999;
    font-style: italic;
}

/* 验证状态 */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Loading状态 */
.login-btn.loading {
    background: #999;
    cursor: not-allowed;
    position: relative;
    color: transparent;
}

.login-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background: #ff4757;
    width: 33%;
}

.password-strength-bar.medium {
    background: #ffa502;
    width: 66%;
}

.password-strength-bar.strong {
    background: #26de81;
    width: 100%;
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* 链接样式 */
.login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}