/**
 * 图片列表页样式 - GitHub暗黑风格
 * 瀑布流布局
 */

/* ========================================
   容器宽度限制（与参考站点一致）
   ======================================== */
.container-fluid {
    max-width: 1800px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ========================================
   Bootstrap 常用工具类（最小集）
   说明：官网未引入 bootstrap.min.css（base/head.html 已注释），
   但本页大量使用了 d-flex / justify-content-between / gap-* 等类。
   这里补齐"工具栏布局"所需的最小工具类，避免整站引入 Bootstrap 造成冲突。
   ======================================== */
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* ========================================
   筛选侧边栏 - GitHub风格
   ======================================== */
.filter-sidebar {
    background: #fff;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 6px;
    padding: 16px;
    box-shadow: none;
    /* 移除高度限制，让所有分类默认全部显示 */
    /* position: sticky; */
    /* top: 80px; */
    /* max-height: calc(100vh - 100px); */
    /* overflow-y: auto; */
}

.filter-sidebar::-webkit-scrollbar {
    width: 8px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: rgba(207, 156, 126, 0.3);
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(207, 156, 126, 0.3);
}

.filter-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 极简风格的已选标签 - 只有边框 */
.selected-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #cf9c7e;
    background: transparent;
    border: 1px solid #cf9c7e;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.selected-tag:hover {
    background: rgba(207, 156, 126, 0.1);
    border-color: #b88a6a;
    color: #b88a6a;
}

