.tcm-detail {
    min-height: 100vh;
    background: #f5f1e6;
    position: relative;
    background-image: radial-gradient(circle at 20% 80%, rgba(139, 69, 19, .05) 0, transparent 50%), radial-gradient(circle at 80% 20%, rgba(139, 69, 19, .05) 0, transparent 50%)
}

.tcm-detail .page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none
}

.tcm-detail.has-bg-image {
    background: transparent
}

.tcm-detail.has-bg-image>:not(.page-bg) {
    position: relative;
    z-index: 1
}

.detail-header-section {
    background: linear-gradient(135deg, sienna, #8b4513 25%, peru 50%, sienna 75%, #8b4513);
    padding: 48px 32px 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(139, 69, 19, .25)
}

.tcm-detail.has-bg-image .detail-header-section {
    background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .2) 60%, transparent);
    box-shadow: none
}

.tcm-detail.has-bg-image .detail-header-section:after,
.tcm-detail.has-bg-image .detail-header-section:before {
    display: none
}

.detail-header-section:before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 248, 220, .15) 0, transparent 50%), radial-gradient(circle at 70% 70%, rgba(255, 248, 220, .08) 0, transparent 50%);
    border-radius: 50%;
    animation: rotate-599f95ff 30s linear infinite
}

.detail-header-section:after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 50% 50%, hsla(0, 0%, 100%, .1) 0, transparent 60%), radial-gradient(circle at 30% 70%, hsla(0, 0%, 100%, .08) 0, transparent 50%);
    border-radius: 50%;
    animation: rotate-599f95ff 25s linear infinite reverse
}

@keyframes rotate-599f95ff {
    0% {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(1turn)
    }
}

@keyframes float-599f95ff {

    0%,
    to {
        transform: translate(0) scale(1)
    }

    50% {
        transform: translate(20px, -20px) scale(1.05)
    }
}

.tcm-decoration-pattern {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 200px;
    height: 200px;
    opacity: .1;
    z-index: 1
}

.tcm-decoration-pattern:before {
    content: "☯";
    position: absolute;
    font-size: 150px;
    color: hsla(0, 0%, 100%, .3);
    transform: rotate(-15deg)
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2
}

.back-btn {
    background: hsla(0, 0%, 100%, .15);
    border: 1px solid rgba(255, 248, 220, .5);
    color: #fff8dc;
    margin-bottom: 24px;
    border-radius: 8px;
    transition: all .3s;
    font-weight: 500;
    letter-spacing: 1px
}

.back-btn:hover {
    background: rgba(255, 248, 220, .25);
    border-color: #fff8dc;
    color: #fff;
    transform: translateX(-4px)
}

.header-info {
    padding-left: 8px
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px
}

.breadcrumb-item {
    color: rgba(255, 248, 220, .9);
    font-size: 14px;
    cursor: pointer;
    transition: all .3s;
    letter-spacing: .5px
}

.breadcrumb-item:hover {
    color: #fff8dc
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: 500
}

.breadcrumb i {
    color: rgba(255, 248, 220, .7);
    font-size: 12px;
    transform: rotate(180deg);
}

.page-title {
    font-size: 38px;
    color: #fff;
    margin: 0 0 12px 0;
    font-weight: 700;
    text-shadow: 0 2px 15px rgba(0, 0, 0, .2);
    letter-spacing: 3px;
    font-family: Microsoft YaHei, STKaiti, KaiTi, serif
}

.page-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #fff8dc, transparent);
    margin-top: 16px;
    border-radius: 2px
}

.page-desc {
    font-size: 16px;
    color: rgba(255, 248, 220, .95);
    margin: 0;
    max-width: 700px;
    line-height: 1.8;
    letter-spacing: 1px
}

.detail-content {
    max-width: 1200px;
    margin: -60px auto 0;
    padding: 0 24px 48px;
    position: relative;
    z-index: 3
}

.children-card,
.desc-card,
.info-card,
.media-card {
    border-radius: 16px;
    border: 2px solid rgba(139, 69, 19, .15);
    margin-bottom: 28px;
    background: linear-gradient(145deg, #fff, #faf7f0);
    box-shadow: 0 8px 24px rgba(139, 69, 19, .08), 0 2px 8px rgba(139, 69, 19, .04);
    transition: all .3s
}

.children-card:hover,
.desc-card:hover,
.info-card:hover,
.media-card:hover {
    box-shadow: 0 12px 36px rgba(139, 69, 19, .12), 0 4px 12px rgba(139, 69, 19, .08);
    border-color: rgba(160, 82, 45, .3);
    transform: translateY(-4px)
}

.children-card:before,
.desc-card:before,
.info-card:before,
.media-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, sienna, peru, sienna);
    border-radius: 16px 16px 0 0
}

.card-header {
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    color: #8b4513;
    letter-spacing: 1px;
    padding: 8px 0;
    border-bottom: 2px solid rgba(139, 69, 19, .1);
    margin-bottom: 8px;
    padding-bottom: 16px
}

.card-header,
.header-right {
    display: flex;
    align-items: center
}

