/* 模态窗口堆叠管理 */
.modal {
    z-index: 1050;
    /* 基础层级 */
}

.modal-backdrop {
    z-index: 1040;
}

.modal.show {
    pointer-events: none;
    /* 默认禁止所有模态窗口的交互 */
}

.modal.show.top-modal {
    pointer-events: auto;
    /* 只允许最上层模态窗口交互 */
}

body {
    background-color: #f5f5f5;
    padding: 20px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.card {
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* 开关样式优化 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 筛选区域排版改进 */
.filter-section {
    margin-bottom: 20px;
}

.filter-section .row {
    margin-bottom: 10px;
}

.filter-section .col-md-12 {
    padding: 0;
}

.filter-section h5 {
    margin-bottom: 5px;
}

.filter-section .clear-filters {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
}

.filter-section .clear-filters:hover {
    text-decoration: none;
}

.filter-section .filter-badge {
    margin-right: 5px;
    margin-bottom: 5px;
    cursor: pointer;
}

.filter-section .filter-badge.active {
    background-color: #007bff;
    color: white;
}

.skill-description {
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: #555;
}

.badge {
    margin-right: 5px;
    margin-bottom: 5px;
}

#searchInput {
    border-radius: 20px;
    padding-left: 20px;
    border: 1px solid #ddd;
}

.filter-badge {
    cursor: pointer;
    margin: 5px;
    user-select: none;
    transition: all 0.2s;
}

.filter-badge:hover {
    opacity: 0.8;
}

.filter-badge.active {
    background-color: #0d6efd !important;
}

.loading {
    text-align: center;
    padding: 20px;
}

.stats {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.page-header {
    background-color: #343a40;
    color: white;
    padding: 20px 0;
    margin-bottom: 20px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    margin: 0 auto;
    /* 确保标题居中 */
    flex: 1;
    /* 让标题占据剩余空间，使其居中 */
    text-align: center;
    /* 确保标题文本居中 */
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.attribute-label {
    font-weight: bold;
    color: #555;
}

.attribute-value {
    color: #212529;
}

.clear-filters {
    cursor: pointer;
    color: #dc3545;
    font-size: 0.9rem;
    text-decoration: underline;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    font-size: 0.9rem;
}

.table-responsive {
    margin-top: 1rem;
}

.table {
    font-size: 0.9rem;
}

.table td {
    vertical-align: middle;
}

.jue-xue-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    transform: rotate(-15deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 技能详情列表样式 */
.skill-details-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skill-attribute {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.skill-attribute strong {
    flex-shrink: 0;
    width: 150px;
}

.skill-attribute pre {
    margin: 0;
    padding: 5px;
    background-color: #e9ecef;
    border-radius: 3px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 自定义滚动条样式 */
.skill-details-list::-webkit-scrollbar {
    width: 8px;
}

.skill-details-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.skill-details-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.skill-details-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.option-btn {
    cursor: pointer;
    font-size: 24px;

}

.option-menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.option-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.option-menu a:hover {
    background-color: #f1f1f1;
}

.dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
}

/* 添加样式以美化段落 */
.mb-3 p {
    margin-bottom: 0.5rem;
}

/* 新增样式以美化玄络展示 */
.meridian-link {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.meridian-link h6 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.meridian-link p {
    margin-left: 1rem;
}

.dropdown-toggle::after {
    content: none;
}

.dropdown-toggle::before {
    content: '\25BC';
    /* 下拉箭头 */
    float: right;
    margin-left: 0.25rem;
    font-size: 0.625em;
    line-height: 0;
    vertical-align: middle;
}

.highlight-property {
    background-color: #e6f7ff;
    /* 浅蓝色背景 */
    font-weight: bold;
    /* 加粗字体 */
    padding: 5px;
    border-radius: 4px;
    margin-top: 10px;
}

.highlight-special {
    background-color: #fff0f6;
    /* 浅粉色背景 */
    font-weight: bold;
    /* 加粗字体 */
    padding: 5px;
    border-radius: 4px;
    margin-top: 10px;
}

.highlight-unlock-conditions {
    background-color: #8be79137;
    /* 浅粉色背景 */
    font-weight: bold;
    /* 加粗字体 */
    padding: 5px;
    border-radius: 4px;
    margin-top: 10px;
}

/* 新增样式以美化显示按钮 */
.show-link-btn {
    background-color: #007bff;
    /* 蓝色背景 */
    color: white;
    /* 白色文字 */
    border: none;
    /* 去掉边框 */
    padding: 5px 10px;
    /* 内边距 */
    border-radius: 4px;
    /* 圆角 */
    cursor: pointer;
    /* 鼠标悬停时显示手型 */
    transition: background-color 0.3s ease;
    /* 平滑过渡效果 */
}

.show-link-btn:hover {
    background-color: #0056b3;
    /* 鼠标悬停时颜色变深 */
}

/* 九宫格布局 */
.meridian-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.grid-item {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s;
    background: white;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 序号标识 */
.grid-order-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #6c757d;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .meridian-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .meridian-grid {
        grid-template-columns: 1fr;
    }
}

/* 内容元素样式 */
.resource-wrapper {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-item {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.time-wrapper {
    color: #6c757d;
    font-size: 0.9em;
}

.button-wrapper {
    margin-top: 15px;
    text-align: center;
}

/* 标签样式 */
.badge {
    margin-right: 5px;
    font-weight: normal;
}

/* 前置条件样式 */
.precondition-wrapper {
    margin-top: 12px;
    border-top: 1px dashed #eee;
    padding-top: 8px;
}

.precondition-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.precondition-content {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.precondition-item {
    font-size: 0.85em;
    padding: 3px 8px;
    border: 1px solid #dee2e6 !important;
    border-radius: 10px;
}

/* 按钮过渡效果 */
.btn {
    transition: all 0.3s ease;
}

/* 卸下按钮悬停效果 */
.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white !important;
}

/* 按钮容器间距 */
.button-wrapper {
    margin-top: 15px;
    gap: 8px;
}

/* 禁用状态样式 */
.list-group-item.disabled {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.list-group-item.disabled .btn {
    pointer-events: none;
}

/* 按钮状态反馈 */
.btn[disabled] {
    cursor: not-allowed;
}

/* 展示框样式 */
.showcase-card {
    background: linear-gradient(145deg, #f8f9fa 0%, #ecedee 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.showcase-img {
    height: 220px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.showcase-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.showcase-text li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
}

.showcase-text li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .showcase-img {
        height: 180px;
        margin-bottom: 1.5rem;
    }
}

.table td {
    vertical-align: middle !important;
    /* 垂直居中 */
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: rgba(13, 110, 253, 0.05);
    /* 浅蓝色悬停背景 */
}