/**
 * 智能体详情页：爆款复刻模板
 * 仅调整模板布局，字段、生成与作品逻辑均复用默认模板。
 */

/* PC */
body.dh-template-viral-remix {
    background: #08090b;
}

.dh-template-viral-remix .single-links-2-page {
    background: #08090b;
}

.dh-template-viral-remix .sl2-wrapper {
    background: #08090b;
}

.dh-template-viral-remix .sl2-form-section {
    width: 456px !important;
    min-width: 456px !important;
    max-width: 456px !important;
    flex-basis: 456px !important;
    background: #111214;
    border-right-color: rgba(255, 255, 255, 0.08);
}

.dh-template-viral-remix .sl2-tab-container {
    display: none;
}

.dh-template-viral-remix .sl2-model-selector {
    margin: 10px 12px 12px;
    padding: 0;
}

.dh-template-viral-remix .sl2-model-current {
    min-height: 48px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 7px;
    background: #161719;
}

.dh-template-viral-remix .sl2-model-dropdown {
    z-index: 120;
}

.dh-template-viral-remix .sl2-form-content {
    padding: 2px 12px 22px;
}

.dh-template-viral-remix .sl2-cmd-panel {
    display: flex;
    flex-direction: column;
}

.dh-template-viral-remix .sl2-reference-video-group { order: 1; }
.dh-template-viral-remix .sl2-work-media-group { order: 2; }
.dh-template-viral-remix .sl2-work-prompt-group { order: 3; }
.dh-template-viral-remix .sl2-reference-audio-group { order: 4; }
.dh-template-viral-remix .sl2-cmd-panel > .sl2-adv-trigger,
.dh-template-viral-remix .sl2-cmd-panel > .sl2-adv-popup,
.dh-template-viral-remix .sl2-cmd-panel > .sl2-popup-mask { order: 20; }

.dh-template-viral-remix .sl2-form-group {
    margin-bottom: 14px;
}

.dh-template-viral-remix .sl2-form-label {
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 500;
}

.dh-template-viral-remix .dh-viral-work-card {
    min-height: 258px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 5px;
    background: #151618;
}

