/* Warstwa wizualna przeniesiona z demo/styl.css - to jest układ zwalidowany
   w nagraniu (materiał TVP3), więc nie wymyślamy go od nowa.
   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;
    --ciemne: #0a0907;
    --panel: #12161d;
    --przygas: #8b93a1;
    --czerwien: #c05a4a;
    --zielen: #6f9e6a;
    --blekit: #7fb2c4;
}

* { box-sizing: border-box; }

/* Atrybut hidden musi wygrywać z naszymi regułami display. Bez tego
   `#pasek { display: flex }` (specyficzność ID) bije domyślne
   `[hidden] { display: none }` z przeglądarki i dolny pasek daje się kliknąć
   na ekranie startowym - a wtedy silnik rysuje scenę bez wybranej lokacji. */
[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;
    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.czerwona { background: rgba(26, 18, 22, .94); border-color: rgba(192, 90, 74, .55); }

.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); }
.blekit  { color: var(--blekit); }
.zielen  { color: var(--zielen); }
.czerwien { color: var(--czerwien); }
.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;
    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[disabled] { opacity: .45; pointer-events: none; }

.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); }

.strzalka {
    width: 80px;
    text-align: center;
    font-size: 60px;
    opacity: .35;
    cursor: pointer;
}
.strzalka:hover { opacity: .7; }

.portret-duzy { width: 108px; height: 108px; border-radius: 999px; }
.portret-maly { width: 76px; height: 76px; border-radius: 999px; }

/* --------------------------------------------------------------- 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-zegar { right: 28px; font-variant-numeric: tabular-nums; }
#hud-zegar.kara { animation: puls-kara .8s ease; }

@keyframes puls-kara {
    0%   { color: var(--kosc); }
    30%  { color: var(--czerwien); transform: scale(1.12); }
    100% { color: var(--kosc); }
}

.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; }

.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.postac .kolko { border-color: var(--blekit); color: var(--blekit); }
.punkt.poszlaka .kolko { border-color: var(--zielen); color: var(--zielen); }
.punkt.bilbord .kolko { border-color: var(--przygas); color: var(--przygas); }
.punkt:hover .kolko { background: rgba(10, 9, 7, .9); transform: scale(1.08); }
.punkt.zebrany { opacity: .3; pointer-events: none; }

.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; }

/* Lokacja bez materiału: scena istnieje w grafie, grafika jeszcze nie. */
.zastepczy {
    left: 28px;
    top: 300px;
    width: 844px;
    padding: 40px;
    border-radius: 18px;
    border: 1.5px dashed rgba(201, 160, 74, .5);
    background: rgba(10, 9, 7, .9);
    font-size: 26px;
    line-height: 36px;
    text-align: center;
}
.zastepczy b { color: var(--zloto); display: block; margin-bottom: 14px; font-size: 30px; }

/* --------------------------------------------------------- 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);
}
.obwodka.bierna { border: 2px solid rgba(201, 160, 74, .3); }

#rozmowa-ujecie {
    position: absolute;
    top: 300px;
    height: 780px;
    left: 50%;
    transform: translateX(-50%);
}

.dymek {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 900px;
    height: 500px;
    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; }

.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;
}

.lista-napisy { font-size: 22px; line-height: 32px; opacity: .85; }
.lista-napisy .rola { display: block; font-size: 18px; letter-spacing: 2px; color: var(--zloto); margin-top: 14px; }
.lista-napisy a { color: var(--kosc); }

/* --------------------------------------------------------------- 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); }
