/* =====================================================
  经验分享页样式
  基于 home.css 视觉体系（左侧导航 + 右侧内容框架）
  ===================================================== */

/* ---------- 经验分享介绍（全屏居中，覆盖 home.css） ---------- */
.worldcup-intro {
    text-align: center;
    padding: 40px 30px;
}

.worldcup-intro h3 {
    text-align: center;
}

.worldcup-intro p {
    text-align: center;
    margin: 0 auto;
}

/* ---------- 分类下拉（顶部筛选栏） ---------- */
.filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

/* 下拉菜单：fixed 定位，避免被横向滚动容器裁剪 */
.filter-dropdown-menu {
    position: fixed;
    top: 60px;
    left: 0;
    min-width: 140px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    padding: 6px;
    z-index: 1002;
    display: none;
}

.filter-dropdown-menu.show {
    display: block;
}

.filter-dropdown-item {
    padding: 9px 16px;
    font-size: 13px;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    margin-bottom: 4px;
}

.filter-dropdown-item:last-child {
    margin-bottom: 0;
}

.filter-dropdown-item:hover {
    background: #f5f5f5;
}

.filter-dropdown-item.active {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
}

/* ---------- 搜索栏 ---------- */
.exp-search {
    position: relative;
    max-width: 50%;   /* 桌面端居中 50% 宽 */
    margin: -2px auto 6px;   /* auto 左右居中 */
    padding: 0 20px;
}

.exp-search .layui-icon {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

.exp-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #e5e5e5;
    border-radius: 22px;
    padding: 0 24px 0 44px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.exp-search input::placeholder {
    color: #aaa;
}

.exp-search input:focus {
    border-color: #222222;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* ---------- 快捷标签 ---------- */
.exp-quick-tags {
    max-width: calc(50% - 40px);   /* 与搜索输入框同宽，左右边缘对齐搜索框 */
    margin: 15px auto 6px;         /* 上边距 15px，与搜索条间距 +5 */
    padding: 0;                    /* 标签初始对齐搜索框左边 */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.exp-tag-btn {
    flex: none;               /* 横向滚动时不压缩 */
    padding: 6px 16px;        /* 左右各收缩 2px */
    font-size: 11px;          /* 文字 11px */
    color: #333;
    background: #f8f4f1;      /* 默认标签背景 */
    border: 1px solid #eae5e0;   /* 默认标签边框 */
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.exp-tag-btn:hover {
    background: #222;      /* hover 黑色背景 */
    color: #fff;
    border-color: transparent;   /* 取消移上时的边框 */
}

.exp-tag-btn.active {
    color: #fff;
    background: #222;         /* 点击后黑色背景 */
    border-color: #222;
}

/* 再次点击取消后立即恢复初始状态（忽略 hover 黑色），鼠标移开后失效 */
.exp-tag-btn.revert,
.exp-tag-btn.revert:hover {
    background: #f8f4f1;
    color: #333;
    border-color: #eae5e0;
}

/* 全部经验按钮：进入页面为全部经验，选中（含初始）黑色；未选中状态灰色背景 + 0.8px 灰色边框 */
#expAllBtn {
    background-color: #f2f3f5;     /* 未选中状态：灰色背景 */
    color: #6b7280;
    border: 0.8px solid #d9dce1;   /* 未选中状态：0.8px 灰色边框 */
}
#expAllBtn.active {
    background-color: #222;        /* 初始选中：黑色 */
    color: #fff;
    border-color: transparent;
}
#expAllBtn:hover {
    border-color: transparent;     /* hover 变黑时去掉灰边框 */
}

/* 全部经验按钮下箭头：展开菜单时旋转朝上，带动画 */
#expAllBtn .layui-icon {
    display: inline-block;
    transition: transform 0.25s ease;
}
#expAllBtn.open .layui-icon {
    transform: rotate(180deg);     /* 箭头朝上 */
}

