/* register_agreement.css - 注册协议页面专用样式 */
/* ========== 基础布局 ========== */
html, body {
    overflow-y: auto; /* 确保垂直滚动可用 */
    position: relative;
}
.register-agreement-page {
    min-height: 100vh;
    overflow-x: hidden; /* 只隐藏水平滚动，保留垂直 */
}
/* 移除有问题的 Flexbox 容器样式 */
.container-fluid {
    /* 移除 flex 属性 */
}
.row.justify-content-center {
    /* 移除 flex 属性，使用默认的 Bootstrap 行为 */
    padding: 1rem 0;
}

/* 注册协议页面专用样式 - 添加到style.css末尾 */
.register-agreement-page .login-card {
    max-width: 1200px;
    width: 95%;
    margin: 2rem auto;
}

.register-agreement-page .footer-fixed {
    position: relative;
    margin-top: 3rem;
}

@media (max-width: 1200px) {
    .register-agreement-page .login-card {
        width: 98%;
        margin: 1rem auto;
    }
}

/* ========== 卡片布局 ========== */
.agreement-card {
    max-width: 900px;
    margin: 0 auto;
}
.login-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.card-body {
    padding: 1.5rem;
}
.card-header-custom {
    padding: 1.5rem 1.5rem 1rem !important;
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: white;
}
.card-header-custom h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem !important;
    font-weight: 600;
}
.card-header-custom p {
    font-size: 0.9rem;
    margin-bottom: 0 !important;
    opacity: 0.9;
}
/* ========== 表单区域 ========== */
.form-section {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border: 1px solid #e3e6f0;
    border-radius: 10px;
    background: #fff;
}
.form-section h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #2e59d9;
    font-weight: 600;
}
/* ========== 协议内容样式 -  ========== */
.agreement-container {
    min-height: 150px; /* 移除 max-height，避免强制滚动冲突 */
    overflow-y: visible; /* 改为 visible，确保全局滚动 */
    overflow-x: hidden;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    box-sizing: border-box;
}
/* 滚动条美化（仅在需要时） */
.agreement-container::-webkit-scrollbar {
    width: 6px;
}
.agreement-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.agreement-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
.agreement-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
.agreement-container h6 {
    color: #005BAC;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}
.agreement-container ul, .agreement-container ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.agreement-container li {
    margin-bottom: 0.5rem;
}
/* ========== 分类网格布局 ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.category-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    cursor: pointer;
    text-align: center;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}
.category-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.category-item:hover:before {
    left: 100%;
}
.category-item:hover {
    border-color: #0d6efd;
	Color: #0d6efd;
    background: #e7f1ff;
    transform: translateY(-0px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}
.category-item.active {
    border-color: #0d6efd;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.25);
}
.category-item .category-icon {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: all 0.3s ease;
}
.category-item.active .category-icon {
    transform: scale(1.1);
    color: white !important;
}
.category-item .category-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}
.category-item .category-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.3;
}
.category-item.active .category-desc {
    opacity: 0.9;
}
/* ========== 类型选择容器 ========== */
.type-container {
    max-height: none; /* 移除 max-height，确保全局滚动 */
    overflow-y: visible; /* 改为 visible，避免局部滚动冲突 */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #c5c5c5 #f1f1f1;
}
.type-container::-webkit-scrollbar {
    width: 6px;
}
.type-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.type-container::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 3px;
}
.type-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
.type-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    border: 1px solid transparent;
    background: white;
}
.type-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateX(2px);
}
.type-item.active {
    background: #0d6efd;
    color: white;
    border-color: #0a58ca;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}
/* ========== 按钮样式 ========== */
.btn-compact {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* ========== 动画效果 ========== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}
.slide-down {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pulse {
    animation: pulse 2s infinite;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}
/* ========== 分类级别行样式 ========== */
.category-levels-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 8px 4px;
    margin-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}
.category-levels-row::-webkit-scrollbar {
    height: 6px;
}
.category-levels-row::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}
.category-levels-row::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}
.category-levels-row::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
.category-level-item {
    flex: 0 0 auto;
    width: 180px;
}
/* 分类级别卡片 */
.category-level-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    background: white;
    padding: 16px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.category-level-card:hover {
    border-color: #005BAC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 172, 0.15);
}
.category-level-card.selected {
    border-color: #005BAC;
    background-color: #e3f2fd;
    box-shadow: 0 4px 12px rgba(0, 91, 172, 0.2);
}
.category-level-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.category-level-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.2;
}
.category-level-desc {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.3;
    margin: 0;
}
/* ========== 表单验证样式 ========== */
.is-invalid {
    border-color: #dc3545 !important;
}
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
}
/* ========== 协议链接样式 ========== */
.agreement-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.agreement-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}
/* ========== 加载动画 ========== */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ========== 模态框样式 ========== */
.agreement-content h6 {
    color: #005BAC;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid #e3f2fd;
    padding-bottom: 0.3rem;
}
.agreement-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}
.agreement-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.agreement-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}
/* ========== 额外动画效果 ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up-section {
    animation: fadeUp 0.8s ease forwards;
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}
.fade-out {
    animation: fadeOut 0.8s ease forwards;
}
/* ========== 分类按钮 ========== */
.category-item {
    cursor: pointer;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
    min-width: 130px;
}
.category-item:hover {
    background-color: #f8f9fa;
}
.category-item.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.category-item.active .category-icon {
    color: #fff;
}
.category-item.active .checkmark {
    display: inline !important;
}
.category-icon {
    font-size: 1rem;
}
/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
   
    .agreement-card {
        margin: 0.5rem;
    }
   
    .card-body {
        padding: 1rem;
    }
   
    .form-section {
        padding: 1rem;
    }
   
    .step-indicator {
        padding: 0.5rem;
    }
   
    .step:not(:last-child):after {
        right: -40%;
    }
   
    /* 移动端协议容器调整 */
    .agreement-container {
        min-height: 150px; /* 保持最小高度，自适应滚动 */
    }
   
    .category-level-item {
        width: 160px;
    }
   
    .category-level-card {
        padding: 12px;
        min-height: 110px;
    }
   
    .category-level-title {
        font-size: 0.9rem;
    }
   
    .category-level-desc {
        font-size: 0.7rem;
    }
}
@media (max-width: 576px) {
    .step:not(:last-child):after {
        right: -30%;
    }
   
    /* 小屏幕协议容器调整 */
    .agreement-container {
        min-height: 120px;
        padding: 1rem;
    }
   
    .category-level-item {
        width: 140px;
    }
   
    .category-level-card {
        padding: 10px;
        min-height: 100px;
    }
   
    .category-level-title {
        font-size: 0.85rem;
    }
   
    .category-level-desc {
        font-size: 0.65rem;
    }
}
/* 版权信息 - 正常流布局，不会影响滚动 */
.footer-fixed { 
    position: relative; /* 改为 relative，跟随内容滚动 */
    width: 100%; 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px); 
    padding: 1rem 2rem; 
    font-size: 0.8rem; 
    color: var(--text-light); 
    text-align: center; 
    border-top: 1px solid rgba(0, 91, 172, 0.1); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 1.5rem; 
    flex-wrap: wrap; 
    font-weight: 500; 
    margin-top: 2rem; /* 添加间距，避免紧贴上方内容 */
}
.footer-fixed a { 
    color: var(--primary); 
    text-decoration: none; 
    transition: var(--transition); 
    font-weight: 600; 
}
.footer-fixed a:hover { 
    text-decoration: underline; 
    color: #0077cc; 
}
.footer-fixed img { 
    height: 16px; 
    vertical-align: middle; 
    margin: 0 6px; 
    transition: var(--transition); 
}
.footer-fixed img:hover { 
    transform: scale(1.1); 
}

