/* 主站首页精简布局与一键同款 */
#page-home .smart-workspace { max-width: 2100px; }
#page-home .sw-input-container {
    width: 100%; max-width: 1240px; height: 320px; padding: 18px 24px;
    border-radius: 20px; flex-shrink: 0; overflow: visible;
}
#page-home .sw-input-top textarea { min-height: 112px; font-size: 16px; }
#page-home .sw-toolbar { padding-top: 8px; }
#page-home .sw-dropdown-menu { max-height: 230px; overflow-y: auto; scrollbar-width: thin; }
#page-home .sw-model-list { max-height: 174px; overflow-y: auto; scrollbar-width: thin; }
#page-home .sw-send-btn-mobile { width: 42px; height: 42px; }
.sw-send-btn-mobile svg { width: 20px; height: 20px; display: block; }
.core-functions { width: 100%; margin: 44px auto 0; }
.core-functions-title,
.remake-section-title {
    display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
    color: #edf4ff; font-size: 20px; line-height: 1.4; font-weight: 400; letter-spacing: .3px;
}
.core-functions-title::before,
.remake-section-title::before {
    content: ''; width: 3px; height: 18px; border-radius: 4px;
    background: linear-gradient(180deg, #55dfff, #9c8cff);
}
.core-functions .quick-actions-container {
    margin-top: 0; gap: 54px; align-items: stretch; justify-content: center;
}
.core-functions .quick-card {
    flex: 0 0 calc(20.25% - 14.58px); width: calc(20.25% - 14.58px);
    height: auto; min-height: 0; border: 0; border-radius: 16px; justify-content: flex-start;
    background: #0a1628; background-size: 100% auto; background-position: top center;
}
.core-functions .quick-card-image {
    display: block; width: 100%; aspect-ratio: 16 / 9; height: auto;
    flex: 0 0 auto; object-fit: cover; background: #0a1628;
}
.core-functions .quick-card-title {
    position: static; flex: 0 0 36px; height: 36px; line-height: 36px;
    width: 100%; font-size: 18px; font-weight: 400;
    background: #0a1628; border-top: 0;
}

.remake-section { width: 100%; margin-top: 44px; padding-bottom: 36px; }
.remake-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.remake-section-note { margin: 0 0 20px; color: #8796ae; font-size: 12px; font-weight: 400; }
.remake-grid-wrap { width: 100%; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.remake-grid {
    display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 24px 18px; width: 100%; min-width: 1090px;
}
.remake-card {
    position: relative; min-width: 0; overflow: hidden; border: 0;
    border-radius: 12px; background: transparent; box-shadow: none;
}
.remake-media {
    position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden;
    border-radius: 12px; background: #080e1a; cursor: pointer;
}
.remake-media img,
.remake-media video { width: 100%; height: 100%; display: block; object-fit: cover; }
.remake-media::after {
    content: ''; position: absolute; inset: 56% 0 0; pointer-events: none;
    background: linear-gradient(transparent, rgba(3,8,17,.82));
}
.remake-type {
    position: absolute; z-index: 2; top: 10px; left: 10px; padding: 3px 7px;
    border-radius: 6px; background: rgba(5,10,20,.54); backdrop-filter: blur(8px);
    color: rgba(255,255,255,.85); font-size: 10px; line-height: 1.2; font-weight: 400;
}
.remake-name {
    position: absolute; z-index: 3; left: 11px; right: 11px; bottom: 12px;
    color: #fff; font-size: 13px; line-height: 1.4; font-weight: 400;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    text-shadow: 0 1px 5px rgba(0,0,0,.65); transition: bottom .2s;
    pointer-events: none;
}
.remake-card-action {
    position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 12px;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.remake-card.selected .remake-card-action { opacity: 1; visibility: visible; transform: translateY(0); }
.remake-card.selected .remake-name { bottom: 60px; }
@media (hover: hover) and (pointer: fine) {
    .remake-card:hover .remake-card-action { opacity: 1; visibility: visible; transform: translateY(0); }
    .remake-card:hover .remake-name { bottom: 60px; }
}
.remake-card-button {
    width: 100%; min-height: 38px; border: 0; border-radius: 8px;
    background: rgba(255,255,255,.94); color: #252932; cursor: pointer;
    font-size: 13px; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,.18); transition: .2s;
}
.remake-card-button:hover { background: #fff; color: #3563e9; }
.remake-back-top {
    position: fixed; z-index: 80; right: 26px; bottom: 26px; width: 44px; height: 44px;
    display: grid; place-items: center; border: 1px solid rgba(145,169,214,.25); border-radius: 50%;
    background: rgba(17,27,48,.9); color: #d7e5f7; cursor: pointer; opacity: 0; visibility: hidden;
    transform: translateY(8px); transition: .2s; backdrop-filter: blur(12px); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.remake-back-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.remake-back-top:hover { color: #55dfff; border-color: rgba(85,223,255,.55); }
.remake-back-top svg { width: 20px; height: 20px; }
[hidden] { display: none !important; }

/* 做同款弹窗：参考图为浅色双栏制作框 */
.remake-modal-overlay {
    position: fixed; z-index: 10050; inset: 0; display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(4,9,18,.62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.remake-modal-overlay.active { display: flex; }
.remake-modal {
    position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(330px,.92fr);
    width: min(850px, 96vw); height: min(720px,92vh); max-height: none; overflow: hidden;
    border: 1px solid rgba(255,255,255,.72); border-radius: 18px; background: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.38); color: #252b35;
}
.remake-modal-close {
    position: absolute; z-index: 5; right: 12px; top: 12px; width: 30px; height: 30px;
    border: 1px solid #e4e8ee; border-radius: 50%; background: #fff; color: #626c7b;
    box-shadow: 0 4px 14px rgba(0,0,0,.12); cursor: pointer; font-size: 20px; line-height: 1;
}
.remake-modal-preview { height: 100%; min-height: 0; background: #f2f4f7; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.remake-modal-preview img,
.remake-modal-preview video { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #eef1f5; }
.remake-preview-video { position: relative; width: 100%; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.remake-video-controls {
    position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px;
    display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
    background: rgba(8,12,18,.76); backdrop-filter: blur(10px); color: #fff;
    box-sizing: border-box;
}
.remake-video-controls button {
    flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px;
    background: transparent; color: #fff; cursor: pointer; font-size: 13px; line-height: 28px;
}
.remake-video-controls button:hover { background: rgba(255,255,255,.14); }
.remake-video-controls input[type="range"] { flex: 1; min-width: 40px; height: 4px; margin: 0; accent-color: #fff; cursor: pointer; }
.remake-video-time { flex: 0 0 auto; color: rgba(255,255,255,.9); font-size: 10px; line-height: 1; white-space: nowrap; }
.remake-preview-video:fullscreen { width: 100vw; height: 100vh; background: #000; }
.remake-preview-video:fullscreen video { max-height: 100vh; background: #000; }
.remake-modal-form { display: flex; flex-direction: column; min-height: 0; padding: 30px 26px 24px; overflow: hidden; }
.remake-modal-form h2 { flex: 0 0 auto; margin: 0 42px 22px 0; color: #20252d; font-size: 19px; line-height: 1.4; }
.remake-form-fields { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.remake-field { margin-bottom: 17px; }
.remake-field-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: #424a56; font-size: 12px; font-weight: 600; }
.remake-field-label small { color: #9aa3b1; font-weight: 400; }
.remake-upload {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 112px; padding: 14px; border: 1px dashed #d4dbe5; border-radius: 9px;
    background: #f8f9fb; color: #8b95a4; text-align: center; cursor: pointer; font-size: 12px;
}
.remake-upload:hover { border-color: #8aabf4; background: #f5f8ff; }
.remake-upload-icon { color: #7f8b9c; font-size: 23px; line-height: 1; }
.remake-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.remake-file-previews { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.remake-file-preview { position: relative; width: 48px; height: 48px; border-radius: 7px; overflow: hidden; border: 1px solid #e2e7ee; }
.remake-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.remake-select,
.remake-textarea {
    width: 100%; border: 1px solid #e0e5ec; border-radius: 8px; outline: none;
    background: #f8f9fb; color: #3b4350; font: inherit; font-size: 12px;
}
.remake-select { height: 38px; padding: 0 10px; }
.remake-auto-params {
    margin-top: 9px; color: #8a929e; font-size: 11px; line-height: 1.6;
}
#remakeImageAutoParams { margin: 0 0 17px; }
.remake-textarea { min-height: 102px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.remake-select:focus,
.remake-textarea:focus { border-color: #91acf0; background: #fff; }
.remake-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.remake-upload small { color: #a0a8b4; font-size: 10px; line-height: 1.5; font-weight: 400; }
.remake-submit {
    flex: 0 0 auto; width: 100%; min-height: 43px; margin-top: 14px; border: 0; border-radius: 8px;
    background: #20242b; color: #fff; cursor: pointer; font-size: 13px; font-weight: 500; transition: .2s;
}
.remake-submit:hover { background: #3563e9; }
.remake-submit:disabled { opacity: .58; cursor: wait; }
.remake-cost { flex: 0 0 auto; margin-top: 8px; color: #8a929e; font-size: 11px; line-height: 1.5; text-align: center; }
.remake-form-status { flex: 0 0 auto; min-height: 20px; margin-top: 8px; color: #6f7988; font-size: 12px; line-height: 1.6; text-align: center; }
.remake-form-status.success { color: #188a59; }
.remake-form-status.error { color: #cf4e56; }
body.remake-modal-open { overflow: hidden !important; }

@media (max-width: 1100px) {
    .remake-grid { grid-template-columns: repeat(7, minmax(140px, 1fr)); min-width: 1090px; }
}
@media (max-width: 768px) {
    #page-home .sw-input-container { height: auto !important; min-height: 250px !important; padding: 16px !important; }
    #page-home .sw-input-top textarea { min-height: 112px !important; }
    .core-functions { margin-top: 36px; }
    .core-functions .quick-actions-container { flex-wrap: wrap !important; gap: 16px; }
    .core-functions .quick-card {
        flex: 0 0 calc(50% - 8px); width: calc(50% - 8px); height: auto !important;
    }
    .core-functions-title, .remake-section-title { font-size: 17px; }
    .remake-section { margin-top: 40px; }
    .remake-grid { grid-template-columns: repeat(7, 140px); min-width: 1090px; gap: 18px 12px; }
    .remake-back-top { right: 16px; bottom: 16px; }
    .remake-modal-overlay { padding: 14px; }
    .remake-modal { grid-template-columns: 1fr; height: auto; max-height: 94vh; overflow-y: auto; }
    .remake-modal-preview { min-height: 230px; height: 34vh; }
    .remake-preview-video { min-height: 230px; height: 34vh; }
    .remake-modal-preview img, .remake-modal-preview video { max-height: 34vh; }
    .remake-video-controls { left: 8px; right: 8px; bottom: 8px; gap: 4px; }
    .remake-video-time { display: none; }
    .remake-modal-form { overflow: visible; padding: 22px 18px 18px; }
    .remake-form-fields { flex: 0 0 auto; overflow: visible; padding-right: 0; }
    .remake-modal-close { right: 8px; top: 8px; }
}
