/* ========== 内容中心 详情页 ========== */

/* Hero */
.ct-hero {
    position: relative;
    height: 340px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ct-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 16, 9, 0.55), rgba(12, 16, 9, 0.3));
    pointer-events: none;
}

.ct-hero-text {
    position: relative;
    z-index: 2;
    padding: 0 40px;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.ct-hero-title {
    font-family: 'Ma Shan Zheng', 'Noto Sans SC', serif;
    font-size: 48px;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.ct-hero-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

/* 通用 section */
.ct-section {
    padding: 90px 0;
}

.ct-section-head {
    margin-bottom: 36px;
}

/* 标签筛选 */
.ct-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.ct-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-secondary);
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 1px;
}

.ct-filter-btn .ct-filter-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 1px 7px;
    border-radius: 999px;
    transition: all 0.3s;
}

.ct-filter-btn:hover {
    border-color: var(--lime-deep);
    color: var(--ink);
}

.ct-filter-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.ct-filter-btn.active .ct-filter-count {
    background: var(--lime);
    color: var(--ink);
}

/* Featured 大卡 */
.ct-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 56px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ct-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 50px rgba(20, 24, 15, 0.1);
}

.ct-featured-img {
    overflow: hidden;
    min-height: 320px;
}

.ct-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.ct-featured:hover .ct-featured-img img {
    transform: scale(1.04);
}

.ct-featured-body {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ct-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--lime-deep);
    margin-bottom: 14px;
}

.ct-featured-tag::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--lime-deep);
}

.ct-featured-body h3 {
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.ct-featured-excerpt {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.ct-featured-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.ct-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ct-featured-meta svg {
    width: 13px;
    height: 13px;
}

/* 文章列表网格 */
.ct-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.ct-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ct-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(20, 24, 15, 0.1);
}

.ct-card-img {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.ct-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.ct-card:hover .ct-card-img img {
    transform: scale(1.05);
}

.ct-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ct-card-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.ct-tag-guide {
    background: rgba(200, 245, 66, 0.18);
    color: var(--lime-deep);
}

.ct-tag-story {
    background: rgba(20, 24, 15, 0.08);
    color: var(--ink);
}

.ct-tag-brand {
    background: rgba(168, 214, 47, 0.16);
    color: #6f8a1e;
}

.ct-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.45;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.ct-card-excerpt {
    font-size: 13px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 18px;
    flex: 1;
}

.ct-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.ct-card-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ct-card-author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.ct-card-read {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ct-card-read svg {
    width: 13px;
    height: 13px;
}

/* CTA */
.ct-cta {
    background: var(--bg-dark);
    padding: 70px 0;
}

.ct-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.ct-cta-text h2 {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.ct-cta-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== 视频教学卡片 ========== */
.ct-card-video {
    cursor: pointer;
}

.ct-card-video .ct-card-img {
    position: relative;
}

.ct-play-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #fff;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(10, 14, 8, 0.62);
    backdrop-filter: blur(4px);
    -webkit-tap-highlight-color: transparent;
}

.ct-play-badge svg {
    width: 11px;
    height: 11px;
    color: var(--lime);
}

.ct-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 245, 66, 0.92);
    box-shadow: 0 8px 26px rgba(10, 14, 8, 0.35);
    transition: transform 0.3s, background 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.ct-play-btn svg {
    width: 24px;
    height: 24px;
    color: var(--ink);
    margin-left: 3px;
}

.ct-card-video:hover .ct-play-btn {
    transform: scale(1.12);
    background: var(--lime);
}

/* ========== 蝴蝶机视频教学 详情页 ========== */

/* Hero */
.bf-hero {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.bf-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bf-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 16, 9, 0.5) 0%, rgba(12, 16, 9, 0.35) 50%, rgba(12, 16, 9, 0.7) 100%);
    pointer-events: none;
}

.bf-hero-text {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;
}

.bf-hero-title {
    font-family: 'Ma Shan Zheng', 'Noto Sans SC', serif;
    font-size: 50px;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.bf-hero-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
}

/* 正文布局 */
.bf-section {
    padding: 80px 0;
}

.bf-inner {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

/* 视频 */
.bf-video-wrap {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(20, 24, 15, 0.18);
    background: #000;
}

.bf-video-wrap video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.bf-video-cap {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ========== 视频触发按钮（封面 + 播放图标） ========== */
.bf-video-trigger {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(20, 24, 15, 0.18);
    background: #000;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s;
}

.bf-video-trigger:active {
    transform: scale(0.99);
}

.bf-video-trigger img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bf-play-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 245, 66, 0.94);
    box-shadow: 0 10px 30px rgba(10, 14, 8, 0.45);
    transition: transform 0.3s, background 0.3s;
}

