Spaces:
Sleeping
Sleeping
Commit ·
fa34b01
1
Parent(s): 421c4e3
fix(game): base64 background + brighter scene so the silhouette reads
Browse files- app.py +2 -1
- styles.css +49 -42
app.py
CHANGED
|
@@ -1062,7 +1062,8 @@ with gr.Blocks(title="Hollow") as demo:
|
|
| 1062 |
elem_classes="intro-enter-btn")
|
| 1063 |
|
| 1064 |
with gr.Column(visible=False, elem_id="game-view") as game_view:
|
| 1065 |
-
gr.HTML('<div id="game-bg"
|
|
|
|
| 1066 |
'<div id="game-frame-edge"></div>')
|
| 1067 |
with gr.Row(elem_id="game-topbar"):
|
| 1068 |
title_panel = gr.HTML(value=_render_title(_init_state()))
|
|
|
|
| 1062 |
elem_classes="intro-enter-btn")
|
| 1063 |
|
| 1064 |
with gr.Column(visible=False, elem_id="game-view") as game_view:
|
| 1065 |
+
gr.HTML(f'<div id="game-bg" style="background-image:url(\'{_BACKGROUND_URI}\')"></div>'
|
| 1066 |
+
'<div id="game-vig"></div>'
|
| 1067 |
'<div id="game-frame-edge"></div>')
|
| 1068 |
with gr.Row(elem_id="game-topbar"):
|
| 1069 |
title_panel = gr.HTML(value=_render_title(_init_state()))
|
styles.css
CHANGED
|
@@ -268,10 +268,14 @@ textarea:focus,
|
|
| 268 |
}
|
| 269 |
|
| 270 |
textarea::placeholder {
|
| 271 |
-
color: #
|
| 272 |
font-style: italic;
|
| 273 |
}
|
| 274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
/* ── 9. Buttons (the → send) ──────────────────── */
|
| 276 |
.gradio-container button {
|
| 277 |
font-family: 'Crimson Text', Georgia, serif !important;
|
|
@@ -1333,11 +1337,10 @@ footer { display: none !important; }
|
|
| 1333 |
/* blurred ambient forest backdrop, same treatment as intro/menu */
|
| 1334 |
#game-bg {
|
| 1335 |
position: fixed;
|
| 1336 |
-
inset: -
|
| 1337 |
-
background-image: url('assets/background.webp');
|
| 1338 |
background-size: cover;
|
| 1339 |
background-position: center 38%;
|
| 1340 |
-
filter: grayscale(1) blur(
|
| 1341 |
transform: scale(1.08);
|
| 1342 |
z-index: 0;
|
| 1343 |
}
|
|
@@ -1349,8 +1352,8 @@ footer { display: none !important; }
|
|
| 1349 |
pointer-events: none;
|
| 1350 |
z-index: 1;
|
| 1351 |
background:
|
| 1352 |
-
radial-gradient(ellipse at 50% 36%, transparent
|
| 1353 |
-
linear-gradient(to bottom, rgba(6,4,12,0.
|
| 1354 |
}
|
| 1355 |
|
| 1356 |
/* a subtle inner frame edge so the scene feels contained like the intro */
|
|
@@ -1364,7 +1367,7 @@ footer { display: none !important; }
|
|
| 1364 |
max-height: 82vh;
|
| 1365 |
pointer-events: none;
|
| 1366 |
z-index: 2;
|
| 1367 |
-
box-shadow: inset 0 0
|
| 1368 |
}
|
| 1369 |
|
| 1370 |
/* top bar: title + controls */
|
|
@@ -1400,34 +1403,38 @@ footer { display: none !important; }
|
|
| 1400 |
/* corner drawers */
|
| 1401 |
.game-drawer {
|
| 1402 |
position: fixed;
|
| 1403 |
-
top:
|
| 1404 |
z-index: 8;
|
| 1405 |
-
width: min(
|
| 1406 |
-
min-width:
|
| 1407 |
-
max-height: calc(100vh -
|
| 1408 |
transition: max-height 0.45s ease, opacity 0.35s ease;
|
| 1409 |
overflow: hidden;
|
| 1410 |
-
opacity: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1411 |
}
|
| 1412 |
.game-drawer:hover { opacity: 1; }
|
| 1413 |
-
.game-drawer.open { max-height: calc(100vh -
|
| 1414 |
.game-drawer:not(.open) {
|
| 1415 |
-
max-height:
|
| 1416 |
cursor: pointer;
|
| 1417 |
}
|
| 1418 |
-
#drawer-left { left:
|
| 1419 |
-
#drawer-right { right:
|
| 1420 |
|
| 1421 |
.drawer-head {
|
| 1422 |
cursor: pointer;
|
| 1423 |
user-select: none;
|
| 1424 |
-
padding-bottom:
|
| 1425 |
-
border-bottom: 1px solid
|
| 1426 |
-
margin-bottom:
|
| 1427 |
}
|
| 1428 |
.drawer-head::after {
|
| 1429 |
content: ' ›';
|
| 1430 |
-
opacity: 0.
|
| 1431 |
margin-left: 6px;
|
| 1432 |
display: inline-block;
|
| 1433 |
transition: transform 0.3s ease;
|
|
@@ -1482,11 +1489,11 @@ footer { display: none !important; }
|
|
| 1482 |
|
| 1483 |
.entity-glow {
|
| 1484 |
position: absolute;
|
| 1485 |
-
inset: 10% 0
|
| 1486 |
-
background: radial-gradient(ellipse
|
| 1487 |
-
rgba(140,
|
| 1488 |
pointer-events: none;
|
| 1489 |
-
opacity: 0.
|
| 1490 |
mix-blend-mode: screen;
|
| 1491 |
}
|
| 1492 |
|
|
@@ -1504,15 +1511,15 @@ footer { display: none !important; }
|
|
| 1504 |
}
|
| 1505 |
|
| 1506 |
#game-dialogue .chatbot {
|
| 1507 |
-
height:
|
| 1508 |
-
background: rgba(
|
| 1509 |
border: 10px solid transparent !important;
|
| 1510 |
border-image: var(--stone-frame) 30 !important;
|
| 1511 |
box-shadow: var(--stone-bevel),
|
| 1512 |
0 -20px 60px rgba(0,0,0,0.55) !important;
|
| 1513 |
-
backdrop-filter: blur(
|
| 1514 |
-
-webkit-backdrop-filter: blur(
|
| 1515 |
-
padding:
|
| 1516 |
}
|
| 1517 |
|
| 1518 |
#game-dialogue .bot,
|
|
@@ -1552,34 +1559,34 @@ footer { display: none !important; }
|
|
| 1552 |
}
|
| 1553 |
|
| 1554 |
/* tone classes — the world blooms or rots */
|
| 1555 |
-
.tone-warm #game-bg { filter: grayscale(1) blur(
|
| 1556 |
.tone-warm #game-vig {
|
| 1557 |
background:
|
| 1558 |
-
radial-gradient(ellipse at 50% 36%, transparent
|
| 1559 |
-
linear-gradient(to bottom, rgba(6,4,12,0.
|
| 1560 |
}
|
| 1561 |
-
.tone-warm .entity-img { filter: brightness(1.
|
| 1562 |
|
| 1563 |
-
.tone-neutral #game-bg { filter: grayscale(1) blur(
|
| 1564 |
|
| 1565 |
-
.tone-wounded #game-bg { filter: grayscale(1) blur(
|
| 1566 |
.tone-wounded #game-vig {
|
| 1567 |
background:
|
| 1568 |
-
radial-gradient(ellipse at 50% 36%, transparent
|
| 1569 |
-
linear-gradient(to bottom, rgba(6,4,12,0.
|
| 1570 |
}
|
| 1571 |
-
.tone-wounded .entity-img { opacity: 0.
|
| 1572 |
|
| 1573 |
.tone-hostile #game-bg {
|
| 1574 |
-
filter: grayscale(1) blur(
|
| 1575 |
}
|
| 1576 |
.tone-hostile #game-vig {
|
| 1577 |
background:
|
| 1578 |
-
radial-gradient(ellipse at 50% 36%, transparent
|
| 1579 |
-
linear-gradient(to bottom, rgba(40,6,12,0.
|
| 1580 |
}
|
| 1581 |
.tone-hostile .entity-img {
|
| 1582 |
-
filter: sepia(0.
|
| 1583 |
}
|
| 1584 |
|
| 1585 |
/* recall migration — the claimed memory drifts toward the child */
|
|
|
|
| 268 |
}
|
| 269 |
|
| 270 |
textarea::placeholder {
|
| 271 |
+
color: #5a5078 !important;
|
| 272 |
font-style: italic;
|
| 273 |
}
|
| 274 |
|
| 275 |
+
#game-inputrow textarea::placeholder {
|
| 276 |
+
color: #6a6090 !important;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
/* ── 9. Buttons (the → send) ──────────────────── */
|
| 280 |
.gradio-container button {
|
| 281 |
font-family: 'Crimson Text', Georgia, serif !important;
|
|
|
|
| 1337 |
/* blurred ambient forest backdrop, same treatment as intro/menu */
|
| 1338 |
#game-bg {
|
| 1339 |
position: fixed;
|
| 1340 |
+
inset: -8%;
|
|
|
|
| 1341 |
background-size: cover;
|
| 1342 |
background-position: center 38%;
|
| 1343 |
+
filter: grayscale(1) blur(40px) brightness(0.46);
|
| 1344 |
transform: scale(1.08);
|
| 1345 |
z-index: 0;
|
| 1346 |
}
|
|
|
|
| 1352 |
pointer-events: none;
|
| 1353 |
z-index: 1;
|
| 1354 |
background:
|
| 1355 |
+
radial-gradient(ellipse at 50% 36%, transparent 40%, rgba(4,3,8,0.68) 100%),
|
| 1356 |
+
linear-gradient(to bottom, rgba(6,4,12,0.48) 0%, transparent 13%);
|
| 1357 |
}
|
| 1358 |
|
| 1359 |
/* a subtle inner frame edge so the scene feels contained like the intro */
|
|
|
|
| 1367 |
max-height: 82vh;
|
| 1368 |
pointer-events: none;
|
| 1369 |
z-index: 2;
|
| 1370 |
+
box-shadow: inset 0 0 70px rgba(0,0,0,0.42);
|
| 1371 |
}
|
| 1372 |
|
| 1373 |
/* top bar: title + controls */
|
|
|
|
| 1403 |
/* corner drawers */
|
| 1404 |
.game-drawer {
|
| 1405 |
position: fixed;
|
| 1406 |
+
top: 58px;
|
| 1407 |
z-index: 8;
|
| 1408 |
+
width: min(280px, 24vw);
|
| 1409 |
+
min-width: 190px;
|
| 1410 |
+
max-height: calc(100vh - 80px);
|
| 1411 |
transition: max-height 0.45s ease, opacity 0.35s ease;
|
| 1412 |
overflow: hidden;
|
| 1413 |
+
opacity: 0.82;
|
| 1414 |
+
background: rgba(6,4,10,0.35);
|
| 1415 |
+
border: 1px solid rgba(60,45,80,0.35);
|
| 1416 |
+
border-radius: 4px;
|
| 1417 |
+
padding: 8px 10px;
|
| 1418 |
}
|
| 1419 |
.game-drawer:hover { opacity: 1; }
|
| 1420 |
+
.game-drawer.open { max-height: calc(100vh - 80px); }
|
| 1421 |
.game-drawer:not(.open) {
|
| 1422 |
+
max-height: 38px;
|
| 1423 |
cursor: pointer;
|
| 1424 |
}
|
| 1425 |
+
#drawer-left { left: 14px; }
|
| 1426 |
+
#drawer-right { right: 14px; }
|
| 1427 |
|
| 1428 |
.drawer-head {
|
| 1429 |
cursor: pointer;
|
| 1430 |
user-select: none;
|
| 1431 |
+
padding-bottom: 4px !important;
|
| 1432 |
+
border-bottom: 1px solid rgba(80,65,105,0.45);
|
| 1433 |
+
margin-bottom: 6px;
|
| 1434 |
}
|
| 1435 |
.drawer-head::after {
|
| 1436 |
content: ' ›';
|
| 1437 |
+
opacity: 0.65;
|
| 1438 |
margin-left: 6px;
|
| 1439 |
display: inline-block;
|
| 1440 |
transition: transform 0.3s ease;
|
|
|
|
| 1489 |
|
| 1490 |
.entity-glow {
|
| 1491 |
position: absolute;
|
| 1492 |
+
inset: 5% -10% 0 -10%;
|
| 1493 |
+
background: radial-gradient(ellipse 55% 70% at 50% 82%,
|
| 1494 |
+
rgba(160,140,190,0.28) 0%, transparent 72%);
|
| 1495 |
pointer-events: none;
|
| 1496 |
+
opacity: 0.85;
|
| 1497 |
mix-blend-mode: screen;
|
| 1498 |
}
|
| 1499 |
|
|
|
|
| 1511 |
}
|
| 1512 |
|
| 1513 |
#game-dialogue .chatbot {
|
| 1514 |
+
height: 220px !important;
|
| 1515 |
+
background: rgba(12,9,18,0.62) !important;
|
| 1516 |
border: 10px solid transparent !important;
|
| 1517 |
border-image: var(--stone-frame) 30 !important;
|
| 1518 |
box-shadow: var(--stone-bevel),
|
| 1519 |
0 -20px 60px rgba(0,0,0,0.55) !important;
|
| 1520 |
+
backdrop-filter: blur(3px);
|
| 1521 |
+
-webkit-backdrop-filter: blur(3px);
|
| 1522 |
+
padding: 12px 16px !important;
|
| 1523 |
}
|
| 1524 |
|
| 1525 |
#game-dialogue .bot,
|
|
|
|
| 1559 |
}
|
| 1560 |
|
| 1561 |
/* tone classes — the world blooms or rots */
|
| 1562 |
+
.tone-warm #game-bg { filter: grayscale(1) blur(40px) brightness(0.55); }
|
| 1563 |
.tone-warm #game-vig {
|
| 1564 |
background:
|
| 1565 |
+
radial-gradient(ellipse at 50% 36%, transparent 42%, rgba(4,3,8,0.50) 100%),
|
| 1566 |
+
linear-gradient(to bottom, rgba(6,4,12,0.35) 0%, transparent 13%);
|
| 1567 |
}
|
| 1568 |
+
.tone-warm .entity-img { filter: brightness(1.08) !important; }
|
| 1569 |
|
| 1570 |
+
.tone-neutral #game-bg { filter: grayscale(1) blur(40px) brightness(0.46); }
|
| 1571 |
|
| 1572 |
+
.tone-wounded #game-bg { filter: grayscale(1) blur(42px) brightness(0.34); }
|
| 1573 |
.tone-wounded #game-vig {
|
| 1574 |
background:
|
| 1575 |
+
radial-gradient(ellipse at 50% 36%, transparent 34%, rgba(4,3,8,0.78) 100%),
|
| 1576 |
+
linear-gradient(to bottom, rgba(6,4,12,0.62) 0%, transparent 13%);
|
| 1577 |
}
|
| 1578 |
+
.tone-wounded .entity-img { opacity: 0.82 !important; }
|
| 1579 |
|
| 1580 |
.tone-hostile #game-bg {
|
| 1581 |
+
filter: grayscale(1) blur(42px) brightness(0.28);
|
| 1582 |
}
|
| 1583 |
.tone-hostile #game-vig {
|
| 1584 |
background:
|
| 1585 |
+
radial-gradient(ellipse at 50% 36%, transparent 28%, rgba(30,4,8,0.78) 100%),
|
| 1586 |
+
linear-gradient(to bottom, rgba(40,6,12,0.48) 0%, transparent 20%);
|
| 1587 |
}
|
| 1588 |
.tone-hostile .entity-img {
|
| 1589 |
+
filter: sepia(0.22) saturate(1.35) brightness(0.88) !important;
|
| 1590 |
}
|
| 1591 |
|
| 1592 |
/* recall migration — the claimed memory drifts toward the child */
|