/* 3D-Thema: ruhige Fantasy-Fenster, leicht durchscheinend, goldener Rand.
   Lese- und Antwortbereiche bleiben hell, damit Texte gut lesbar sind. */

:root {
  --glas: rgba(22, 20, 34, 0.88);
  --glas-2: rgba(34, 30, 52, 0.92);
  --goldrand: #c9a24e;
  --hell: #f5efe2;
  --hell-2: #c8bfae;
  --gold-text: #f2cf74;
  --titelschrift: "Cinzel", Georgia, "Times New Roman", serif;
}

body { background: #10121a; }
#spiel canvas { image-rendering: auto; }

#hud { background: linear-gradient(rgba(20, 18, 30, .92), rgba(20, 18, 30, .78)); border-bottom: 1px solid var(--goldrand); }
#hud-name { font-family: var(--titelschrift); color: var(--gold-text); }
#hud-bild { width: 38px; height: 38px; border-radius: 8px; border: 2px solid var(--goldrand); image-rendering: pixelated; }
.hud-knoepfe button { background: rgba(255, 255, 255, .06); border: 1px solid rgba(201, 162, 78, .6); border-radius: 999px; padding: 5px 12px; }
.hud-knoepfe button:hover { background: rgba(255, 255, 255, .14); }
#hud-xp-fuellung { background: linear-gradient(90deg, #b8862a, #f2cf74); }
#hinweis { background: var(--glas); border: 1px solid var(--goldrand); border-radius: 999px; padding: 7px 16px; backdrop-filter: blur(4px); }

#overlay { background: rgba(8, 8, 14, .35); }
#fenster {
  background: linear-gradient(var(--glas-2), var(--glas));
  color: var(--hell);
  border: 1px solid var(--goldrand);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
}
#fenster h2, #fenster h3, .titelbild h1 { font-family: var(--titelschrift); color: var(--gold-text); letter-spacing: .5px; }
.sprecher { font-family: var(--titelschrift); color: var(--gold-text); font-size: 19px; }
.rede { font-size: 18px; }
.untertitel, .fortschritt, .wortzahl, .spott, .titelbild p, .titel-steuerung, .pass-ansicht dt { color: var(--hell-2); }
.titel-version { color: #9fd8ff; font-family: var(--titelschrift); }
.ziel-liste li { border-color: rgba(201, 162, 78, .25); }
.ziel-liste li.erledigt { color: #8a8478; }

.portrait {
  width: 128px; height: 128px; image-rendering: pixelated;
  border: 3px solid var(--goldrand); border-radius: 10px; background: #000;
  box-shadow: 0 0 0 2px #00000080, 0 4px 18px rgba(0, 0, 0, .5);
}
.kampf-kopf .portrait { width: 128px; height: 128px; }
.dialog { align-items: center; }

.lesetext, .stichpunkte, .gegenstand, .feedback { color: #2b2116; }
.lesetext { background: #f6f0dc; }
.gegenstand { background: #f6f0dc; }
.knopf { border-radius: 999px; }
.knopf.zweitrangig { color: var(--hell-2); border-color: rgba(201, 162, 78, .7); }
.knopf.zweitrangig:hover { color: #fff; }
.rf-zeile, .zuordnen-tabelle td { border-color: rgba(201, 162, 78, .25); }
.analyse li.ok { color: #8af09a; }
.analyse li.fehlt { color: #ff9a9a; }
.analyse li.halb { color: #ffd27a; }
.lp-balken { border-color: var(--goldrand); }
.klasse { background: #f6f0dc; }
.klasse img { width: 72px; height: 72px; border-radius: 8px; image-rendering: pixelated; }
.titelbild img { border-radius: 12px; border: 3px solid var(--goldrand); }
#overlay.gespraech { background: linear-gradient(transparent 50%, rgba(8, 8, 14, .55)); }
#overlay.gespraech #fenster { width: min(820px, 100%); }
@media (max-width: 760px) {
  .portrait { width: 88px; height: 88px; }
  .kampf-kopf .portrait { width: 88px; height: 88px; }
}

/* Schmale Handys: Knöpfe der Kopfleiste kompakter, damit alle (auch ☰) sichtbar bleiben */
@media (max-width: 480px) {
  .hud-knoepfe { gap: 4px; }
  .hud-knoepfe button { padding: 4px 8px; }
}

/* Kompass oben rechts im Spielbild */
.kompass { position: absolute; top: 10px; right: 10px; width: 62px; height: 62px; border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle, rgba(30, 26, 44, .82) 60%, rgba(20, 18, 30, .9)); border: 2px solid var(--goldrand); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.kompass-rose { position: absolute; inset: 0; }
.kompass-rose span { position: absolute; left: 50%; top: 50%; font: bold 12px/1 var(--titelschrift); color: #e8dcc0; }
.kompass-rose .k-n { color: #ff6a5a; transform: translate(-50%, -26px); font-size: 14px; }
.kompass-rose .k-s { transform: translate(-50%, 14px); }
.kompass-rose .k-o { transform: translate(15px, -50%); }
.kompass-rose .k-w { transform: translate(-25px, -50%); }
.kompass-rose i { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -100%);
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 16px solid #ff6a5a; }
body:not(.im-spiel) .kompass { display: none; }
@media (max-width: 640px) { .kompass { width: 50px; height: 50px; top: 8px; right: 8px; } .kompass-rose .k-n { transform: translate(-50%, -22px); } .kompass-rose .k-s { transform: translate(-50%, 11px); } .kompass-rose .k-o { transform: translate(11px, -50%); } .kompass-rose .k-w { transform: translate(-20px, -50%); } }

/* Zwischensequenz: schwarze Kinobalken, Bedienelemente ausgeblendet */
#spiel::before, #spiel::after { content: ""; position: absolute; left: 0; right: 0; height: 0; background: #000; z-index: 5; pointer-events: none; transition: height .9s ease; }
#spiel::before { top: 0; }
#spiel::after { bottom: 0; }
body.kino #spiel::before, body.kino #spiel::after { height: 11vh; }
#hud, .kompass, #joystick, #aktion-knopf { transition: opacity .6s; }
body.kino #hud, body.kino .kompass, body.kino #joystick, body.kino #aktion-knopf, body.kino #hinweis { opacity: 0; pointer-events: none; }
.ton-schalter { color: var(--hell); border-color: rgba(201, 162, 78, .7); background: rgba(255, 255, 255, .06); }
.ton-schalter:hover { background: rgba(255, 255, 255, .14); }

.hilfsmittel-menue { background: #1d1b2c; border-color: rgba(201, 162, 78, .7); color: #f0e8d8; }
.hilfsmittel-eintrag { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); }
.hilfsmittel-eintrag:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }

.dsd-bezug { background: rgba(242, 207, 116, .12); color: var(--gold-text); border-color: rgba(201, 162, 78, .7); }

.aussehen-portrait { border-color: var(--goldrand); }
.aussehen .wahl { background: rgba(255, 255, 255, .06); color: var(--hell); border-color: rgba(201, 162, 78, .6); }
.aussehen .wahl.gewaehlt { background: rgba(242, 207, 116, .2); border-color: var(--gold-text); color: var(--gold-text); }
.aussehen .farbfeld { border-color: #fff5; }
.aussehen .farbfeld.gewaehlt { outline-color: var(--gold-text); }
