Pabloler21 commited on
Commit
fa34b01
·
1 Parent(s): 421c4e3

fix(game): base64 background + brighter scene so the silhouette reads

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. 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"></div><div id="game-vig"></div>'
 
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: #38305a !important;
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: -6%;
1337
- background-image: url('assets/background.webp');
1338
  background-size: cover;
1339
  background-position: center 38%;
1340
- filter: grayscale(1) blur(44px) brightness(0.30);
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 34%, rgba(4,3,8,0.78) 100%),
1353
- linear-gradient(to bottom, rgba(6,4,12,0.62) 0%, transparent 13%);
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 90px rgba(0,0,0,0.55);
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: 64px;
1404
  z-index: 8;
1405
- width: min(260px, 22vw);
1406
- min-width: 180px;
1407
- max-height: calc(100vh - 90px);
1408
  transition: max-height 0.45s ease, opacity 0.35s ease;
1409
  overflow: hidden;
1410
- opacity: 0.75;
 
 
 
 
1411
  }
1412
  .game-drawer:hover { opacity: 1; }
1413
- .game-drawer.open { max-height: calc(100vh - 90px); }
1414
  .game-drawer:not(.open) {
1415
- max-height: 42px;
1416
  cursor: pointer;
1417
  }
1418
- #drawer-left { left: 18px; }
1419
- #drawer-right { right: 18px; }
1420
 
1421
  .drawer-head {
1422
  cursor: pointer;
1423
  user-select: none;
1424
- padding-bottom: 6px !important;
1425
- border-bottom: 1px solid #1e1628;
1426
- margin-bottom: 8px;
1427
  }
1428
  .drawer-head::after {
1429
  content: ' ›';
1430
- opacity: 0.55;
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 0 0;
1486
- background: radial-gradient(ellipse 50% 60% at 50% 80%,
1487
- rgba(140,120,170,0.18) 0%, transparent 70%);
1488
  pointer-events: none;
1489
- opacity: 0.6;
1490
  mix-blend-mode: screen;
1491
  }
1492
 
@@ -1504,15 +1511,15 @@ footer { display: none !important; }
1504
  }
1505
 
1506
  #game-dialogue .chatbot {
1507
- height: 210px !important;
1508
- background: rgba(10,8,16,0.55) !important;
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(2px);
1514
- -webkit-backdrop-filter: blur(2px);
1515
- padding: 10px 14px !important;
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(44px) brightness(0.38); }
1556
  .tone-warm #game-vig {
1557
  background:
1558
- radial-gradient(ellipse at 50% 36%, transparent 38%, rgba(4,3,8,0.62) 100%),
1559
- linear-gradient(to bottom, rgba(6,4,12,0.45) 0%, transparent 13%);
1560
  }
1561
- .tone-warm .entity-img { filter: brightness(1.05) !important; }
1562
 
1563
- .tone-neutral #game-bg { filter: grayscale(1) blur(44px) brightness(0.30); }
1564
 
1565
- .tone-wounded #game-bg { filter: grayscale(1) blur(46px) brightness(0.22); }
1566
  .tone-wounded #game-vig {
1567
  background:
1568
- radial-gradient(ellipse at 50% 36%, transparent 30%, rgba(4,3,8,0.86) 100%),
1569
- linear-gradient(to bottom, rgba(6,4,12,0.75) 0%, transparent 13%);
1570
  }
1571
- .tone-wounded .entity-img { opacity: 0.78 !important; }
1572
 
1573
  .tone-hostile #game-bg {
1574
- filter: grayscale(1) blur(46px) brightness(0.20);
1575
  }
1576
  .tone-hostile #game-vig {
1577
  background:
1578
- radial-gradient(ellipse at 50% 36%, transparent 26%, rgba(30,4,8,0.82) 100%),
1579
- linear-gradient(to bottom, rgba(40,6,12,0.55) 0%, transparent 20%);
1580
  }
1581
  .tone-hostile .entity-img {
1582
- filter: sepia(0.25) saturate(1.4) brightness(0.85) !important;
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 */