/* ---------- 卡片容器 ---------- */
.exp-card-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px 20px;   /* 上边距 +5，卡片整体下移 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ---------- 卡片（效果与比赛推荐页一致） ---------- */
.exp-card {
    position: relative;
    background: #fff;
    border: 0.8px solid #eae5e0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* 进入视口后滑出：从下往上滑入 + 淡入
   初始态由 JS 加 .exp-card-slide（opacity 0），观察到可见时加 .exp-card-in 触发动画；
   动画结束后 JS 移除这两个类，把位移交还给 :hover（否则动画终态会盖掉 hover 上浮） */
@keyframes expCardSlideIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.exp-card.exp-card-slide {
    opacity: 0;
}

.exp-card.exp-card-slide.exp-card-in {
    animation: expCardSlideIn 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* 系统开启「减少动态效果」时直接显示 */
@media (prefers-reduced-motion: reduce) {
    .exp-card.exp-card-slide { opacity: 1; }
    .exp-card.exp-card-slide.exp-card-in { animation: none; }
}

.exp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .exp-card:active {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        border-color: rgba(0, 0, 0, 0.3);
    }
}

/* ---------- 视频封面（无视频不显示） ---------- */
.exp-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
}

.exp-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 封面图用背景方式显示，统一 16:9 裁切 */
.exp-cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.exp-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.2s, background 0.2s;
}

.exp-card:hover .exp-play {
    background: rgba(210, 58, 46, 0.9);
    transform: translate(-50%, -50%) scale(1.08);
}

/* ---------- 卡片正文 ---------- */
.exp-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.exp-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;   /* 底部多留 3px 空白 */
}

.exp-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f3efe8;
    color: #8a6d3b;
    white-space: nowrap;
    transform: translateY(3px);   /* 标签下移 3px */
}

.exp-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.exp-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exp-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exp-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 详情弹层 ---------- */
.exp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
}

.exp-modal.show {
    display: block;
}

.exp-modal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.exp-modal-body {
    position: relative;
    width: 92%;
    max-width: 720px;
    max-height: 86vh;
    margin: 7vh auto 0;
    background: #fff;
    border-radius: 14px;
    padding: 24px 24px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.exp-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;   /* 原 right:2px 左移 15px 后，再按需求右移 3px */
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.exp-modal-close:hover {
    background: #eee;
    color: #333;
}

.exp-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-right: 53px;   /* 与关闭按钮位置联动（14px + 32px + 7px 安全间距） */
}

.exp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    line-height: 1.5;
    margin: 0 0 6px;
}

.exp-modal-subtitle {
    font-size: 12px;
    color: #999;
    padding-bottom: 12px;
    margin-bottom: 0;
}

.exp-modal-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 24px;
    border-top: 1px solid #f0f0f0;   /* 正文滚动区上方上边线 */
    padding-top: 14px;
    margin-right: -24px;   /* 拉宽到弹层右边缘，滚动条贴最右 */
    padding-right: 20px;   /* 文字与滚动条留白 */
}

.exp-modal-content video {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #000;
}

.exp-modal-richtext {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
}

.exp-modal-richtext p {
    margin: 0 0 12px;
}

.exp-modal-richtext img {
    max-width: 100%;
    border-radius: 8px;
}

/* 弹层底部固定按钮（不随内容滚动）：关闭（左）+ 收藏（右） */
.exp-fav-wrap {
    flex: none;
    padding: 14px 2px 16px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    display: flex;               /* 两按钮并排居中 */
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.exp-fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100px;                /* 按钮宽度 100px */
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
    background: #f5f5f5;   /* 灰色背景 */
    border: 1px solid #d9d9d9;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.exp-fav-btn .layui-icon {
    font-size: 16px;
    color: #d4a017;
}

.exp-fav-btn:hover {
    background: #ebebeb;
}