/* 确保协议链接样式 */
.form-check-label a {
    font-weight: 600;
    transition: all 0.3s ease;
}
.form-check-label a:hover {
    color: #0077cc !important;
    text-decoration: underline !important;
}


/* 确保模态框相关样式正确 */
.modal-backdrop {
	z-index: 1040;
}
.modal {
	z-index: 1050;
}

/* 类型描述样式 - 修改为同一行显示 */
.type-description {
	font-size: 0.75rem;
	color: #6c757d;
	margin-left: 0.5rem;
	line-height: 1.3;
}

/* 类型项样式优化 - 同一行布局 */
.type-item {
	padding: 0.75rem 1rem;
	margin-bottom: 0.5rem;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.875rem;
	border: 1px solid transparent;
	background: white;
	text-align: left;
}

.type-item-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.type-name {
	font-weight: 600;
	color: #2d3748;
	white-space: nowrap;
}

.type-info {
	display: flex;
	align-items: center;
	flex: 1;
}

.type-description {
	flex: 1;
	margin-left: 0.75rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #6c757d;
	font-size: 0.75rem;
}

.type-item:hover {
	background: #e7f1ff;
	border-color: #0d6efd;
	transform: translateX(5px);
}

.type-item.active {
	background: #0d6efd;
	color: white;
	border-color: #0a58ca;
	transform: translateX(5px);
	box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.type-item.active .type-name {
	color: white;
}

.type-item.active .type-description {
	color: rgba(255, 255, 255, 0.9);
}

/* 响应式调整 */
@media (max-width: 768px) {
	.type-item-content {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.type-info {
		width: 100%;
		margin-bottom: 0.25rem;
	}
	
	.type-description {
		margin-left: 0;
		margin-top: 0.25rem;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
	}
}