.bf-play-icon svg {
    width: 30px;
    height: 30px;
    color: var(--ink);
    margin-left: 4px;
}

.bf-video-trigger:hover .bf-play-icon {
    transform: scale(1.12);
    background: var(--lime);
}

.bf-play-label {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 6px 16px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(10, 14, 8, 0.6);
    border-radius: 999px;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
}

/* ========== 视频弹窗 ========== */
.bf-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bf-modal.open {
    display: flex;
}

.bf-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 6, 0.88);
    backdrop-filter: blur(4px);
    -webkit-tap-highlight-color: transparent;
}

.bf-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.bf-modal-dialog video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.bf-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.25s, transform 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.bf-modal-close svg {
    width: 18px;
    height: 18px;
}

.bf-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 弹窗内 video 原生全屏按钮在某些移动端会被遮挡，确保 controls 可见 */
.bf-modal-dialog video::-webkit-media-controls {
    z-index: 2;
}

@media (max-width: 768px) {
    .bf-modal-close {
        top: -42px;
        width: 34px;
        height: 34px;
    }

    .bf-play-icon {
        width: 60px;
        height: 60px;
    }

    .bf-play-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* 标题与列表 */
.bf-block-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 1px;
    margin: 52px 0 22px;
    padding-left: 14px;
    border-left: 4px solid var(--lime);
    line-height: 1.3;
}

.bf-main > .bf-block-title:first-child {
    margin-top: 40px;
}

.bf-steps {
    counter-reset: bfstep;
    display: flex;
    flex-direction: column;
    list-style: none;
    padding-left: 0;
}

.bf-steps li {
    position: relative;
    padding: 20px 0 20px 58px;
    border-bottom: 1px solid var(--border);
}

.bf-steps li:last-child {
    border-bottom: none;
}

.bf-steps li::before {
    counter-increment: bfstep;
    content: counter(bfstep);
    position: absolute;
    left: 0;
    top: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    background: var(--lime);
}

.bf-steps h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.bf-steps p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.bf-points {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bf-points li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.bf-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime-deep);
}

.bf-points strong {
    color: var(--text);
    font-weight: 700;
}

.bf-warn li::before {
    background: #e08a3c;
}

/* 侧边信息卡 */
.bf-side {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bf-side-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
}

.bf-side-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.bf-info-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 24px;
}

.bf-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.bf-info-list span {
    color: var(--text-muted);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.bf-info-list strong {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

.bf-side-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
    letter-spacing: 2px;
}

.bf-side-tip {
    background: rgba(200, 245, 66, 0.12);
    border: 1px solid rgba(168, 214, 47, 0.4);
    border-radius: 12px;
    padding: 22px 22px;
}

.bf-side-tip strong {
    display: block;
    font-size: 14px;
    color: var(--lime-deep);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.bf-side-tip p {
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 1024px) {
    .ct-section {
        padding: 70px 0;
    }

    .ct-featured {
        grid-template-columns: 1fr;
    }

    .ct-featured-img {
        min-height: 240px;
    }

    .ct-featured-body {
        padding: 28px 30px;
    }

    .ct-featured-body h3 {
        font-size: 22px;
    }

    .ct-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ct-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    /* 蝴蝶机详情页 */
    .bf-hero {
        height: 360px;
    }

    .bf-inner {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .bf-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .ct-hero {
        height: 240px;
    }

    .ct-hero-title {
        font-size: 36px;
    }

    .ct-section {
        padding: 56px 0;
    }

    .ct-filter {
        gap: 8px;
        margin-bottom: 32px;
    }

    .ct-filter-btn {
        padding: 7px 16px;
        font-size: 12px;
    }

    .ct-grid {
        grid-template-columns: 1fr;
    }

    .ct-cta-text h2 {
        font-size: 22px;
    }

    .ct-cta .btn-lime {
        width: 100%;
        justify-content: center;
    }

    /* 蝴蝶机详情页 */
    .bf-hero {
        height: 300px;
    }

    .bf-hero-title {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .bf-section {
        padding: 56px 0;
    }

    .bf-block-title {
        font-size: 22px;
        margin-top: 40px;
    }

    .bf-steps li {
        padding-left: 52px;
    }
}
