Files
hexin-codex-bot 7e7e26d869
Verify and deploy production / verify-and-deploy (push) Successful in 2m50s
ui: center canvas and refine project layout
2026-10-05 15:36:39 +08:00

162 lines
16 KiB
CSS

:root { color-scheme: light; --red: #ff2442; --red-deep: #e91436; --ink: #18181b; --muted: #85858d; --line: #e8e8eb; --soft: #f5f5f7; }
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1024px; min-height: 100%; background: #f6f6f7; color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* Kling-inspired project home */
.kling-shell { min-height: 100vh; background: #f6f6f7; }
.kling-sidebar { position: fixed; z-index: 15; left: 0; top: 0; bottom: 0; width: 76px; display: flex; flex-direction: column; align-items: center; padding: 15px 7px 10px; background: #fff; border-right: 1px solid #e8e8ea; }
.kling-logo { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 18px; border: 2px solid var(--red); border-radius: 13px 13px 13px 5px; color: var(--red); font-size: 17px; font-weight: 900; transform: rotate(-8deg); }
.kling-sidebar nav, .side-footer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.kling-sidebar nav > i { width: 36px; height: 1px; margin: 3px 0; background: #ececef; }
.side-item { width: 62px; min-height: 55px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; background: transparent; color: #74747c; font-size: 10px; }
.side-item.active { background: #fff0f2; color: var(--red); }
.side-item:hover { background: #f4f4f6; }
.side-footer { margin-top: auto; }
.side-avatar { width: 30px; height: 30px; display: grid; place-items: center; margin-top: 7px; border-radius: 50%; background: #34343a; color: #fff; font-size: 10px; }
.kling-main { min-height: 100vh; margin-left: 76px; padding: 17px 24px 48px; background: #f6f6f7; }
.tool-heroes { display: grid; grid-template-columns: 1.22fr .85fr .85fr; gap: 14px; max-width: 1500px; margin: 0 auto; }
.hero-card { position: relative; height: 158px; overflow: hidden; border: 1px solid #e7e7ea; border-radius: 15px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.hero-card > div:first-child { position: relative; z-index: 2; padding: 40px 20px; }
.hero-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.hero-card h2 > svg:last-child { margin-left: 2px; }
.hero-card p { margin: 0; color: #777780; font-size: 13px; }
.primary-hero { background: linear-gradient(115deg, #fff 0 44%, #fff3f5 66%, #ffd7de); }
.primary-hero h2 b { color: var(--red); font-size: 25px; }
.new-badge { position: absolute; top: 0; right: 0; padding: 4px 11px; border-radius: 0 0 0 10px; background: var(--red); color: white; font-size: 10px; font-weight: 700; }
.hero-wave { position: absolute; inset: 0 0 0 42%; transform: rotate(-8deg); }
.hero-wave i { position: absolute; left: -10%; width: 130%; height: 32px; border-radius: 50%; filter: blur(3px); }
.hero-wave i:nth-child(1) { top: 34px; background: linear-gradient(90deg, transparent, #ffbbc6, #ff2442); transform: rotate(-8deg); }
.hero-wave i:nth-child(2) { top: 76px; background: linear-gradient(90deg, transparent, #ffd4da, #ff7b91); transform: rotate(8deg); }
.hero-wave i:nth-child(3) { top: 116px; background: linear-gradient(90deg, transparent, #ffe8ec, #ffb5c1); transform: rotate(-5deg); }
.image-hero { background: linear-gradient(145deg, #fff, #fafafa 58%, #f1f1f3); }
.batch-hero { background: linear-gradient(135deg, #fff, #f7f7f8 70%, #ffe9ed); }
.stacked-pictures { position: absolute; right: 18px; bottom: -22px; width: 114px; height: 92px; }
.stacked-pictures i { position: absolute; width: 60px; height: 74px; border: 4px solid #fff; border-radius: 5px; background: linear-gradient(150deg, #ff8ca0, #f0d2b8 55%, #777); box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.stacked-pictures i:nth-child(1) { left: 0; top: 12px; transform: rotate(-13deg); }
.stacked-pictures i:nth-child(2) { left: 30px; top: 3px; transform: rotate(4deg); background: linear-gradient(140deg, #ddd, #ff647e); }
.stacked-pictures i:nth-child(3) { right: 0; top: 16px; transform: rotate(13deg); background: linear-gradient(150deg, #333, #ffbd70); }
.batch-art i { position: absolute; right: 22px; bottom: -15px; width: 78px; height: 104px; border-radius: 8px; background: linear-gradient(160deg, #2b2b2f, #f1f1f1); transform: rotate(8deg); }
.batch-art i:last-child { right: -8px; bottom: -3px; background: linear-gradient(150deg, #ff2442, #ff9aaa); transform: rotate(-8deg); }
.quick-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 1500px; margin: 12px auto 0; }
.quick-tool { height: 79px; display: grid; grid-template-columns: 32px 1fr 20px; align-items: center; gap: 8px; padding: 0 18px; border: 1px solid #e7e7ea; border-radius: 13px; background: #fff; color: #34343a; text-align: left; }
.quick-tool > svg:first-child { color: var(--red); }
.quick-tool div { display: flex; flex-direction: column; gap: 5px; }
.quick-tool strong { font-size: 14px; }
.quick-tool small { color: #96969d; font-size: 11px; white-space: nowrap; }
.quick-tool > svg:last-child { color: #999; transition: transform .2s; }
.quick-tool:hover { border-color: #ffc6cf; box-shadow: 0 8px 24px rgba(255,36,66,.08); }
.quick-tool:hover > svg:last-child { transform: translateX(3px); }
.project-feed { max-width: 1500px; margin: 57px auto 0; }
.project-toolbar { display: flex; align-items: center; gap: 14px; }
.feed-tabs { display: flex; padding: 3px; border: 1px solid #e0e0e3; border-radius: 9px; background: #fff; }
.feed-tabs button { height: 30px; padding: 0 17px; border-radius: 6px; background: transparent; color: #77777f; font-size: 13px; }
.feed-tabs button.active { background: #efeff1; color: #202024; font-weight: 600; }
.project-toolbar > i { width: 1px; height: 27px; background: #dedee2; }
.project-search { width: 380px; height: 37px; display: flex; align-items: center; margin-left: 8px; border: 1px solid #dcdce0; border-radius: 9px; background: #fff; }
.project-search input { flex: 1; min-width: 0; height: 100%; padding: 0 13px; border: 0; outline: 0; background: transparent; color: #333; }
.project-search svg { margin: 0 12px; color: #999; }
.create-project-button { height: 38px; margin-left: auto; padding: 0 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.project-categories { display: flex; gap: 29px; margin: 13px 0 18px; }
.project-categories button { padding: 0; background: transparent; color: #696971; font-size: 13px; }
.project-categories button.active { color: var(--red); font-weight: 700; }
.project-masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-items: start; gap: 15px 10px; }
.project-tile { display: block; min-width: 0; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #e9e9ec; transition: transform .18s, box-shadow .18s; }
.project-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.09); }
.project-cover { position: relative; min-height: 160px; max-height: 345px; overflow: hidden; background: linear-gradient(140deg, #ececef, #dddde1); }
.project-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.project-cover span { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 10px; background: rgba(20,20,22,.68); color: #fff; font-size: 10px; }
.project-caption { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 12px; }
.project-caption strong { overflow: hidden; color: #2d2d32; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-caption small { color: #9b9ba2; font-size: 10px; }
.project-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #dddde1; border-radius: 15px; background: #fff; }
.empty-art { position: relative; width: 130px; height: 90px; margin-bottom: 19px; }
.empty-art span { position: absolute; width: 64px; height: 78px; border: 4px solid #fff; border-radius: 7px; background: linear-gradient(145deg, #ffe0e5, #ff657e); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.empty-art span:nth-child(1) { left: 8px; top: 8px; transform: rotate(-12deg); }
.empty-art span:nth-child(2) { left: 34px; top: 0; background: linear-gradient(145deg, #f1f1f3, #b8b8bf); }
.empty-art span:nth-child(3) { right: 4px; top: 10px; transform: rotate(12deg); background: linear-gradient(145deg, #ff97a8, #ff2442); }
.project-empty h3 { margin: 0 0 7px; font-size: 16px; }
.project-empty p { margin: 0 0 17px; color: #929299; font-size: 12px; }
.project-empty button { height: 37px; padding: 0 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; }
.upload-overlay { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(5px); }
.upload-spinner, .editor-spinner { width: 35px; height: 35px; border: 3px solid #ffd2d9; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.upload-overlay strong { font-size: 15px; }
.upload-overlay small { color: #999; }
.dashboard-toast { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid #e3e3e6; border-radius: 10px; background: #fff; box-shadow: 0 12px 35px rgba(0,0,0,.12); font-size: 12px; }
.dashboard-toast button { background: transparent; color: #999; }
/* Image project editor */
.image-editor-shell { position: relative; height: 100vh; min-width: 980px; overflow: hidden; display: grid; grid-template-rows: 56px 1fr; background: #ededf0; }
.editor-topbar { grid-row: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 0 14px; border-bottom: 1px solid #e1e1e4; background: #fff; }
.editor-brand { display: flex; align-items: center; min-width: 0; gap: 9px; }
.editor-back { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: #555; }
.editor-back:hover { background: #f0f0f2; }
.editor-logo { padding: 5px 9px; border-radius: 13px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.editor-brand i { width: 1px; height: 20px; background: #ddd; }
.editor-brand input { width: min(330px, 36vw); border: 0; outline: 0; color: #222; font-weight: 600; }
.editor-status { display: flex; align-items: center; gap: 7px; color: #8a8a91; font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #55b36a; }
.editor-actions { display: flex; justify-content: flex-end; gap: 9px; }
.ghost-control, .save-control { height: 34px; padding: 0 14px; border-radius: 8px; font-size: 12px; }
.ghost-control { border: 1px solid #dddde1; background: #fff; color: #45454a; }
.save-control { background: var(--red); color: #fff; font-weight: 600; }
.save-control:disabled { opacity: .55; }
.editor-workspace { position: relative; grid-row: 2; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) 126px; overflow: hidden; background: #e9e9ec; }
.canvas-viewport { min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 26px 320px 22px 40px; background-image: radial-gradient(#d0d0d4 .7px, transparent .7px); background-size: 16px 16px; }
.canvas-page { position: relative; height: min(68vh, 680px); max-width: 84%; aspect-ratio: var(--canvas-ratio); overflow: hidden; box-shadow: 0 16px 50px rgba(20,20,24,.2); touch-action: none; user-select: none; }
.canvas-page > img { width: 100%; height: 100%; display: block; transform-origin: center; pointer-events: none; }
.canvas-selection { position: absolute; inset: 0; border: 1px solid rgba(255,36,66,.75); pointer-events: none; }
.handle { position: absolute; width: 7px; height: 7px; border: 1px solid var(--red); background: #fff; }
.handle.nw { left: -4px; top: -4px; }.handle.ne { right: -4px; top: -4px; }.handle.sw { left: -4px; bottom: -4px; }.handle.se { right: -4px; bottom: -4px; }
.editor-carousel { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 13px; padding-right: 300px; border-top: 1px solid rgba(210,210,214,.8); background: rgba(248,248,249,.92); backdrop-filter: blur(14px); }
.carousel-track { height: 112px; display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 390px; perspective: 700px; }
.carousel-slide { position: relative; width: 57px; height: 73px; flex: 0 0 auto; padding: 3px; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: #fff; box-shadow: 0 6px 17px rgba(0,0,0,.13); transition: transform .2s, opacity .2s; }
.carousel-slide img { width: 100%; height: 100%; display: block; border-radius: 4px; object-fit: cover; }
.carousel-slide span { position: absolute; left: 5px; bottom: 5px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; background: rgba(20,20,22,.7); color: #fff; font-size: 8px; }
.carousel-slide.active { width: 79px; height: 98px; z-index: 3; border-color: var(--red); transform: translateY(-5px); }
.carousel-slide.left { transform: rotateY(18deg) rotate(-5deg) scale(.9); transform-origin: right center; }
.carousel-slide.right { transform: rotateY(-18deg) rotate(5deg) scale(.9); transform-origin: left center; }
.carousel-slide.far { opacity: .48; transform: scale(.72); }
.carousel-arrow { width: 31px; height: 31px; border-radius: 50%; background: #fff; color: #555; box-shadow: 0 4px 14px rgba(0,0,0,.1); font-size: 20px; }
.carousel-arrow:disabled { opacity: .3; }
.carousel-add { width: 48px; height: 64px; flex: 0 0 auto; border: 1px dashed #bbb; border-radius: 8px; background: rgba(255,255,255,.45); color: #888; }
.editor-inspector { position: absolute; z-index: 8; top: 76px; right: 18px; bottom: 22px; width: 286px; overflow-y: auto; border: 1px solid rgba(215,215,219,.95); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 16px 45px rgba(25,25,30,.16); backdrop-filter: blur(16px); }
.inspector-tabs { height: 44px; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #e5e5e8; }
.inspector-tabs button { position: relative; background: transparent; color: #929298; font-size: 12px; }
.inspector-tabs button.active { color: #26262a; font-weight: 600; }
.inspector-tabs button.active::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px; background: var(--red); }
.inspector-section { padding: 15px 16px 18px; border-bottom: 1px solid #ececef; }
.inspector-section h3 { display: flex; justify-content: space-between; margin: 0 0 14px; font-size: 12px; }
.inspector-section h3 button { background: transparent; color: #aaa; }
.ratio-buttons, .segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ratio-buttons button, .segmented-control button { height: 31px; border: 1px solid #dedee2; border-radius: 7px; background: #fafafa; color: #666; font-size: 11px; }
.ratio-buttons button.active, .segmented-control button.active { border-color: #ff9bab; background: #fff3f5; color: var(--red); }
.segmented-control { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.color-field { display: grid; grid-template-columns: 1fr 27px 68px; align-items: center; gap: 8px; margin-top: 13px; color: #64646b; font-size: 11px; }
.color-field input { width: 27px; height: 27px; padding: 0; border: 0; background: none; }
.color-field code { padding: 5px; border: 1px solid #e0e0e3; border-radius: 5px; color: #777; font-size: 10px; text-align: center; }
.range-field { display: block; margin-top: 12px; }
.range-field > div { display: flex; justify-content: space-between; margin-bottom: 7px; color: #66666d; font-size: 11px; }
.range-field code { color: #999; font-size: 10px; }
.range-field input { width: 100%; accent-color: var(--red); }
.editor-loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #f6f6f7; color: #777; }
.editor-loading a { color: var(--red); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1200px) {
.tool-heroes { grid-template-columns: 1.15fr 1fr; }
.batch-hero { display: none; }
.quick-tools { grid-template-columns: repeat(4, 1fr); }
.quick-tool:last-child { display: none; }
.project-search { width: 270px; }
.canvas-viewport { padding-right: 288px; }
.editor-carousel { padding-right: 270px; }
.editor-inspector { width: 260px; right: 12px; }
}