/
chewy
/
BDZ_GenAI
Обзор
Документация
Войти
/
chewy
/
BDZ_GenAI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
styles.css
583 строки
20 KB
chewy
add game-prototype
12 ноя 2025, 22:51
12 ноя 2025, 22:51
7ab422a
Код
Авторство
О чём код?
:root{ --bg:#071024; --fg:#e6f3ff; --accent:#7ee0ff; --muted:#9fb8d9; --panel-bg: rgba(6,12,24,0.9); --minimap-bg: #021026; --portal-glow: rgba(140,100,255,0.95); /* secondary theme fallbacks (do not animate) */ --bg-top: #071024; --bg-bottom: #041022; --player-color: #3A6EA5; --portal-color: #9b6bff; --tree-foliage: #3e8a46; --tree-trunk: #3f2f25; --box-fill: #a36f3b; --panel-text: #e6eef6; --btn-active: rgba(255,255,255,0.04); --minimap-player: #64B5F6; --minimap-portal: #c78bff; --minimap-tree: #63b86a; /* cultural zone palette (kept but harmonized) */ --zone-temple-base: #0f2533; --zone-temple-glow: rgba(160,210,255,0.08); --zone-village-base: #1e2a1a; --zone-village-path: rgba(160,120,70,0.12); --zone-market-base: #2a2014; --zone-market-tent: rgba(200,140,90,0.10); --zone-cave-base: #060608; --zone-cave-light: rgba(160,140,110,0.04); } /* Night mode overrides for improved tree and UI visibility */ .scene.night{ --tree-foliage: #9adf7a; /* brighter foliage at night */ --tree-trunk: #4a3224; /* slightly lighter trunk */ --panel-bg: rgba(10,14,28,0.96); /* darker but high-contrast panels */ --fg: #f6fbff; /* brighter foreground text for readability */ --muted: #cbdff5; /* lighter muted text */ --panel-text: #ffffff; /* ensure modal inner text is visible */ --minimap-bg: #071126; /* slightly lighter minimap bg for contrast */ --minimap-tree: #9be88a; /* minimap tree color readable at night */ --minimap-player: #9fd8ff; /* player dot more visible */ --box-fill: #cfa66f; /* boxes slightly brighter at night */ } *{box-sizing:border-box} html,body{height:100%;margin:0;font-family:"Noto Sans",system-ui,Segoe UI,Roboto,Arial; background:var(--bg); color:var(--fg)} .app { display:flex; gap:16px; padding:16px; height:100vh; align-items:flex-start; justify-content:center; } /* canvas container */ .scene { /* higher-contrast, clearer background to separate world from UI (restored dark palette) */ background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%); box-shadow: inset 0 48px 140px rgba(6,10,20,0.06), 0 18px 48px rgba(8,12,26,0.10); border:1px solid rgba(160,150,130,0.8); width:980px; /* widened scene to give more room to the map */ height:600px; display:flex; align-items:center; justify-content:center; overflow:hidden; } /* update scene gradient to use new top/bottom */ .scene { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%); } /* slightly stronger vignette edge */ .scene::after{ content: ''; position: absolute; left:0;top:0;right:0;bottom:0; pointer-events:none; background: radial-gradient(60% 60% at 50% 45%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.08) 60%, rgba(0,0,0,0.22) 100%); mix-blend-mode: multiply; border-radius:2px; } canvas { background:transparent; display:block; width:100%; height:100%; } /* HUD overlay */ .hud { position:absolute; left:12px; top:12px; display:flex; flex-direction:column; gap:10px; pointer-events:none; width:240px; } /* narrow the right-side panels (side) to free more canvas space */ .side { width: 260px; flex: 0 0 260px; } .panel { background: var(--panel-bg); border:1px solid rgba(110,120,140,0.9); color: var(--fg); padding:8px; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,0.06); pointer-events:auto; /* new: clear framed visual with subtle inner border for panels */ outline: 1px solid rgba(255,255,255,0.04); transition: box-shadow 180ms ease, transform 120ms ease; } /* panel hover lifts slightly to show frame */ .panel:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.10); transform: translateY(-2px); } /* Controls & indicators */ .scale-indicator { font-weight:700; font-size:14px } .health-bar { display:flex; align-items:center; gap:8px; } .health-fill { height:8px; background:linear-gradient(90deg,#ff6b6b,#ffb86b); border-radius:4px; width:100%; transition:width 160ms linear; } .stamina-bar { width:84px; height:8px; border-radius:4px; background:rgba(255,255,255,0.06); overflow:hidden; border:1px solid rgba(255,255,255,0.03); } .stamina-fill { height:100%; background:linear-gradient(90deg,#7ad3ff,#3fb4ff); width:100%; transition:width 160ms linear; } /* stamina value small text */ .stamina-value { font-size:11px; color:var(--muted); width:36px; text-align:right; } /* low stamina screen breathing effect handled in canvas, add subtle overlay class for CSS fallback */ .scene.stamina-low::before{ content:''; position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none; background: rgba(0,0,0,0.12); mix-blend-mode:multiply; animation: stamina-breath 2200ms ease-in-out infinite; } @keyframes stamina-breath { 0%{ opacity:0.12; transform: scale(1); } 50%{ opacity:0.22; transform: scale(1.01); } 100%{ opacity:0.12; transform: scale(1); } } /* new circular HP widget */ .health-circle { width:44px; height:44px; border-radius:50%; background: conic-gradient(#ff3b3b var(--hp-percent,100%), #eee 0); display:inline-block; position:relative; box-shadow: 0 6px 18px rgba(255,40,40,0.08) inset; transition: --hp-percent 420ms linear, transform 220ms ease; } .health-circle::after{ content:''; position:absolute; left:6px; top:6px; right:6px; bottom:6px; background:var(--panel-bg); border-radius:50%; } /* small label inside circle */ .health-circle .hp-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; color:var(--panel-text); pointer-events:none; } /* minimap */ .minimap { width:220px; height:120px; background: linear-gradient(180deg, rgba(6,8,14,1), rgba(2,3,9,1)); /* deeper, clearer base */ color:#fff; border-radius:6px; position:relative; display:flex; align-items:center; justify-content:center; font-size:12px; box-shadow: 0 8px 28px rgba(6,8,10,0.5) inset; } /* make minimap dots pop */ .minimap canvas { image-rendering: optimizeSpeed; } /* portal legend glow in HUD */ .icon.portal{background:linear-gradient(90deg,#ffd9a8,#7ee0ff); box-shadow: 0 12px 36px var(--portal-glow);} .tree-leaves { opacity:0.94; } .small { font-size:12px; padding:6px 8px; border-radius:6px; border:1px solid #e6e6e6; background:white; cursor:pointer; } .modal { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); background:#fff; border:1px solid #eee; padding:12px; border-radius:8px; box-shadow:0 12px 40px rgba(0,0,0,0.12); z-index:1000; min-width:320px; } .modal ul { margin:0; padding-left:16px; color:#333; } .modal .symbols { display:flex; gap:8px; margin:8px 0; justify-content:center; } .symbol-btn { width:48px;height:48px;border-radius:8px;border:1px solid #cfd8e6;background:#ffffff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:700;color:var(--fg); } .symbol-btn.selected { outline:3px solid rgba(75,120,255,0.18); box-shadow:0 6px 18px rgba(80,140,255,0.08); transform:translateY(-2px); } /* subtle ground shading for cave / plain can be handled in canvas; add small glow for torches in UI */ .react-icon { pointer-events:none; position:absolute; transform:translate(-50%,-100%); } /* notifications (toast-like) */ .toast-container { position:fixed; right:18px; top:18px; display:flex; flex-direction:column; gap:8px; z-index:1200; pointer-events:none; align-items:flex-end; width:320px; } .toast { pointer-events:auto; min-width:220px; max-width:320px; background:#fff; border:1px solid #eaeaea; padding:10px 12px; border-radius:8px; box-shadow:0 10px 30px rgba(12,12,12,0.12); font-size:13px; } .toast.success { border-left:4px solid #1f8e3e; } .toast.warn { border-left:4px solid #e85b2f; } .toast.info { border-left:4px solid var(--accent); } .size-icons { display:flex; gap:6px; align-items:center; margin-bottom:4px; } .size-btn { width:30px; height:28px; border-radius:6px; border:1px solid #e6e6e6; background:#fff; font-weight:700; cursor:pointer; } .size-btn.active { outline:2px solid rgba(58,110,165,0.16); background: var(--btn-active); box-shadow:0 8px 28px rgba(31,79,230,0.06); transform: translateY(-2px); } /* improve symbol hover contrast */ .symbol-btn:hover { background:#f6f9ff; border-color:#dbe8ff; } /* portal visuals removed (no portal entities) */ /* bottom hint styling */ .hud-bottom-hint{ position:fixed; left:50%; transform:translateX(-50%); bottom:12px; background: rgba(255,255,255,0.96); color:var(--fg); padding:8px 12px; border-radius:8px; border:1px solid rgba(120,130,150,0.12); box-shadow: 0 8px 28px rgba(6,10,20,0.08); font-size:13px; z-index:1200; pointer-events:none; opacity:0.98; } /* button hover highlight and active click visual */ .small, .size-btn, .symbol-btn { transition: box-shadow 140ms ease, transform 100ms ease, background-color 120ms ease; } .small:hover, .size-btn:hover, .symbol-btn:hover { box-shadow: 0 8px 18px rgba(25,80,210,0.08); background-color: rgba(250,250,255,0.95); transform: translateY(-1px); } .small:active, .size-btn:active, .symbol-btn:active { /* quick visual click: short darken + slight inset */ filter: brightness(0.86); transform: translateY(0); box-shadow: 0 4px 10px rgba(0,0,0,0.08) inset; } /* improve symbol button contrast */ .symbol-btn { background:#fff; border:1px solid #e3e7ee; color:var(--fg); font-weight:800; } /* subtle ground shading for cave / plain can be handled in canvas; add small glow for torches in UI */ .react-icon { pointer-events:none; position:absolute; transform:translate(-50%,-100%); } .sneak-indicator { font-size:12px; padding:6px 8px; border-radius:6px; background: rgba(20,20,30,0.06); color: var(--muted); border:1px solid rgba(0,0,0,0.06); opacity:0.36; transition: opacity 160ms ease, transform 120ms ease, background-color 160ms ease; pointer-events:none; } .sneak-indicator.active { opacity:1; background: rgba(12,14,20,0.06); color: var(--fg); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.08) inset; } /* subtle crouch overlay around player (screen-space) */ .sneak-overlay { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; mix-blend-mode: multiply; transition: opacity 180ms ease; opacity: 0; } .sneak-overlay.active { opacity: 0.32; background: radial-gradient(circle at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%); } /* hide manual-content in HUD until modal opened (we keep DOM for moving into modal) */ .manual-content { display: none; } /* minimap background override to true black */ .minimap { background: var(--minimap-bg); /* ...existing properties ... */ } /* box hover pointer style for small DOM controls (keeps UX consistent) */ .small:hover { background: var(--btn-active); } /* NPC emotion emoji bubble */ .npc-emoji { position:absolute; pointer-events:none; font-size:18px; transform:translate(-50%,-100%); filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18)); transition: transform 300ms cubic-bezier(.2,.9,.2,1), opacity 260ms ease; opacity:0; } .npc-emoji.show { opacity:1; transform:translate(-50%,-140%) scale(1.04); } /* HUD vibration on rule violation */ .hud.vibrate { animation: hud-shake 420ms ease-in-out; } @keyframes hud-shake { 0%{transform:translateY(0)} 25%{transform:translateY(-6px)} 50%{transform:translateY(2px)} 75%{transform:translateY(-2px)} 100%{transform:translateY(0)} } /* dark overlay when rule broken (applies to .scene) */ .scene.rule-break::before{ content:''; position:absolute; left:0;top:0;right:0;bottom:0; background:rgba(0,0,0,0.12); pointer-events:none; mix-blend-mode:multiply; transition:opacity 320ms ease; } /* tooltip styling for first-action hints */ .first-tooltip { position:fixed; left:50%; transform:translateX(-50%); bottom:84px; background:#fff; color:var(--panel-text); padding:8px 12px; border-radius:8px; box-shadow:0 10px 30px rgba(12,12,12,0.12); font-size:13px; z-index:1300; opacity:0; transition:opacity 260ms ease, transform 260ms ease; } .first-tooltip.show { opacity:1; transform:translateX(-50%) translateY(-6px); } /* reputation glow animation target */ .reputation-glow { animation: rep-glow 900ms ease; box-shadow: 0 8px 28px rgba(100,160,255,0.18); } @keyframes rep-glow { 0%{transform:scale(1)} 40%{transform:scale(1.06)} 100%{transform:scale(1)} } /* Overlay for Manual: semi-transparent dark layer with blur and centered modal */ .manual-overlay{ position:fixed; inset:0; background: rgba(26,26,26,0.8); display:flex; align-items:center; justify-content:center; z-index:1300; backdrop-filter: blur(8px); opacity:0; pointer-events:none; transition: opacity 0.4s ease; } .manual-overlay.show{ opacity:1; pointer-events:auto; } /* enhanced modal appearance */ .manual-modal{ width:720px; max-width:92%; max-height:78vh; overflow:hidden; border-radius:12px; box-shadow: 0 0 20px rgba(0,0,0,0.4); background: rgba(32,36,42,0.72); /* partially translucent */ border: 1px solid rgba(46,137,255,0.12); /* warm subtle frame */ padding:18px; box-sizing:border-box; transform: translateY(8px) scale(0.99); opacity:0; transition: opacity 0.4s ease, transform 0.36s cubic-bezier(.2,.9,.2,1); backdrop-filter: blur(6px); position:relative; overflow:auto; scrollbar-width: thin; border-left: 6px solid rgba(46,137,255,0.08); } /* show state for opening animation */ .manual-modal.show{ opacity:1; transform: translateY(0) scale(1); } /* header with decorative accent & icon */ .manual-header{ display:flex; align-items:center; gap:12px; margin-bottom:8px; } .manual-accent{ width:8px; height:48px; border-radius:6px; background: linear-gradient(180deg, #3A6EA5 0%, #8A2BE2 100%); box-shadow: 0 8px 28px rgba(58,110,165,0.06); flex-shrink:0; } .manual-title{ font-size:22px; color:#FFFFFF; font-weight:700; text-shadow: 0 6px 18px rgba(137,207,240,0.12); display:flex; align-items:center; gap:10px; animation: manual-pulse 3s ease-in-out infinite; } .manual-icon{ font-size:20px; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.28)); } /* pulsing glow around title */ @keyframes manual-pulse{ 0%{ text-shadow: 0 6px 18px rgba(137,207,240,0.08); } 50%{ text-shadow: 0 10px 36px rgba(137,207,240,0.16); transform: translateY(-1px); } 100%{ text-shadow: 0 6px 18px rgba(137,207,240,0.08); transform: translateY(0); } } /* body with styled headings and scroll fade */ .manual-body{ color:#CCCCCC; font-size:15.5px; line-height:1.4; max-height:56vh; overflow:auto; padding-right:6px; position:relative; } /* subheadings */ .manual-body h3, .manual-body .subhead{ color:#E0E0E0; font-weight:700; margin-top:12px; margin-bottom:6px; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,0.06); font-size:15px; } /* list items with soft icons */ .manual-body ol, .manual-body ul{ margin:8px 0 0 16px; padding:0; color:#CCCCCC; font-size:15.5px; line-height:1.45; } .manual-body li{ margin-bottom:8px; display:flex; gap:10px; align-items:flex-start; } .manual-body li::marker{ display:none; } .manual-body li .li-icon{ width:20px; flex-shrink:0; font-size:16px; margin-top:2px; } /* buttons inside modal */ .manual-close{ background:#3A6EA5; color:#fff; border: none; padding:8px 12px; border-radius:8px; cursor:pointer; transition: background-color 180ms ease, transform 120ms ease; } .manual-close:hover{ background:#558CD8; transform: translateY(-2px); } /* scroll fade at top/bottom to suggest more content */ .manual-body::after, .manual-body::before{ content:''; position:sticky; left:0; right:0; height:28px; pointer-events:none; display:block; z-index:2; } .manual-body::before{ top:0; background: linear-gradient(180deg, rgba(32,36,42,0.88), rgba(32,36,42,0)); } .manual-body::after{ bottom:0; background: linear-gradient(180deg, rgba(32,36,42,0), rgba(32,36,42,0.88)); position:absolute; left:0; right:0; bottom:0; height:36px; } /* HUD dimming while manual is open */ .hud.dimmed{ opacity:0.36; filter:brightness(0.8) saturate(0.85); transition: opacity 240ms ease, filter 240ms ease; pointer-events:none; } /* ensure modal content slightly translucent so world shows through */ .manual-modal, .manual-body, .manual-header{ background-clip: padding-box; } /* content icon helper for manual list insertion */ .manual-body .icon-gear{ font-size:16px; } .manual-body .icon-gamepad{ font-size:16px; } .manual-body .icon-speech{ font-size:16px; } /* small responsive tweaks */ @media (max-width:640px){ .manual-modal{ width:92%; padding:14px; border-radius:10px; } .manual-title{ font-size:18px; } } /* button hover highlight and active click visual */ .small, .size-btn, .symbol-btn { transition: box-shadow 140ms ease, transform 100ms ease, background-color 120ms ease; } .small:hover, .size-btn:hover, .symbol-btn:hover { box-shadow: 0 8px 18px rgba(25,80,210,0.08); background-color: rgba(250,250,255,0.95); transform: translateY(-1px); } .small:active, .size-btn:active, .symbol-btn:active { /* quick visual click: short darken + slight inset */ filter: brightness(0.86); transform: translateY(0); box-shadow: 0 4px 10px rgba(0,0,0,0.08) inset; } /* world-status small panel */ .world-status { width:160px; padding:8px; pointer-events:none; background: rgba(18,22,28,0.84); border:1px solid rgba(255,255,255,0.04); color:#fff; font-family:"Noto Sans"; border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,0.28); } .world-status #wsIcon { font-size:20px; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:6px; background: rgba(255,255,255,0.02); } /* Codex mini and modal tweaks (subtle, matches Manual style) */ #\__codexMini, #__codexMini button { font-family: "Noto Sans"; } .manual-modal .codex-card { display:flex; gap:12px; align-items:center; padding:8px; border-radius:8px; background: rgba(255,255,255,0.02); margin-bottom:8px; } .manual-modal .codex-card .icon { width:48px; height:48px; display:flex; align-items:center; justify-content:center; border-radius:8px; background:rgba(255,255,255,0.03); font-size:20px; } .manual-modal .codex-card .meta { color:#CCCCCC; font-size:14px; } /* Event log (bottom-right) */ .event-log{ position:fixed; right:18px; bottom:18px; width:300px; display:flex; flex-direction:column; gap:8px; z-index:1400; pointer-events:none; } .event-row{ pointer-events:auto; background:rgba(255,255,255,0.98); color:#111; padding:10px 12px; border-radius:8px; box-shadow:0 10px 30px rgba(6,6,10,0.12); font-size:13px; opacity:0; transform: translateY(6px); transition: opacity 260ms ease, transform 260ms ease; cursor:pointer; border-left:4px solid transparent; } /* show state (fade in) */ .event-row.show{ opacity:1; transform: translateY(0); } /* color schemes */ .event-row.success{ border-left-color: #1f8e3e; background: #f5fff5; } .event-row.warning{ border-left-color: #e8b41a; background: #fffaf0; } .event-row.violation{ border-left-color: #e85b2f; background: #fff5f3; } .event-row.knowledge{ border-left-color: #8a50ff; background: #fbf5ff; } /* smaller screens: shrink width */ @media (max-width:640px){ .event-log{ width:80%; left:50%; transform:translateX(-50%); right:auto; } } /* Options modal (small) */ #__optionsOverlay{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:1500; background: rgba(12,12,18,0.6); } #__optionsModal{ width:360px; background:var(--panel-bg); border:1px solid rgba(255,255,255,0.04); padding:12px; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,0.5); } .suspicion-bar { width: 100%; height: 6px; border-radius: 4px; margin-left: 6px; background: linear-gradient(90deg, rgba(255,120,120,0.12), rgba(255,200,120,0.06)); position: relative; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.12); } .suspicion-bar::after{ content:''; position:absolute;left:0;top:0;height:100%;width:0%; background: linear-gradient(90deg,#ff8a65,#e85b2f); transition: width 260ms ease; }