/* Demo Śledztwa dla sponsorów - warstwa wizualna.

   Podzbiór css/gra.css ze Śledztwa (repo tajemnice-trzebini-gra). Reguły są
   przepisane 1:1, żeby demo wyglądało dokładnie jak gra - wycięte jest tylko
   to, czego demo nie ma (odprawa, wybór postaci, plecak, wsparcie, zegar).

   Scena ma zawsze 900x1600 px i skaluje się transformem do okna: pion 9:16
   jest układem podstawowym, desktop dostaje ten sam kadr wyśrodkowany. */

:root {
    --zloto: #c9a04a;
    --kosc: #f2e6c9;
    --przygas: #8b93a1;
    --zielen: #6f9e6a;
    --blekit: #7fb2c4;
}

* { box-sizing: border-box; }

/* Atrybut hidden musi wygrywać z naszymi regułami display - inaczej selektor
   z ID bije domyślne [hidden] { display: none } z przeglądarki. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    height: 100%;
    background: #05070a;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    -webkit-text-size-adjust: 100%;
}

#scena-ramka {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scena {
    position: relative;
    /* flex-shrink wyłączony: bez tego na oknie węższym niż 900 px flexbox
       ściska makietę, a skala nakłada się dopiero na ściśniętą szerokość. */
    flex: 0 0 auto;
    width: 900px;
    height: 1600px;
    overflow: hidden;
    color: var(--kosc);
    background: #05070a;
    box-shadow: 0 0 80px rgba(0, 0, 0, .9);
    transform-origin: center center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* --------------------------------------------------------------- ekrany */

.ekran { position: absolute; inset: 0; display: none; }
.ekran.wlaczony { display: block; animation: wejscie .45s ease both; }

@keyframes wejscie {
    from { opacity: 0; transform: scale(1.015); }
    to   { opacity: 1; transform: none; }
}

.tlo { position: absolute; inset: 0; width: 900px; height: 1600px; object-fit: cover; }

.winieta {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(5, 7, 10, .85) 0%,
        rgba(5, 7, 10, .10) 20%,
        rgba(5, 7, 10, .18) 60%,
        rgba(5, 7, 10, .90) 100%);
}

/* --------------------------------------------------------------- klocki */

.el { position: absolute; }

.karta { position: absolute; background: rgba(18, 22, 29, .94); border-radius: 18px; }
.karta.ciemna { background: rgba(10, 9, 7, .95); }
.karta.obrys  { border: 1.5px solid rgba(201, 160, 74, .5); }

.karta.lista {
    max-height: 1000px;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 18px 42px;
}
.karta.lista::-webkit-scrollbar { display: none; }

.tytul-sekcji { font-size: 20px; font-weight: bold; letter-spacing: 1.6px; color: var(--zloto); }

.przygas { color: var(--przygas); }
.zloto   { color: var(--zloto); }
.zielen  { color: var(--zielen); }
.srodek  { text-align: center; }

.btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: rgba(201, 160, 74, .92);
    color: #1a1408;
    font-family: inherit;
    font-weight: bold;
    font-size: 26px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201, 160, 74, .3); }
.btn:active { transform: translateY(1px); }

.btn.pusty {
    background: rgba(18, 22, 29, .9);
    border: 1.5px solid rgba(201, 160, 74, .5);
    color: var(--kosc);
    font-weight: normal;
}
.btn.pusty:hover { border-color: var(--zloto); box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }

/* --------------------------------------------------------------- HUD */

#hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; }

.hud-pigulka {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    top: 40px;
    height: 62px;
    padding: 0 24px;
    border-radius: 999px;
    background: rgba(10, 9, 7, .72);
    border: 1.5px solid rgba(201, 160, 74, .5);
    font-size: 26px;
    pointer-events: auto;
}

#hud-lokacja { left: 28px; max-width: 560px; }
.hud-pigulka.powrot { cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.hud-pigulka.powrot:hover { background: rgba(10, 9, 7, .92); border-color: var(--zloto); }

/* --------------------------------------------------------- pasek dolny */

#pasek {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 900px;
    height: 132px;
    background: rgba(10, 9, 7, .96);
    border-top: 2px solid rgba(201, 160, 74, .4);
    display: flex;
    z-index: 21;
}

#pasek div {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--przygas);
    opacity: .7;
    cursor: pointer;
}

#pasek div span:first-child { font-size: 30px; color: var(--zloto); opacity: .8; }
#pasek div span:nth-child(2) { font-size: 20px; }
#pasek div b {
    position: absolute;
    top: 18px;
    right: 46px;
    font-size: 18px;
    color: var(--kosc);
}
#pasek div b.zmiana { animation: puls-licznik .7s ease; }
#pasek div:hover { opacity: 1; }
#pasek div.aktywny { color: var(--zloto); opacity: 1; }