.tag-close {
    color: #cf9c7e;
    text-decoration: none;
    margin-left: 8px;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tag-close:hover {
    color: #b88a6a;
    opacity: 1;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.filter-toggle:hover {
    color: #cf9c7e !important;
}

.toggle-chevron {
    font-size: 12px;
    color: #cf9c7e;
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.filter-content {
    transition: all 0.3s ease;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-item {
    display: block;
    padding: 6px 10px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-item:hover {
    background: rgba(207, 156, 126, 0.1);
    color: #cf9c7e;
}

.filter-item.active {
    background: #a67a5a;
    color: #333;
    font-weight: 500;
}

.filter-children {
    margin-left: 12px;
    border-left: 1px solid rgba(207, 156, 126, 0.3);
    padding-left: 8px;
    margin-top: 2px;
}

.filter-children .filter-item {
    font-size: 13px;
    padding: 5px 8px;
}

/* ========================================
   工具栏 - GitHub风格
   ======================================== */
.toolbar {
    background: #f2f2f2;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(207, 156, 126, 0.3);
    box-shadow: none;
    /* 与上方 page_pos / 下方瀑布流保持一致的留白 */
    margin-top: 12px;
}

/* 原模板使用了 .mb-4（且该工具类带 !important），这里将下间距减半 */
.toolbar.mb-4 {
    margin-bottom: 12px !important;
}

/* 工具栏 - 参考参考网站的实现方式，完全依赖 Bootstrap 的 justify-content-between */
.toolbar-info {
    font-size: 14px;
    color: #666;
}

.toolbar-info strong {
    color: #cf9c7e;
}

/* 工具栏操作区域：间隙缩减50% */
.toolbar-actions.gap-2 {
    gap: 0.25rem !important; /* 从 0.5rem 缩减到 0.25rem（50%） */
}

.btn-group .btn {
    background: #f2f2f2;
    border: 1px solid rgba(207, 156, 126, 0.3);
    color: #333;
    font-size: 13px;
    border-radius: 6px;
}

.btn-group .btn:hover {
    background: rgba(207, 156, 126, 0.1);
    border-color: #cf9c7e;
    color: #cf9c7e;
}

.btn-group .btn.active {
    background: #a67a5a;
    border-color: #a67a5a;
    color: #333;
}

/* 排序按钮 - 未激活状态 */
.btn-outline-secondary {
    background: #f2f2f2; /* 浅灰色背景 */
    border-color: rgba(207, 156, 126, 0.3); /* 半透明金色边框 */
    color: #666; /* 灰色字体 */
    border-radius: 6px;
}

.btn-outline-secondary i {
    color: #666; /* 灰色图标 */
}

.btn-outline-secondary:hover {
    background: rgba(207, 156, 126, 0.1);
    border-color: #cf9c7e;
    color: #cf9c7e;
}

.btn-outline-secondary:hover i {
    color: #cf9c7e; /* hover 时图标变金色 */
}

/* 排序按钮 - 激活状态 */
.btn-group .btn-outline-secondary.active,
.btn-outline-secondary.active {
    background: transparent !important; /* 透明背景（覆盖基础样式） */
    border-color: #cf9c7e !important; /* 金色边框 */
    color: #cf9c7e !important; /* 金色字体 */
}

.btn-group .btn-outline-secondary.active i,
.btn-outline-secondary.active i {
    color: #cf9c7e !important; /* 金色图标 */
}

/* ========================================
   优雅的等高布局 - 改进版
   每行图片高度一致，宽度根据比例自适应，左右完美对齐
   核心原理：flex布局 + flex-grow实现自适应填充
   ======================================== */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* 紧凑间距 */
    align-items: flex-start;
    justify-content: flex-start; /* 左对齐 */
    /* 与下方反馈表单（feedback_box）拉开距离 */
    margin-bottom: 40px;
}

/* 填充最后一行，避免最后一行拉伸 */
.masonry-grid::after {
    content: '';
    flex-grow: 999; /* 极大值确保填充但不拉伸 */
}

.masonry-item {
    position: relative;
    /* 宽度由JavaScript算法动态计算 */
    /* flex属性将在JS中设置 */
    display: block;
    /* 图片加载渐入动画 */
    animation: imageAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* 图片加载渐入动画 */
@keyframes imageAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 等高布局：固定高度，宽度自适应 */
.masonry-item .minimal-image-thumb {
    height: 200px; /* 固定行高 */
    width: 100%; /* 填充容器宽度 */
    object-fit: cover; /* 裁剪并保持比例 */
    display: block;
    /* 优化图片渲染质量 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* 添加过渡效果，用于悬停放大 */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* 图片描述在下方 */
.image-info-overlay {
    position: static;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(12px);
    padding: 10px 12px;
    border-top: 1px solid rgba(207, 156, 126, 0.12);
    width: 100%;
    box-sizing: border-box;
    min-height: 44px; /* 固定最小高度 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 响应式：不同屏幕尺寸的高度调整（宽度由算法计算） */
@media (max-width: 1400px) {
    .masonry-item .minimal-image-thumb {
        height: 180px;
    }
    
    .masonry-grid {
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .masonry-item .minimal-image-thumb {
        height: 160px;
    }
    
    .masonry-grid {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .filter-sidebar {
        position: static;
        max-height: none;
    }
    
    .masonry-item .minimal-image-thumb {
        height: 140px;
    }
    
    .masonry-grid {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .masonry-item .minimal-image-thumb {
        height: 120px;
    }
    
    .masonry-grid {
        gap: 6px;
    }
}

/* ========================================
   优雅的图片卡片 - 改进版
   ======================================== */
.minimal-image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(207, 156, 126, 0.3);
    background: #f5f5f5;
    cursor: pointer;
    /* 优化过渡效果 - 使用流畅的缓动曲线 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    width: 100%; /* 填充父容器宽度 */
    height: 100%; /* 填充父容器高度 */
    /* 初始状态的微妙阴影 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* GPU 加速 */
    will-change: transform, box-shadow, border-color;
}

.minimal-image-card:hover {
    /* 边框高亮 */
    border-color: #cf9c7e;
    /* 轻微上浮 */
    transform: translateY(-4px);
    /* 增强阴影 - 创造悬浮感 */
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(207, 156, 126, 0.1),
        0 4px 12px rgba(207, 156, 126, 0.15);
}

.minimal-image-thumb {
    width: auto; /* 由 gallery.css 中的等高布局样式控制 */
    height: auto; /* 由 gallery.css 中的等高布局样式控制 */
    display: block;
    /* 过渡效果已在上面的 .masonry-item .minimal-image-thumb 中定义 */
}

/* 悬停时图片放大效果 */
.minimal-image-card:hover .minimal-image-thumb {
    transform: scale(1.05);
}

/* 悬停时信息栏微妙变化 */
.minimal-image-card:hover .image-info-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
    border-top-color: rgba(207, 156, 126, 0.25);
}

/* 单行显示：分类标签（左）+ 文件大小（右） */
.image-title-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* 分类标签（左侧，可省略） */
.image-category-tags {
    flex: 1;
    min-width: 0; /* 允许收缩 */
    color: #333;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* 添加过渡效果 */
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}

/* 悬停时分类标签高亮 */
.minimal-image-card:hover .image-category-tags {
    color: #b88a6a;
}

/* 文件大小（右侧，固定宽度） */
.image-file-size {
    flex-shrink: 0; /* 不收缩 */
    color: #cf9c7e;
    font-size: 11px;
    font-weight: 600;
    /* 添加微妙的背景 */
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(207, 156, 126, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬停时文件大小高亮 */
.minimal-image-card:hover .image-file-size {
    background: rgba(207, 156, 126, 0.15);
    color: #b88a6a;
}

/* 隐藏旧的 meta 区域 */
.image-meta-minimal {
    display: none;
}

/* 保留旧的图片卡片样式（兼容性） */
.gallery-page .image-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(207, 156, 126, 0.3);
    box-shadow: none;
    transition: all 0.2s ease;
}

.gallery-page .image-card:hover {
    border-color: #cf9c7e;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.badge-recommend {
    background: #d29922 !important;
    color: #fff !important;
}

.image-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-meta small {
    color: #666;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.image-tags .badge {
    font-size: 11px;
    padding: 3px 6px;
}

/* ========================================
   空状态 - GitHub风格
   ======================================== */
.empty-state {
    background: #fff;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 6px;
    padding: 48px 20px;
    box-shadow: none;
}

.empty-state i {
    color: #999 !important;
}

.empty-state h4 {
    color: #333;
}

.empty-state p {
    color: #666 !important;
}

/* ========================================
   加载更多 - GitHub风格
   ======================================== */
.load-more-btn {
    display: block;
    width: 200px;
    margin: 30px auto;
}

/* ========================================
   移动端优化
   ======================================== */
@media (max-width: 768px) {
    .toolbar {
        padding: 10px 15px;
    }
    
    .toolbar-actions .btn-group {
        width: 100%;
    }
    
    .toolbar-actions .btn {
        flex: 1;
        font-size: 12px;
    }
    
    .image-title {
        font-size: 13px;
    }
    
    .image-meta {
        font-size: 11px;
    }
}

/* ========================================
   模态框样式 - GitHub风格
   ======================================== */
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    background-color: #f8f8f8;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 12px;
}

.modal-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid rgba(207, 156, 126, 0.3);
}

.modal-header .modal-title {
    color: #333;
    font-weight: 600;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    background-color: #f8f8f8;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(207, 156, 126, 0.3);
}

.modal-footer {
    background-color: #f8f8f8;
    border-top: 1px solid rgba(207, 156, 126, 0.3);
}

.image-detail-info {
    padding: 16px 0;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(207, 156, 126, 0.3);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    width: 120px;
    color: #666;
    font-size: 14px;
}

.info-value {
    flex: 1;
    color: #333;
    font-size: 14px;
}

/* ========================================
   VR 场景卡片样式
   ======================================== */
.gallery-card--vr {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-card--vr:hover {
    border-color: rgba(207, 156, 126, 0.5);
    transform: translateY(-2px);
}

.gallery-card--vr .vr-meta {
    font-size: 13px;
    color: #999;
}

.gallery-card--vr .badge {
    font-size: 11px;
}

.gallery-card--vr .btn {
    box-shadow: 0 8px 20px rgba(207, 156, 126, 0.25);
}

/* ========================================
   图片卡片悬停按钮组
   ======================================== */
/* 按钮组容器 */
.image-hover-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 桌面端悬停显示按钮 */
@media (min-width: 768px) {
    .minimal-image-card:hover .image-hover-actions {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* 移动端始终显示按钮 */
@media (max-width: 767px) {
    .image-hover-actions {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }
}

/* 按钮基础样式 - 极简线框设计 */
.image-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.image-action-btn:hover {
    background: rgba(207, 156, 126, 0.9);
    border-color: rgba(207, 156, 126, 1);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(207, 156, 126, 0.4);
}

.image-action-btn:active {
    transform: scale(0.95);
}

.image-action-btn i {
    font-size: 16px;
}

/* 移除卡片的点击光标 */
.minimal-image-card {
    cursor: default;
}

/* ========================================
   高级搜索面板样式
   ======================================== */
.advanced-search-panel {
    background: #fff;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.advanced-search-panel .card {
    background: #fff;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 6px;
}

.advanced-search-panel .card-body {
    padding: 16px;
}

.advanced-search-panel .form-label {
    color: #666;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advanced-search-panel .form-control-sm {
    background: #f5f5f5;
    border: 1px solid rgba(207, 156, 126, 0.3);
    color: #333;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.advanced-search-panel .form-control-sm:focus {
    background: #f8f8f8;
    border-color: #cf9c7e;
    color: #333;
    box-shadow: 0 0 0 3px rgba(207, 156, 126, 0.1);
    outline: none;
}

.advanced-search-panel .form-control-sm::placeholder {
    color: #999;
}

.advanced-search-panel .d-flex.gap-2 {
    gap: 8px;
}

.advanced-search-panel .text-muted {
    color: #999;
    font-size: 12px;
}

/* ========================================
   搜索包装器和下拉框样式
   ======================================== */
.search-wrapper {
    position: relative;
    display: inline-block;
}

/* ========================================
   工具栏内搜索：样式对齐顶部 page_pos 通用搜索栏
   说明：工具栏搜索仍提交到本栏目（?keyword=），这里只做视觉统一
   ======================================== */
.search-wrapper .toolbar-search-form {
    width: 360px;
    height: 31px; /* 与工具栏按钮高度一致 */
    position: relative;
    margin: 0;
}
.search-wrapper .toolbar-search-form input[type="text"] {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 29px;
    font-size: 13px;
    color: #333;
    padding-left: 15px;
    padding-right: 40px;
    border: 1px solid rgba(207, 156, 126, 0.9); /* 金色边框 */
    border-radius: 16px;
    background: #f2f2f2;
    outline: none;
    box-sizing: border-box;
}
.search-wrapper .toolbar-search-form input[type="text"]::placeholder {
    color: #999;
}
.search-wrapper .toolbar-search-form input[type="submit"] {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 50%;
    background: url("../images/search.png") #cf9c7e center no-repeat;
    background-size: 60%;
    outline: none;
    cursor: pointer;
    transition: border-color 0.25s;
}
.search-wrapper .toolbar-search-form input[type="submit"]:hover {
    border-color: #cf9c7e;
}

.search-wrapper .toolbar-search-form input[type="text"]:hover {
    border-color: #cf9c7e;
}
.search-wrapper .toolbar-search-form input[type="text"]:focus {
    background: #f2f2f2;
    border-color: #a67a5a;
    box-shadow: 0 0 0 2px rgba(207, 156, 126, 0.18);
}

@media (max-width: 768px) {
    .search-wrapper .toolbar-search-form {
        width: 240px;
        height: 31px;
    }
    .search-wrapper .toolbar-search-form input[type="text"] {
        line-height: 29px;
        padding-left: 12px;
        padding-right: 38px;
    }
    .search-wrapper .toolbar-search-form input[type="submit"] {
        width: 24px;
        height: 24px;
        right: 2px;
    }
}

.search-suggestions,
.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid rgba(207, 156, 126, 0.3);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    min-width: 300px;
}

.search-suggestions-list,
.search-history-list {
    padding: 4px;
}

/* 搜索建议样式 */
.suggestion-group {
    margin-bottom: 8px;
}

.suggestion-group:last-child {
    margin-bottom: 0;
}

.suggestion-type {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(207, 156, 126, 0.3);
}

.suggestion-item {
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 4px;
}

.suggestion-item:hover {
    background: rgba(207, 156, 126, 0.1);
    color: #cf9c7e;
}

.suggestion-item:active {
    background: #a67a5a;
}

/* 搜索历史样式 */
.search-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 4px;
}

.search-history-item:hover {
    background: rgba(207, 156, 126, 0.1);
    color: #cf9c7e;
}

.search-history-item:active {
    background: #a67a5a;
}

.search-history-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-history-item .btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    margin-left: 8px;
    padding: 4px;
    width: 20px;
    height: 20px;
}

.search-history-item:hover .btn-close {
    opacity: 1;
}

.search-history-item .btn-close:hover {
    opacity: 1;
    background: rgba(220, 53, 69, 0.2);
}

/* 下拉框滚动条样式 */
.search-suggestions::-webkit-scrollbar,
.search-history::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track,
.search-history::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb,
.search-history::-webkit-scrollbar-thumb {
    background: rgba(207, 156, 126, 0.3);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover,
.search-history::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========================================
   搜索相关按钮样式
   ======================================== */
.btn-filter-minimal {
    background: transparent;
    border: 1px solid rgba(207, 156, 126, 0.3);
    color: #666;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-filter-minimal:hover {
    background: rgba(207, 156, 126, 0.1);
    border-color: #cf9c7e;
    color: #cf9c7e;
}

.btn-filter-minimal:active {
    background: #a67a5a;
    border-color: #a67a5a;
    color: #333;
}

.btn-filter-minimal i {
    font-size: 14px;
}

.filter-separator {
    width: 1px;
    height: 24px;
    background: rgba(207, 156, 126, 0.3);
    margin: 0 8px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .advanced-search-panel {
        padding: 16px;
    }
    
    .advanced-search-panel .row {
        margin: 0;
    }
    
    .advanced-search-panel .col-md-6 {
        padding: 0 8px;
        margin-bottom: 12px;
    }
    
    .search-suggestions,
    .search-history {
        min-width: 100%;
        max-width: 100%;
    }
    
    .btn-filter-minimal {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .filter-separator {
        display: none;
    }
}

@media (max-width: 576px) {
    .advanced-search-panel {
        padding: 12px;
    }
    
    .advanced-search-panel .form-control-sm {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .suggestion-item,
    .search-history-item {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .suggestion-type {
        padding: 6px 10px;
        font-size: 10px;
    }
}