.dh-template-viral-remix .dh-viral-work-card .sl2-multi-img-area {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dh-template-viral-remix .dh-viral-work-card .sl2-add-img-btn {
    display: flex;
    flex: 0 0 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px !important;
    height: 52px !important;
    border: 1px dashed rgba(255, 255, 255, 0.22) !important;
    border-radius: 3px !important;
    background: #1a1b1e;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 11px !important;
    cursor: pointer;
}

.dh-template-viral-remix .dh-viral-add-symbol {
    display: block;
    margin-bottom: 2px;
    font-size: 19px;
    font-weight: 300;
    line-height: 16px;
}

.dh-template-viral-remix .dh-viral-work-card .sl2-img-thumb {
    width: 52px !important;
    height: 52px !important;
    border-radius: 3px !important;
}

.dh-template-viral-remix .dh-viral-work-prompt {
    position: relative;
    margin-top: 6px;
}

.dh-template-viral-remix .dh-viral-work-prompt .sl2-textarea {
    min-height: 170px !important;
    height: 170px;
    padding: 8px 0 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    line-height: 20px;
    resize: none;
}

.dh-template-viral-remix .dh-viral-work-prompt .sl2-char-count {
    display: none;
}

.dh-template-viral-remix .sl2-add-img-btn:hover,
.dh-template-viral-remix .dh-viral-upload-tile:hover {
    border-color: rgba(116, 255, 82, 0.65) !important;
}

.dh-template-viral-remix .sl2-form-submit {
    padding: 12px 18px 16px;
    background: #111214;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.dh-template-viral-remix .sl2-form-submit.v2-layout .sl2-submit-btn {
    min-width: 132px;
    background: #74ff52;
}

.dh-template-viral-remix .sl2-chat-section {
    background:
        radial-gradient(circle at 50% 38%, rgba(116, 255, 82, 0.035), transparent 34%),
        #08090b;
}

.dh-template-viral-remix .sl2-header-bar,
.dh-template-viral-remix .sl2-right-tabs {
    background: rgba(8, 9, 11, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

/* PC / Mobile 共用的视频上传卡片 */
.dh-template-viral-remix .dh-viral-video-card {
    width: 100%;
    min-height: 190px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 5px;
    background: #151618;
}

.dh-template-viral-remix .dh-viral-video-card .sl2-file-preview,
.dh-template-viral-remix .dh-viral-video-card .sl2-media-wrap {
    width: 100%;
}

.dh-template-viral-remix .dh-viral-video-card .sl2-file-preview {
    margin: 0;
}

.dh-template-viral-remix .dh-viral-video-card .sl2-file-preview video,
.dh-template-viral-remix .dh-viral-video-preview-wrap video {
    display: block;
    width: 100%;
    height: 174px;
    border-radius: 5px;
    background: #08090b;
    object-fit: contain;
}

.dh-template-viral-remix .dh-viral-video-preview-wrap {
    position: relative;
    width: 100%;
}

.dh-template-viral-remix .dh-viral-video-drop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    cursor: pointer;
}

.dh-template-viral-remix .dh-viral-video-drop:hover .dh-viral-upload-tile {
    border-color: rgba(116, 255, 82, 0.65);
}

.dh-template-viral-remix .dh-viral-upload-tile {
    display: flex;
    flex: 0 0 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    background: #1a1b1e;
    color: rgba(255, 255, 255, 0.72);
}

.dh-template-viral-remix .dh-viral-upload-tile b {
    font-size: 19px;
    font-weight: 300;
    line-height: 16px;
}

.dh-template-viral-remix .dh-viral-upload-tile em {
    margin-top: 2px;
    font-size: 11px;
    font-style: normal;
}

.dh-template-viral-remix .dh-viral-video-url {
    display: block;
    width: 100%;
    min-height: 112px;
    height: 112px;
    margin-top: 6px;
    padding: 8px 0 6px;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    line-height: 20px;
    resize: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: hidden;
}

.dh-template-viral-remix .dh-viral-video-url::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.dh-template-viral-remix .dh-viral-video-url:focus {
    background: transparent;
}

/* Mobile */
body.single-links-mobile.dh-template-viral-remix {
    background: #070709;
}

.single-links-mobile.dh-template-viral-remix .m-detail-page {
    min-height: 100dvh;
    padding-top: 50px;
    padding-bottom: calc(56px + env(safe-area-inset-bottom) + 112px) !important;
    background: #070709;
}

.single-links-mobile.dh-template-viral-remix .m-detail-header {
    background: rgba(13, 14, 16, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.single-links-mobile.dh-template-viral-remix .m-model-selector {
    padding: 9px 12px 10px;
}

.single-links-mobile.dh-template-viral-remix .m-model-current {
    min-height: 46px;
    padding: 8px 11px;
    border-radius: 7px;
    background: #151619;
}

.single-links-mobile.dh-template-viral-remix .m-detail-form {
    display: flex;
    flex-direction: column;
    padding: 0 12px 24px;
}

.single-links-mobile.dh-template-viral-remix .m-reference-video-group { order: 1; }
.single-links-mobile.dh-template-viral-remix .m-work-media-group { order: 2; }
.single-links-mobile.dh-template-viral-remix .m-work-prompt-group { order: 3; }
.single-links-mobile.dh-template-viral-remix .m-reference-audio-group { order: 4; }
.single-links-mobile.dh-template-viral-remix .m-detail-form > .m-adv-wrap { order: 20; }

.single-links-mobile.dh-template-viral-remix .m-detail-field {
    margin-bottom: 14px;
}

.single-links-mobile.dh-template-viral-remix .m-detail-field-header {
    margin-bottom: 7px;
}

.single-links-mobile.dh-template-viral-remix .m-detail-field-label {
    font-size: 12px;
    font-weight: 500;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-video-card {
    min-height: 107px;
    padding: 8px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-video-preview-wrap video {
    height: 150px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-video-drop {
    width: 48px;
    min-height: 48px;
    padding: 0;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-video-drop .dh-viral-upload-tile {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-card {
    min-height: 107px;
    padding: 8px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-card .m-multi-img-area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-card .m-add-img-btn {
    display: flex;
    flex: 0 0 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border: 1px dashed rgba(255, 255, 255, 0.22) !important;
    border-radius: 3px !important;
    background: #1a1b1e;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 10px !important;
    cursor: pointer;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-card .m-img-thumb {
    width: 48px !important;
    height: 48px !important;
    border-radius: 3px !important;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-prompt {
    margin-top: 5px;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-work-prompt .m-detail-textarea {
    display: block;
    width: 100%;
    min-height: 34px !important;
    height: 34px;
    padding: 7px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    line-height: 20px;
    resize: none;
}

.single-links-mobile.dh-template-viral-remix .dh-viral-video-url {
    min-height: 34px;
    height: 34px;
    margin-top: 5px;
    padding: 7px 0;
    font-size: 11px;
}

.single-links-mobile.dh-template-viral-remix .m-chat-area {
    min-height: 32vh;
    padding: 0 14px 18px;
}

.single-links-mobile.dh-template-viral-remix .m-detail-quick {
    position: static !important;
    padding: 0 14px 14px !important;
    border-top: 0 !important;
    background: transparent !important;
}

.single-links-mobile.dh-template-viral-remix .m-detail-actions-bar {
    padding: 8px 14px 10px !important;
    background: rgba(7, 7, 9, 0.97) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.single-links-mobile.dh-template-viral-remix .m-detail-actions-bar.m-v2-bar {
    gap: 8px;
}

.single-links-mobile.dh-template-viral-remix .m-detail-actions-bar.m-v2-bar .m-detail-submit {
    height: 40px;
    border-radius: 20px;
}

@media (max-width: 1024px) {
    body.dh-template-viral-remix .sl2-form-section {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}