@keyframes puls-licznik {
    0%   { color: var(--kosc); transform: none; }
    30%  { color: var(--zielen); transform: scale(1.6); }
    100% { color: var(--kosc); transform: none; }
}

/* --------------------------------------------------- eksploracja / punkty */

.panorama-viewport {
    position: absolute;
    left: 0;
    top: 0;
    width: 900px;
    height: 1600px;
    overflow: hidden;
    cursor: grab;
}

#e-scena.ciagnie .panorama-viewport { cursor: grabbing; }

.panorama-track { position: absolute; left: 0; top: 0; will-change: transform; }
.panorama-img { display: block; width: 100%; height: 100%; }

.strzalka-pan {
    position: absolute;
    top: 700px;
    width: 88px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--zloto);
    background: rgba(10, 9, 7, .45);
    opacity: .55;
    cursor: pointer;
    z-index: 5;
    user-select: none;
}
.strzalka-pan.lewo { left: 0; border-radius: 0 12px 12px 0; }
.strzalka-pan.prawo { right: 0; border-radius: 12px 0 0 12px; }
.strzalka-pan:hover { opacity: .95; }
#e-scena.bez-przewijania .strzalka-pan { display: none; }

/* Przełącznik pory doby. W grze noc jest kanoniczna, a dzień pokazuje miejsce
   takim, jakie jest naprawdę. W demo to jest pytanie do sponsora, więc pigułka
   siedzi na wierzchu i zapisuje wybór w adresie strony (?pora=). */
.przelacznik-pory {
    position: absolute;
    left: 28px;
    top: 118px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 24px;
    border-radius: 999px;
    background: rgba(10, 9, 7, .72);
    border: 1.5px solid rgba(201, 160, 74, .5);
    color: var(--kosc);
    font-size: 22px;
    cursor: pointer;
    z-index: 6;
    user-select: none;
    transition: border-color .15s ease, background .15s ease, opacity .2s ease;
}
.przelacznik-pory:hover { background: rgba(10, 9, 7, .92); border-color: var(--zloto); }
.przelacznik-pory .znak { color: var(--zloto); font-size: 26px; line-height: 1; }
.przelacznik-pory.laduje { opacity: .5; pointer-events: none; }

.punkt { position: absolute; transform: translate(-50%, -50%); cursor: pointer; }

.punkt .kolko {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(10, 9, 7, .66);
    border: 2.5px solid var(--zloto);
    color: var(--zloto);
    font-size: 24px;
}

.punkt.maly .kolko { width: 44px; height: 44px; }

.punkt .kolko::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: currentColor;
    opacity: .14;
    animation: puls 2.4s ease-out infinite;
}

@keyframes puls {
    0%   { transform: scale(1); opacity: .22; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { transform: scale(1.45); opacity: 0; }
}

.punkt .opis {
    margin: 12px auto 0;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(10, 9, 7, .8);
    color: var(--kosc);
    font-size: 20px;
    white-space: nowrap;
    text-align: center;
    opacity: .9;
}

.punkt .kolko img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.punkt.z-obrazkiem .kolko { background: rgba(10, 9, 7, .9); padding: 0; overflow: hidden; }

/* Bilbord sponsora jest szeroki, więc kółko robi się plakietką - okrągłe
   przycięcie zjadałoby połowę znaku. Tło jasne, bo to podświetlona reklama. */
.punkt.bilbord .kolko {
    width: 176px;
    height: 88px;
    border-radius: 12px;
    background: rgba(242, 230, 201, .93);
    border-color: rgba(201, 160, 74, .8);
    padding: 10px 14px;
}
.punkt.bilbord .kolko img { object-fit: contain; }

/* Sponsor, którego znak jest jasny (żółty napis, biały ornament), na kremowej
   plakietce by zniknął - dostaje ciemne tło polem "logoTlo": "ciemne".
   Ta sama zasada co w grze (sponsorzy.json). */
.punkt.bilbord .kolko.na-ciemnym {
    background: rgba(10, 9, 7, .88);
    border-color: rgba(201, 160, 74, .8);
}
.punkt.bilbord:hover .kolko.na-ciemnym { background: rgba(10, 9, 7, 1); }

/* Sponsor bez pliku z logo dostaje plakietkę z nazwą - pusty slot wygląda
   gorzej niż napis (potrzeby-biznesowe.md, 2.4). */
.punkt.bilbord .napis {
    color: #1a1408;
    font-size: 21px;
    font-weight: bold;
    line-height: 25px;
    letter-spacing: .5px;
    text-align: center;
}

.punkt.postac .kolko { border-color: var(--blekit); color: var(--blekit); }
.punkt.poszlaka .kolko { border-color: var(--zielen); color: var(--zielen); }
.punkt:hover .kolko { background: rgba(10, 9, 7, .9); transform: scale(1.08); }
.punkt.bilbord:hover .kolko { background: rgba(242, 230, 201, 1); }
.podpowiedz-przeciagania {
    position: absolute;
    left: 28px;
    bottom: 232px;
    width: 844px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(10, 9, 7, .7);
    font-size: 22px;
    opacity: .5;
    transition: opacity .4s ease;
    pointer-events: none;
}
.podpowiedz-przeciagania.schowana { opacity: 0; }

/* --------------------------------------------------------- przesłuchanie */

.portret { position: absolute; width: 84px; height: 84px; border-radius: 999px; }

.obwodka {
    position: absolute;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(10, 9, 7, .8);
    border: 3px solid var(--zloto);
}

/* Ujęcie postaci jest zakotwiczone DOLNĄ krawędzią na górze dymka - inaczej
   przy niższym kadrze zostaje szpara, przez którą prześwituje ulica. */
#rozmowa-ujecie {
    position: absolute;
    bottom: 600px;
    left: 50%;
    transform: translateX(-50%);
    max-height: 700px;
    width: auto;
}