.header-icon {
    font-size: 26px !important;
    color: sienna;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(160, 82, 45, .2));
    font-weight: normal;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px
}

.count-tag {
    margin-left: 10px
}

.info-list {
    padding: 16px 0
}

.info-item {
    padding: 20px 0;
    border-bottom: 1px dashed rgba(139, 69, 19, .15);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.info-item:last-child {
    border-bottom: none
}

.info-label {
    font-size: 15px;
    color: #8b4513;
    font-weight: 500;
    letter-spacing: 1px;
    flex-shrink: 0;
    margin-right: 20px
}

.info-label:before {
    content: "◆";
    color: peru;
    margin-right: 8px;
    font-size: 10px
}

.info-value {
    font-size: 15px;
    color: #5c3317;
    font-weight: 500;
    text-align: right;
    flex: 1
}

.desc-content {
    padding: 16px 0
}

.desc-text {
    font-size: 16px;
    color: #5c3317;
    line-height: 2;
    margin-bottom: 24px;
    letter-spacing: .5px;
    text-indent: 2em;
    font-family: Microsoft YaHei, STKaiti, KaiTi, serif
}

.tags-wrapper {
    padding-top: 20px;
    border-top: 2px dashed rgba(139, 69, 19, .15)
}

.detail-tag {
    font-weight: 500;
    letter-spacing: 1px
}

.children-section {
    margin-top: 28px
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 16px 0
}

.child-item {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #faf7f0, #fff);
    border-radius: 12px;
    cursor: pointer;
    transition: all .3s;
    border: 2px solid rgba(139, 69, 19, .1);
    position: relative;
    overflow: hidden
}

.child-item:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, peru, sienna);
    transform: scaleX(0);
    transition: transform .3s
}

.child-item:hover:before {
    transform: scaleX(1)
}

.child-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(139, 69, 19, .15), 0 4px 12px rgba(139, 69, 19, .1);
    border-color: rgba(160, 82, 45, .3)
}

.child-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1), inset 0 1px 3px hsla(0, 0%, 100%, .3);
    transition: all .3s;
    position: relative;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat
}

.child-icon-wrapper:after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(205, 133, 63, .3), transparent);
    opacity: 0;
    transition: opacity .3s
}

.child-item:hover .child-icon-wrapper:after {
    opacity: 1
}

.child-icon {
    font-size: 26px;
    color: #fff
}

.child-icon-img {
    width: 44px;
    height: 44px;
    -o-object-fit: contain;
    object-fit: contain
}

.child-info {
    flex: 1;
    min-width: 0
}

.child-name {
    font-size: 16px;
    font-weight: 600;
    color: #8b4513;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
    font-family: Microsoft YaHei, STKaiti, KaiTi, serif
}

.child-code {
    font-size: 13px;
    color: sienna;
    letter-spacing: .5px
}

.child-arrow {
    color: peru;
    transition: all .3s;
    font-size: 18px
}

.child-arrow i {
    font-weight: 700;
    transform: rotate(180deg);
    display: block;
}

.child-item:hover .child-arrow {
    color: sienna;
    transform: translateX(6px)
}

.cover-section {
    margin-bottom: 24px;
    padding: 8px;
    background: rgba(139, 69, 19, .04);
    border-radius: 12px
}

.detail-cover {
    width: 100%;
    max-height: 320px;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(139, 69, 19, .15)
}

.media-content {
    padding: 16px 0
}

.video-section {
    margin-bottom: 32px
}

.media-title {
    font-size: 18px;
    font-weight: 600;
    color: #8b4513;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
    font-family: Microsoft YaHei, STKaiti, KaiTi, serif
}

.media-title i {
    color: sienna;
    font-size: 20px
}

.detail-video {
    width: 100%;
    max-height: 450px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(139, 69, 19, .15)
}

.images-section {
    margin-top: 16px
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px
}

.image-item {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all .3s;
    border: 3px solid rgba(139, 69, 19, .1)
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(139, 69, 19, .2), 0 4px 12px rgba(139, 69, 19, .15);
    border-color: peru
}

/* 遮罩弹窗层 */
.img-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 关闭按钮 */
.mask-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    background: #6b6b6b9e;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
}

/* 底部工具栏 */
.tool-bar {
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: 282px;
    height: 44px;
    padding: 0 23px;
    background-color: #606266b0;
    border-color: #fff;
    border-radius: 22px;
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.tool-bar button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    color: #fff;
}

.tool-bar button:nth-child(1),
.tool-bar button:nth-child(2),
.tool-bar button:nth-child(5) {
    font-size: 20px;
}

/* 预览图片容器（拖拽+变换） */
.img-wrap {
    max-width: 100%;
    max-height: 100%;
    cursor: grab;
}

.img-wrap:active {
    cursor: grabbing
}

.preview-pic {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.1s;
}

.grid-image {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 69, 19, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s
}

.image-item:hover .image-overlay {
    opacity: 1
}

.image-overlay i {
    font-size: 36px;
    color: #fff8dc
}

@media (max-width:768px) {
    .page-title {
        font-size: 30px
    }

    .children-grid {
        grid-template-columns: 1fr
    }

    .images-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}