feat: 视觉方向与背景图素材(章节场景图、重构 CSS、界面布局)

This commit is contained in:
Jayway Liu
2026-10-04 06:57:33 +08:00
parent 9b279f0cf8
commit 1a2f6606fc
9 changed files with 172 additions and 450 deletions
+88 -373
View File
@@ -1,374 +1,89 @@
.app {
max-width: 720px;
margin: 0 auto;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* ---- 影游场景 ---- */
.scene {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 24px;
background: linear-gradient(160deg, #14101e 30%, #2a2338 100%);
border-radius: 12px;
min-height: 80vh;
transition: background 0.8s ease;
}
.scene-header {
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
padding: 12px 20px;
font-size: 13px;
color: #b0a490;
background: rgba(20, 16, 30, 0.8);
}
.variant-tag {
color: #d4a96a;
}
.dialogue-box {
display: flex;
gap: 16px;
background: rgba(20, 16, 30, 0.85);
border: 1px solid #3a3248;
border-radius: 12px;
padding: 20px;
cursor: pointer;
}
.sprite {
flex-shrink: 0;
width: 72px;
height: 72px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
color: #f0e6d2;
}
.speaker-name {
font-weight: 700;
color: #d4a96a;
margin-bottom: 6px;
}
.dialogue-text {
line-height: 1.8;
margin: 0 0 8px;
}
.hint {
font-size: 12px;
color: #8a7f6a;
}
/* ---- 选择点 ---- */
.choice-box,
.narration-box {
background: rgba(20, 16, 30, 0.85);
border: 1px solid #3a3248;
border-radius: 12px;
padding: 20px;
}
.choice-prompt,
.narration-prompt {
font-size: 17px;
line-height: 1.7;
color: #f0e6d2;
}
.choice-options {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 12px;
}
.choice-btn {
text-align: left;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #4a3f5a;
background: #241e33;
color: #e8dcc8;
font-size: 15px;
cursor: pointer;
transition: border-color 0.2s, background 0.2s;
}
.choice-btn:hover {
border-color: #d4a96a;
background: #2e2642;
}
/* ---- 讲述点 ---- */
.mechanism-tag {
display: inline-block;
font-size: 12px;
color: #1a1626;
background: #d4a96a;
border-radius: 4px;
padding: 2px 8px;
margin-bottom: 10px;
}
.hold-btn {
width: 100%;
margin-top: 12px;
padding: 18px;
border-radius: 999px;
border: 2px solid #d4a96a;
background: transparent;
color: #d4a96a;
font-size: 16px;
cursor: pointer;
user-select: none;
touch-action: none;
}
.hold-btn.holding {
background: #d4a96a;
color: #1a1626;
}
/* ---- 过场 ---- */
.cutscene {
text-align: center;
cursor: pointer;
}
.cutscene-placeholder {
border: 2px dashed #4a3f5a;
border-radius: 12px;
padding: 80px 20px;
font-size: 20px;
color: #8a7f6a;
margin-bottom: 12px;
}
/* ---- 通用按钮 ---- */
button.primary,
button.secondary {
margin-top: 16px;
padding: 12px 24px;
border-radius: 8px;
font-size: 15px;
cursor: pointer;
}
button.primary {
border: none;
background: #d4a96a;
color: #1a1626;
font-weight: 700;
}
button.secondary {
border: 1px solid #4a3f5a;
background: transparent;
color: #b0a490;
width: 100%;
margin-top: 10px;
}
.chapter-end {
text-align: center;
padding: 40px 0;
}
/* ---- 画像报告 ---- */
.report {
padding: 32px 24px;
}
.report h1 {
color: #d4a96a;
}
.badge-banner {
display: flex;
gap: 20px;
align-items: center;
background: rgba(212, 169, 106, 0.08);
border: 1px solid #d4a96a;
border-radius: 12px;
padding: 20px;
margin: 16px 0 24px;
}
.badge-medal {
width: 72px;
height: 72px;
border-radius: 50%;
background: #d4a96a;
color: #1a1626;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
font-weight: 700;
flex-shrink: 0;
}
.badge-note {
font-size: 13px;
color: #8a7f6a;
}
.dimension-list {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 28px;
}
.dimension-row {
display: grid;
grid-template-columns: 140px 1fr 190px;
align-items: center;
gap: 12px;
}
.dimension-label {
color: #e8dcc8;
}
.dimension-bar {
height: 14px;
background: #2a2338;
border-radius: 7px;
overflow: hidden;
}
.dimension-fill {
height: 100%;
background: #d4a96a;
}
.dimension-value {
font-size: 13px;
color: #b0a490;
}
/* ---- 分享卡 ---- */
.share-card {
text-align: center;
margin-bottom: 16px;
}
.share-canvas {
max-width: 320px;
width: 100%;
border-radius: 12px;
border: 1px solid #3a3248;
display: block;
margin: 0 auto 12px;
}
/* ---- 语音输入与身份登记 ---- */
.voice-input {
margin-top: 12px;
}
.voice-live {
margin-top: 10px;
padding: 10px 14px;
background: rgba(212, 169, 106, 0.1);
border-left: 3px solid #d4a96a;
border-radius: 4px;
color: #e8dcc8;
line-height: 1.7;
}
.voice-textarea {
width: 100%;
box-sizing: border-box;
padding: 12px 14px;
border-radius: 8px;
border: 1px solid #4a3f5a;
background: #241e33;
color: #e8dcc8;
font-size: 15px;
line-height: 1.7;
resize: vertical;
margin-bottom: 8px;
}
.identity-box {
background: rgba(20, 16, 30, 0.85);
border: 1px solid #3a3248;
border-radius: 12px;
padding: 20px;
}
.identity-field {
display: grid;
grid-template-columns: 80px 1fr;
align-items: center;
gap: 12px;
margin: 10px 0;
color: #d8ccb8;
}
.identity-field input {
padding: 10px 12px;
border-radius: 8px;
border: 1px solid #4a3f5a;
background: #241e33;
color: #e8dcc8;
font-size: 15px;
}
/* ---- 同意门(ADR-0004) ---- */
.consent-box {
background: rgba(20, 16, 30, 0.85);
border: 1px solid #3a3248;
border-radius: 12px;
padding: 24px;
max-width: 560px;
margin: 48px auto;
}
.consent-box h2 {
color: #f0e6d2;
font-size: 20px;
margin: 8px 0 16px;
}
.consent-list {
color: #d8ccb8;
font-size: 15px;
line-height: 1.8;
padding-left: 20px;
margin-bottom: 20px;
}
.consent-list li {
margin-bottom: 8px;
}
.consent-note {
color: #d8ccb8;
font-size: 15px;
line-height: 1.7;
margin-bottom: 16px;
}
.consent-box .primary,
.consent-box .secondary {
margin-right: 10px;
margin-bottom: 10px;
.app { min-height: 100svh; display: flex; flex-direction: column; }
.scene { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; background: #17201d; }
.scene-media, .scene-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-media { object-fit: cover; object-position: center; z-index: -2; filter: saturate(.75) contrast(1.06); }
.scene-shade { z-index: -1; background: linear-gradient(90deg, rgba(11,22,20,.72), rgba(11,22,20,.14) 80%), linear-gradient(0deg, #101917 0%, rgba(16,25,23,.9) 20%, rgba(16,25,23,.08) 72%); }
.scene-content { width: min(100% - 64px, 1100px); min-height: 100svh; margin-inline: auto; display: flex; flex-direction: column; padding-bottom: clamp(28px,5vh,64px); }
.scene-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(233,231,223,.34); padding-block: 20px; font-size: 13px; color: #e8e8dd; }
.scene-brand { font-family: 'Noto Serif CJK SC','Songti SC',serif; font-size: 18px; white-space: nowrap; }
.scene-brand small { display: inline-block; margin-left: 16px; font: 11px/1.5 'Noto Sans CJK SC','PingFang SC',sans-serif; color: #b7c8bb; }
.scene-chapter { color: #d6d3c8; text-align: right; }
.scene-stage { margin-top: auto; margin-bottom: 32px; }
.scene-index, .scene-credit { font-size: 12px; color: #b9d2c6; }
.scene-index { letter-spacing: 1px; }
.scene-stage h1 { margin: 6px 0 10px; font-size: clamp(36px,5vw,68px); line-height: 1.2; color: #f5f0e4; text-shadow: 0 2px 24px rgba(0,0,0,.38); }
.scene-credit { display: block; margin-top: 8px; }
.dialogue-box, .choice-box, .narration-box, .identity-box, .cutscene, .chapter-end { width: min(100%,760px); padding: 24px 28px; border: 1px solid rgba(201,219,203,.34); border-left: 3px solid #a8bda5; border-radius: 3px; background: rgba(13,25,23,.94); box-shadow: 0 16px 40px rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.dialogue-box { display: flex; align-items: flex-start; gap: 18px; text-align: left; color: inherit; }
.dialogue-box:hover { border-color: #d9bc94; }
.speaker-mark { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #8ca696; border-radius: 50%; font-family: 'Noto Serif CJK SC','Songti SC',serif; color: #d2d7c8; }
.dialogue-body { display: block; min-width: 0; flex: 1; }
.speaker-name { display: block; margin-bottom: 8px; color: #d8b58a; font-weight: 600; }
.dialogue-text { display: block; line-height: 1.9; white-space: pre-line; }
.continue-hint { display: block; margin-top: 16px; color: #adc5b4; font-size: 12px; text-align: right; }
.choice-prompt, .narration-prompt, .cutscene p { color: #f2f0e7; font-size: 18px; line-height: 1.75; }
.choice-options { display: grid; gap: 9px; margin-top: 18px; }
.choice-btn { width: 100%; padding: 14px 18px; border: 1px solid #546d60; border-radius: 3px; background: rgba(34,54,47,.7); color: #f1eee4; text-align: left; transition: background .2s,border-color .2s; }
.choice-btn:hover { background: #344d40; border-color: #d8b58a; }
.mechanism-tag { display: inline-block; margin-bottom: 12px; padding: 3px 8px; border: 1px solid #799b82; color: #c2d8c5; font-size: 12px; }
.hint { color: #aabbb0; font-size: 12px; line-height: 1.6; }
button.primary, button.secondary, .hold-btn { min-height: 44px; padding: 10px 20px; border-radius: 3px; font-size: 15px; transition: background .2s,border-color .2s; }
button.primary { border: 1px solid #c36e55; background: #a94732; color: #fff9ed; font-weight: 600; }
button.primary:hover { background: #c05d43; }
button.secondary { border: 1px solid #829989; background: transparent; color: #e6eae0; }
button.secondary:hover { border-color: #d6b48b; background: rgba(168,189,165,.12); }
.cutscene .primary, .chapter-end .primary { margin-top: 12px; }
.voice-input { margin-top: 16px; }
.voice-controls { max-width: 280px; }
.hold-btn { width: 100%; border: 1px solid #91ae99; background: #294638; color: #edf1e7; touch-action: none; }
.hold-btn.holding { background: #a94732; border-color: #c36e55; }
.voice-live { padding: 10px 14px; border-left: 2px solid #b2c6ac; color: #d8e3d8; background: rgba(74,106,85,.23); }
.voice-textarea, .identity-field input { width: 100%; padding: 12px 14px; border: 1px solid #718f7c; border-radius: 3px; background: #172b25; color: #f0f0e7; line-height: 1.6; }
.voice-textarea { display: block; margin-bottom: 12px; resize: vertical; }
.voice-textarea::placeholder, .identity-field input::placeholder { color: #9eb1a3; }
.voice-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voice-actions > button:not(.primary) { border: 0; background: transparent; color: #c5d2c2; text-decoration: underline; }
.identity-field { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: 12px; margin: 10px 0; }
.identity-box .primary, .narration-box .secondary { margin-top: 12px; }
.consent-box { width: min(100% - 40px,700px); margin: auto; padding: clamp(24px,5vw,56px); border-top: 2px solid #9bb69b; background: #1b2a24; box-shadow: 0 16px 60px rgba(0,0,0,.25); }
.app:has(.consent-box) { padding-block: 32px; background: radial-gradient(ellipse at 80% 0%,#335444,#101917 65%); }
.consent-box h2 { font-size: clamp(24px,3vw,36px); margin: 8px 0 20px; }
.consent-list { padding-left: 22px; line-height: 1.8; color: #d7e0d6; }
.consent-list li { margin-bottom: 10px; }
.consent-note { color: #d7e0d6; }
.consent-box .primary { margin-right: 12px; }
.consent-box .hint { margin-top: 20px; }
.report { width: min(100% - 40px,880px); margin-inline: auto; padding: clamp(32px,5vw,72px) 0; }
.report h1 { font-size: clamp(27px,4vw,42px); color: #f1eee3; }
.badge-banner { display: flex; align-items: center; gap: 24px; margin: 28px 0 36px; padding: 22px 0; border-block: 1px solid #5a7762; }
.badge-banner h2 { color: #e7c297; margin-bottom: 8px; }
.badge-banner p { margin-bottom: 6px; }
.badge-medal { flex: 0 0 70px; height: 70px; display: grid; place-items: center; border: 2px solid #bd9570; border-radius: 50%; color: #eed7af; font: 34px 'Noto Serif CJK SC','Songti SC',serif; }
.badge-note { color: #a9baad; font-size: 13px; }
.dimension-list { display: grid; gap: 18px; margin-bottom: 42px; }
.dimension-row { display: grid; grid-template-columns: 140px minmax(60px,1fr) 185px; align-items: center; gap: 14px; }
.dimension-label { color: #e6ede1; }
.dimension-bar { height: 8px; background: #35463b; }
.dimension-fill { height: 100%; background: #a8c1a3; }
.dimension-value { color: #bdcfc0; font-size: 13px; text-align: right; }
.share-card { text-align: center; margin-bottom: 28px; }
.share-canvas { display: block; width: min(100%,320px); height: auto; margin: 0 auto 16px; border: 1px solid #698573; }
.report > .secondary { display: block; margin: auto; }
@media (max-width: 640px) {
.scene-content { width: min(100% - 32px,480px); padding-bottom: 20px; }
.scene-header { padding-block: 14px; align-items: flex-start; }
.scene-brand { font-size: 15px; }
.scene-brand small { display: block; margin-left: 0; margin-top: 3px; font-size: 10px; }
.scene-chapter { font-size: 11px; }
.scene-stage { margin-bottom: 20px; }
.scene-stage h1 { font-size: 38px; }
.dialogue-box, .choice-box, .narration-box, .identity-box, .cutscene, .chapter-end { padding: 18px; }
.speaker-mark { flex-basis: 36px; width: 36px; height: 36px; }
.dialogue-box { gap: 12px; }
.choice-prompt, .narration-prompt { font-size: 16px; }
.dimension-row { grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; }
.dimension-bar { grid-column: 1 / -1; grid-row: 2; }
.dimension-value { font-size: 12px; }
}
@media (max-height: 700px) { .scene-stage { margin-top: 48px; } }
@media (prefers-reduced-motion: reduce) { .choice-btn, button.primary, button.secondary, .hold-btn { transition: none; } }