.dymek {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 900px;
    height: 600px;
    background: rgba(10, 9, 7, .96);
    border-top: 2px solid rgba(201, 160, 74, .55);
}

.pole {
    position: absolute;
    display: flex;
    align-items: center;
    background: rgba(27, 31, 39, .95);
    border: 1.5px solid rgba(201, 160, 74, .5);
    border-radius: 12px;
    padding: 0 24px;
}

.pole input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--kosc);
    font-family: inherit;
    font-size: 26px;
}

.pole input::placeholder { color: var(--kosc); opacity: .45; }
.pole .wyslij { color: var(--zloto); font-size: 28px; cursor: pointer; padding-left: 16px; }

/* Gotowe pytania: w grze gracz pisze własnymi słowami, ale w demo nikt nie ma
   ochoty wymyślać pierwszego pytania - podpowiadamy trzy, a i tak wchodzą tą
   samą drogą co tekst wpisany ręcznie. */
.podpowiedzi {
    position: absolute;
    left: 48px;
    top: 376px;
    width: 804px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.podpowiedzi span {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1.5px solid rgba(201, 160, 74, .45);
    color: var(--kosc);
    font-size: 21px;
    opacity: .85;
    cursor: pointer;
}
.podpowiedzi span:hover { border-color: var(--zloto); opacity: 1; }

.kursor::after {
    content: "";
    display: inline-block;
    width: 3px;
    height: 26px;
    margin-left: 4px;
    vertical-align: -4px;
    background: var(--zloto);
    animation: mruga .9s steps(1) infinite;
}

@keyframes mruga { 50% { opacity: 0; } }

/* ------------------------------------------------------ listy i napisy */

.wpis { margin-bottom: 26px; display: flex; gap: 16px; }
.wpis .znak { font-size: 26px; line-height: 30px; }
.wpis .tresc { font-size: 26px; line-height: 34px; }
.wpis .skad { display: block; font-size: 19px; opacity: .6; margin-top: 6px; }
.wpis.os-czasu .godzina { color: var(--zloto); font-size: 24px; min-width: 90px; }

.naglowek-listy {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1.6px;
    color: var(--zloto);
    margin: 8px 0 22px;
}

/* --------------------------------------------------------------- toast */

#toast {
    position: absolute;
    left: 50%;
    top: 210px;
    transform: translate(-50%, -14px);
    max-width: 760px;
    padding: 18px 34px;
    border-radius: 14px;
    background: rgba(10, 9, 7, .94);
    border: 1.5px solid rgba(201, 160, 74, .6);
    font-size: 25px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 30;
}

#toast.widoczny { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------ ekran końcowy */

.wybor-pory { position: absolute; display: flex; gap: 18px; }
.wybor-pory a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 118px;
    border-radius: 14px;
    border: 1.5px solid rgba(201, 160, 74, .5);
    background: rgba(18, 22, 29, .9);
    color: var(--kosc);
    font-size: 25px;
    text-decoration: none;
}
.wybor-pory a .znak { font-size: 30px; color: var(--zloto); }
.wybor-pory a.teraz { border-color: var(--zloto); background: rgba(201, 160, 74, .16); }
.wybor-pory a:hover { border-color: var(--zloto); }
