/* 认证页面样式 */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.form-group input:invalid {
    border-color: #dc3545;
}

.form-group input:valid {
    border-color: #28a745;
}

/* 错误消息样式 */
.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.password-error {
    display: none;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 流派选择区域样式 */
.school-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    flex: 1;
}

.checkbox-item:hover label {
    color: var(--primary-color);
}

/* 伦理协议区域 */
.ethical-agreement {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    margin-top: 0.5rem;
}

.ethical-agreement h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ethical-content h5 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.ethical-text {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: justify;
}

.ethical-text br {
    margin-bottom: 0.5rem;
    display: block;
    content: "";
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"]:invalid + span {
    color: #dc3545;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* 提示信息样式 */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* 页脚链接 */
.auth-footer {
    text-align: center;
    color: var(--text-light);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        min-height: 100vh;
        background: var(--card-background);
    }

    .auth-card {
        padding: 2rem 1.5rem;
        box-shadow: none;
        border: none;
    }

    .school-checkboxes {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .ethical-agreement {
        padding: 1rem;
        max-height: 250px;
    }

    .checkbox-label {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* 滚动条样式 */
.ethical-agreement::-webkit-scrollbar {
    width: 6px;
}

.ethical-agreement::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ethical-agreement::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.ethical-agreement::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 加载状态 */
.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-level {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.strength-message {
    font-size: 0.75rem;
    color: var(--text-light);
}

.login-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-success-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-header h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-body {
    margin: 1.5rem 0;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.btn-confirm {
    background: #ccc;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.btn-confirm.active {
    background: var(--primary-color);
    cursor: pointer;
}

.btn-confirm.active:hover {
    background: var(--primary-dark);
}