/* 底部关闭按钮：默认黑色，圆角 25 */
.exp-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;                /* 与收藏按钮同宽 */
    padding: 8px 10px;
    font-size: 13px;
    color: #fff;
    background: #222;            /* 默认黑色 */
    border: 1px solid #222;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.exp-close-btn:hover {
    background: #000;
    border-color: #000;
}

.exp-fav-btn.faved {
    color: #fff;
    background: #222;
    border-color: #222;
}

.exp-fav-btn.faved .layui-icon {
    color: #fff;          /* 点击后图标白色 */
}

/* ============ 置顶 / 到底部浮动按钮 ============ */
.scroll-btns {
    position: fixed;
    right: 24px;
    bottom: 40px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scroll-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scroll-btn:hover {
    background: #222222;
    color: #ffffff;
}

/* ---------- 空状态（搜索/筛选无结果，与比赛推荐页一致） ---------- */
.jc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #9aa3af;
    font-size: 15px;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #dddddd;
}

.jc-empty .jc-empty-icon {
    display: block;
    margin: 0 auto 16px;
    width: 60%;
    max-width: 180px;
    height: auto;
}

/* ---------- 向下滚动加载提示 ---------- */
.exp-loadmore {
    text-align: center;
    padding: 16px 0 30px;
    font-size: 13px;
    color: #999;
    display: none;
}

.exp-loadmore .exp-end {
    display: none;
}

.exp-loadmore.end .exp-end {
    display: block;
}

.exp-loadmore.end .exp-loading {
    display: none;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
    .exp-card-box {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 14px;
    }

    .exp-search {
        padding: 0 14px;
        max-width: none;   /* 手机端恢复满宽，保持不变 */
    }

    .exp-quick-tags {
        max-width: calc(100% - 28px);   /* 与搜索输入框同宽，左右边缘对齐 */
        padding: 0;                     /* 标签初始对齐搜索框左边 */
        flex-wrap: nowrap;      /* 手机端只显示一行 */
        overflow-x: auto;       /* 超出部分向右滑动 */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;  /* 隐藏滚动条 */
    }

    .exp-quick-tags::-webkit-scrollbar {
        display: none;          /* 隐藏滚动条 */
    }

    .exp-modal-body {
        width: 94%;
        padding: 18px 18px 0;
    }

    .exp-modal-content {
        margin-right: -18px;
        padding-right: 16px;
    }

    /* 手机端浮动按钮缩小并贴近边缘；
       层级降到左侧导航(999)与侧栏遮罩(998)之下：展开左侧抽屉时按钮不浮在导航上 */
    .scroll-btns {
        right: 16px;
        bottom: 24px;
        gap: 10px;
        z-index: 997;
    }

    .scroll-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ============ 卡片右上角收藏图标（在日期右侧）============ */
.exp-tags-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;   /* 与收藏按钮同高，保证时间与图标严格垂直居中对齐 */
}

/* 时间与 22px 图标按钮同高同中线（只作用于卡片，弹层头部时间不受影响） */
.exp-tags-right .exp-time {
    line-height: 22px;
}

.exp-card-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    transform: translateY(-1px);   /* 收藏按钮相对原始位置下移 1px（原为上移 2px） */
}

.exp-card-fav .layui-icon {
    display: block;   /* 消除 inline 基线留白导致的图标下沉 */
    font-size: 15px;
    line-height: 1;
    color: #c9c9c9;
    transition: color 0.2s;
}

.exp-card-fav:hover .layui-icon { color: #d4a017; }

/* 已收藏：实心星，橙色高亮 */
.exp-card-fav.faved .layui-icon {
    color: #d4a017;
}

/* ============ 收藏提示（黑色 80% 透明胶囊，页面最底部）============
   底部居中浮层，距页面底部 20px，2.5s 后自动淡出 */
.exp-save-tip {
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 25px;
    opacity: 0;
    transform: translate(-50%, 8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.exp-save-tip .layui-icon { font-size: 14px; line-height: 1; }

.exp-save-tip.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 768px) {
    .exp-save-tip { bottom: 20px; }
}
