/* ==========================================================================
   GŁÓWNY ARKUSZ STYLÓW - JASKINIA BAZYLISZKA
   ========================================================================== */

/* =========================================
   1. CZCIONKI I ZMIENNE
   ========================================= */

@font-face {
    font-family: 'undertaleFont';
    src: url('../fonts/undertale-font.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SegoeUIEmoji';
    src: url('../fonts/seguiemj_w11.ttf') format('ttf');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #000000;      
    --main-color: #e08b1b;    
    --highlight: #ffcc00;    
    --font-stack: 'undertaleFont', 'SegoeUIEmoji', 'Courier New', Courier, monospace; 
}

/* =========================================
   2. USTAWIENIA GLOBALNE I TŁO
   ========================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-stack);
    background-color: #000000;
    color: var(--main-color);
    height: 100vh;
    overflow: hidden;

    /* TŁO PIXEL ART */
    background-image: url('../images/background1.png');
    background-size: contain;       
    background-position: center center;  
    background-repeat: no-repeat;
    
    image-rendering: pixelated; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Klasa pomocnicza do ukrywania */
.hidden { display: none !important; }

/* Specyficzne tło dla Strony Głównej (index.html) */
.home-body {
    /* Upewniamy się, że ładuje odpowiedni obrazek */
    background-image: url('../images/background1.png');
    
    /* 1. POWIĘKSZENIE (ZOOM) */
    /* Ustawiamy szerokość na 125% ekranu (możesz zwiększyć do 130-140% jeśli chcesz większy zoom) */
    /* 'auto' oznacza, że wysokość dostosuje się proporcjonalnie */
    background-size: 133% auto;

    /* 2. PRZESUNIĘCIE I UCIĘCIE */
    /* Pierwsza wartość (20%) to pozycja w poziomie (X) */
    /* 0% = idealnie do lewej (prawa strona mocno ucięta) */
    /* 50% = środek (utnie po równo z obu stron) */
    /* 20% = Przesunięte w lewo, więc prawa strona obrazka znika za ekranem */
    background-position: -6% center;

    background-repeat: no-repeat;
    
    /* Ważne dla układu Flexbox na głównej */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* WERSJA MOBILNA - Tutaj zazwyczaj chcemy widzieć więcej */
@media (max-width: 1023px) {
    .home-body {
        background-size: cover; /* Na telefonie wypełniamy cały ekran */
        background-position: center center; /* Centrujemy */
    }
}

/* =========================================
   3. EKRAN ŁADOWANIA (SPLASH SCREEN)
   ========================================= */

#splash {
    position: fixed; inset: 0; 
    background-color: var(--bg-color);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 99999; 
    transition: opacity 0.5s ease;
    color: var(--main-color);
    font-weight: bold;
}

.loader {
    width: 40px; height: 40px; 
    border: 4px solid var(--main-color); 
    border-top-color: var(--highlight);
    border-radius: 0;
    animation: spin 1s steps(8) infinite;
    margin-bottom: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   4. EKRAN GŁÓWNY (INTRO / INDEX)
   ========================================= */

.intro {
    position: relative;
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 5vw;
    z-index: 10;
}

.intro-left {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85); 
    border: 2px solid var(--main-color);
    max-width: 320px;
    width: 100%;
    box-shadow: 4px 4px 0px var(--main-color);
    z-index: 10;
}

.welcome {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    border-bottom: 2px dashed var(--main-color);
    padding-bottom: 0.8rem;
}

.options { display: flex; flex-direction: column; gap: 8px; }

.option {
    text-decoration: none;
    color: var(--main-color);
    font-size: 1rem;
    font-weight: bold;
    padding: 6px 10px;
    border: 2px solid transparent;
    transition: all 0.1s steps(2);
    display: block;
}

.option:hover {
    color: #000000;
    background-color: var(--highlight);
    border-color: var(--highlight);
    box-shadow: 0 0 10px var(--highlight);
    transform: translateX(4px);
}

/* Upewniamy się, że prawa kolumna centruje swoją zawartość */
.intro-right {
    display: flex;
    justify-content: center; /* Środek w poziomie */
    align-items: center;     /* Środek w pionie */
    height: 100%;            /* Musi zajmować całą wysokość, żeby align-items działało */
    padding: 20px;           /* Odstęp od krawędzi, żeby terminal nie dotykał ekranu na mobile */
}
.character {
    position: absolute; bottom: 300px; right: 10%;    
    width: min(35vw, 400px);
    filter: sepia(100%) hue-rotate(-30deg) saturate(150%) contrast(110%);
}

.typing-cursor:after {
    content: '█'; animation: blink 1s step-start infinite; margin-left: 2px; color: var(--main-color);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* =========================================
   5. UI KOMPONENTY (DIALOG, MUTE, OGIEŃ)
   ========================================= */

/* Dialog RPG */
.dialogue-container {
    position: fixed; bottom: 30px; left: 50%; 
    
    /* Pozycja końcowa (widoczny) */
    transform: translateX(-50%) translateY(0) scale(1);
    
    width: 90%; max-width: 800px; 
    opacity: 1;
    
    display: flex; /* To jest kluczowe */
    align-items: center; gap: 20px;
    
    background: rgba(0, 0, 0, 0.95);
    border: 4px solid var(--main-color);
    box-shadow: 0 0 0 4px #000, 0 0 20px rgba(224, 139, 27, 0.3);
    padding: 20px; z-index: 100;
    
    /* ANIMACJA: Płynne wejście i wyjście */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

/* Stan ukryty (Nadpisujemy globalne .hidden) */
.dialogue-container.hidden {
    /* WAŻNE: Musimy nadpisać globalne display:none, żeby animacja działała! */
    display: flex !important; 
    
    opacity: 0;
    /* Przesunięcie w dół i lekkie zmniejszenie */
    transform: translateX(-50%) translateY(50px) scale(0.9); 
    
    pointer-events: none; /* Żeby nie dało się kliknąć ukrytego */
}

/* Avatar w dialogu */
.dialogue-avatar img {
    width: 100px; height: 100px; border: 2px solid var(--main-color);
    background-color: #1a1a1a; image-rendering: pixelated; display: block; 
    box-shadow: 4px 4px 0 #000;
}

/* Treść dialogu */
.dialogue-content { 
    flex: 1; 
    font-size: 1rem; 
    color: #fff; 
    text-shadow: 1px 1px 0 #000;
    /* Ustawiamy minimalną wysokość, żeby okno nie skakało przy pisaniu */
    min-height: 3.6em; 
    display: flex;
    align-items: center;
}

/* --- ANIMACJA KURSORA (█) --- */
/* Kursor miga tylko gdy dodana jest klasa .typing-cursor przez JS */
.typing-cursor::after {
    content: '█'; 
    display: inline-block;
    animation: blink 0.8s step-start infinite; 
    margin-left: 4px; 
    color: var(--main-color);
    vertical-align: bottom; /* Poprawia ułożenie kursora względem tekstu */
}

@keyframes blink { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0; } 
}

/* Przycisk Mute */
.mute-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 1000;
    background: transparent; border: 2px solid transparent;
    color: var(--main-color); font-family: var(--font-stack); font-weight: bold; cursor: pointer;
    padding: 5px 10px; opacity: 1; transition: opacity 0.5s;
}
.mute-toggle.hidden { opacity: 0; pointer-events: none; }
.mute-toggle:hover { border-color: var(--main-color); background: rgba(0,0,0,0.8); }

/* Cząsteczki Ognia */
.fire-particle {
    position: fixed; bottom: 0; width: 4px; height: 4px;
    background-color: var(--highlight); box-shadow: 0 0 4px var(--main-color);
    pointer-events: none; z-index: 1; opacity: 0;
    animation: flyUpAndFade linear infinite;
}
@keyframes flyUpAndFade {
    0% { opacity: 0; bottom: 0; transform: translateX(0); }
    10% { opacity: 1; }
    100% { opacity: 0; bottom: 60vh; transform: translateX(var(--sway)); }
}

/* === ZAAWANSOWANY PANEL AUDIO === */
.audio-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    
    display: flex;
    align-items: center;
    gap: 5px;
    
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--main-color);
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 0 10px #000;
}

.audio-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--main-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.audio-btn:hover {
    background: rgba(224, 139, 27, 0.2);
    box-shadow: 0 0 5px var(--main-color);
}

/* Stan wyłączony (czerwony/szary) */
.audio-btn.muted {
    color: #555; /* Szary */
    text-decoration: line-through; /* Przekreślenie */
    opacity: 0.7;
}

/* Separator pionowy */
.audio-separator {
    width: 1px;
    height: 20px;
    background: var(--main-color);
    opacity: 0.5;
    margin: 0 5px;
}

/* Przycisk Sekretu w Panelu Audio */
#btn-secret {
    transition: all 0.5s;
}

/* Stan Zablokowany (Domyślny) */
.secret-locked {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Stan Odblokowany (Po wpisaniu hasła) */
.secret-unlocked {
    filter: grayscale(0%);
    opacity: 1;
    color: var(--highlight); /* Np. #ffeeb0 */
    text-shadow: 0 0 10px var(--main-color);
    animation: pulseSecret 2s infinite;
}

@keyframes pulseSecret {
    0% { transform: scale(1); text-shadow: 0 0 5px var(--main-color); }
    50% { transform: scale(1.2); text-shadow: 0 0 20px var(--highlight); }
    100% { transform: scale(1); text-shadow: 0 0 5px var(--main-color); }
}

/* =========================================
   6. PODSTRONY (LAYOUT O MNIE)
   ========================================= */

.subpage-body {
    background-image: url('../images/background2.png');
    background-size: cover; background-attachment: fixed;
    display: block; overflow: hidden;
}

.layout-container {
    display: grid; grid-template-columns: 250px 1fr;
    height: 100vh; width: 100vw;
    background: transparent; 
}

/* Sidebar (Lewa strona) */
.sidebar {
    background: rgba(10, 10, 10, 0.95); border-right: 4px solid var(--main-color);
    padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 10px 0 20px rgba(0,0,0,0.5); z-index: 50;
}
.sidebar-header {
    font-size: 1.5rem; text-align: center; border-bottom: 2px dashed var(--main-color);
    padding-bottom: 15px; margin-bottom: 20px; color: var(--highlight);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 15px; }
/* Elementy nawigacji */
.nav-item {
    text-decoration: none;
    color: var(--main-color);
    font-size: 1.1rem;
    padding: 10px;
    border: 1px solid transparent; /* Rezerwacja miejsca */
    transition: 0.2s;
    display: block; /* Żeby wypełniał szerokość */
}

.nav-item:hover, .nav-item.active {
    background: var(--main-color); /* Pełne tło */
    color: #000; /* Czarny tekst */
    box-shadow: 0 0 10px var(--main-color); /* Poświata */
    border-color: var(--main-color);
    transform: translateX(5px);
}
.sidebar-footer { font-size: 0.8rem; text-align: center; opacity: 0.7; margin-top: auto; }

/* Content Area (Środek/Prawa strona) */
.content-area {
    padding: 40px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--main-color) #000;
}
.content-area::-webkit-scrollbar { width: 10px; }
.content-area::-webkit-scrollbar-track { background: #000; }
.content-area::-webkit-scrollbar-thumb { background-color: var(--main-color); border: 2px solid #000; }

.section-title {
    font-size: 2rem; color: var(--highlight); border-bottom: 4px solid var(--main-color);
    display: inline-block; margin-bottom: 30px; padding-right: 50px; text-shadow: 2px 2px 0 #000;
    background: rgba(0,0,0,0.7);
    padding: 5px 50px 5px 10px;
}

/* Sekcje treści */
.rpg-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Lista faktów */
.rpg-list {
    list-style: none; background: rgba(0, 0, 0, 0.9); border: 2px solid var(--main-color);
    padding: 20px; max-width: 600px; box-shadow: 5px 5px 0 #000;
}
.rpg-list li { margin-bottom: 12px; font-size: 1.1rem; padding-left: 25px; position: relative; }
.rpg-list li::before { content: '⚔'; position: absolute; left: 0; color: var(--highlight); font-size: 0.9rem; top: 2px; }

/* =========================================
   7. SEKCJA GIER (GAMES)
   ========================================= */

/* Nagłówki sekcji (Zwijane) */
.subsection-title {
    color: #fff; font-size: 1.2rem; margin: 20px 0 15px 0; text-transform: uppercase; letter-spacing: 1px;
    border-left: 4px solid var(--highlight); padding-left: 10px;
    cursor: pointer; user-select: none; display: flex; justify-content: space-between; align-items: center;
    padding-right: 10px; background: rgba(0, 0, 0, 0.8); transition: background 0.2s;
    max-width: 100%;
}
.subsection-title:hover { background: rgba(255, 204, 0, 0.2); }
.arrow { font-size: 0.8rem; transition: transform 0.2s ease; }
.subsection-title.closed .arrow { transform: rotate(-90deg); }

/* Siatka gier (GRID) */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px; margin-bottom: 40px;
    opacity: 1; height: auto; overflow: visible;
}

/* ZWINIĘTE SEKCJE - UKRYCIE ABSOLUTNE */
.games-grid.collapsed { display: none !important; }

/* Kafelek Gry */
.game-card {
    position: relative; background: #000; border: 2px solid var(--main-color);
    border-radius: 4px; overflow: hidden; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 2/3; box-shadow: 0 4px 0 rgba(0,0,0,0.5);
}
.game-card:hover, .game-card.active { transform: translateY(-5px); box-shadow: 0 8px 0 var(--main-color); border-color: var(--highlight); }

/* Okładka (Domyślnie szara) */
.game-cover {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%); opacity: 0.7;
    transition: all 0.4s ease;
}
/* Po najechaniu (Kolor) */
.game-card:hover .game-cover,
.game-card.active .game-cover {
    filter: grayscale(0%); opacity: 1;
}

/* Nakładka z linkami */
.game-info {
    position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.9);
    padding: 8px; text-align: center; border-top: 1px solid var(--main-color); z-index: 2;
}
.game-info h4 { font-size: 0.85rem; margin: 0; color: var(--main-color); }

.game-links {
    position: absolute; inset: 0; background: rgba(0, 0, 0, 0.95);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px;
    opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 3;
}
.game-card.active .game-links { opacity: 1; pointer-events: auto; }
.game-btn {
    padding: 8px 16px; background: var(--main-color); color: #000; text-decoration: none;
    font-weight: bold; font-size: 0.9rem; border: 2px solid #000; box-shadow: 3px 3px 0 #fff;
    cursor: pointer;
}
.game-btn:hover { background: var(--highlight); }

/* Feedback przy kopiowaniu */
.copy-feedback {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--highlight); color: #000; padding: 5px 10px; font-weight: bold;
    border: 2px solid #000; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 10;
}
.game-card.copied .copy-feedback { opacity: 1; animation: popUp 0.5s ease-out; }
@keyframes popUp { 0% { transform: translate(-50%, -30%); opacity: 0; } 50% { transform: translate(-50%, -60%); opacity: 1; } 100% { transform: translate(-50%, -50%); opacity: 1; } }

/* =========================================
   8. MEDIA I MUZYKA (GŁÓWNY WIDGET)
   ========================================= */

.spotify-widget {
    background: #1DB954; color: #000; padding: 20px; border-radius: 8px;
    display: flex; align-items: center; gap: 20px; margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.4); border: 2px solid #000; transition: all 0.3s ease;
    max-width: 600px; 
}
.sp-art-wrapper {
    width: 80px; height: 80px; flex-shrink: 0; background: #000; border: 2px solid #000;
    border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.spotify-icon { font-size: 2.5rem; color: #1DB954; }
.spotify-art { width: 100%; height: 100%; object-fit: cover; }
.spotify-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.sp-status { font-size: 0.7rem; font-weight: bold; opacity: 0.8; margin-bottom: 2px;}
.sp-track { font-size: 1.2rem; font-weight: bold; line-height: 1.2; color: #000; cursor: default; }
.sp-artist { font-size: 1rem; opacity: 0.9; margin-bottom: 8px; }

/* Pasek Postępu (Duży) */
.sp-progress-bg {
    width: 100%; height: 8px; background: rgba(0, 0, 0, 0.3);
    border-radius: 4px; overflow: hidden; margin-bottom: 4px; border: 1px solid rgba(0,0,0,0.5);
}
.sp-progress-fill { height: 100%; background: #000; width: 0%; transition: width 1s linear; }
.sp-time-labels { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: bold; opacity: 0.8; }

/* Listy Playlist */
.music-track-list { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; }
.track-item {
    background: rgba(0,0,0,0.8); border: 1px solid var(--main-color); padding: 10px;
    display: flex; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s; flex: 1 1 200px;
}
.track-item:hover { background: var(--main-color); color: #000; }
.track-item img { width: 40px; height: 40px; border-radius: 4px; }
.track-details { display: flex; flex-direction: column; }
.t-title { font-weight: bold; font-size: 0.9rem; }

/* =========================================
   9. GLOBALNY MINI WIDGET (DUAL MODE)
   ========================================= */

.mini-player-container {
    position: fixed; bottom: 20px; left: 20px; z-index: 99999;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--main-color); border-radius: 12px;
    width: 300px; height: 95px; 
    box-shadow: 5px 5px 0 #000;
    
    /* Drag & Drop */
    cursor: grab; user-select: none; touch-action: none;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(200%);
    
    display: flex; justify-content: center; align-items: center;
    overflow: visible; 
}
.mini-player-container.visible { transform: translateY(0); }
.mini-player-container:active { cursor: grabbing; }

/* Przycisk przełączania (Tab) */
.mini-toggle {
    position: absolute; top: 5px; right: 5px; z-index: 10;
    background: transparent; border: none; color: #555;
    font-size: 1.2rem; cursor: pointer; transition: 0.2s;
}
.mini-toggle:hover { color: var(--main-color); transform: scale(1.1); }

/* System Warstw (Layers) */
.mini-layer {
    position: absolute; inset: 0; padding: 10px;
    display: flex; align-items: center; gap: 15px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%; height: 100%;
}
.mini-layer.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.mini-layer.hidden-layer { opacity: 0; transform: translateX(-20px); pointer-events: none; }

/* --- WARSTWA 1: MUZYKA --- */
.vinyl-wrapper {
    position: relative; width: 70px; height: 70px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid #333; overflow: hidden; background: #111; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
#mini-art { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vinyl-hole {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 15px; height: 15px; background: #000; border: 2px solid var(--main-color); border-radius: 50%; z-index: 2;
}
.spinning { animation: spinVinyl 4s linear infinite; }
@keyframes spinVinyl { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Info playera */
.player-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; margin-right: 20px; }
/* Kontener tekstu (Musi ucinać nadmiar) */
.scrolling-text {
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 2px;
    width: 100%; /* Wykorzystaj całą dostępną szerokość */
    position: relative;
    /* Opcjonalnie: Delikatne wygaszanie po bokach */
    mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

#mini-song {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    display: inline-block; /* Konieczne do animacji */
    transform: translateX(0); /* Pozycja startowa */
}

/* Klasa dodawana przez JS, gdy tekst jest za długi */
.scrolling {
    /* Czas trwania obliczany przez JS (var --duration) */
    animation: scroll-text var(--duration, 10s) linear infinite;
}

/* Animacja: Czekaj -> Przewiń do końca -> Czekaj -> Wróć */
@keyframes scroll-text {
    0%, 20% { 
        transform: translateX(0); 
    }
    70%, 90% { 
        /* Przesuń o tyle, ile wystaje tekst (zmienna z JS) */
        transform: translateX(calc(-1 * var(--scroll-diff))); 
    }
    100% {
        transform: translateX(0); /* Wróć płynnie lub skokiem (zależnie od preferencji) */
    }
}
#mini-artist { font-size: 0.75rem; color: var(--main-color); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bar-bg { width: 100%; height: 6px; background: #333; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.progress-fill { height: 100%; background: #1DB954; width: 0%; transition: width 0.5s linear; }
.time-labels { display: flex; justify-content: space-between; font-size: 0.65rem; color: #888; }

/* --- WARSTWA 2: PROFIL --- */
.profile-avatar-wrapper { position: relative; width: 70px; height: 70px; flex-shrink: 0; }
#prof-avatar { width: 100%; height: 100%; border-radius: 12px; border: 2px solid var(--main-color); object-fit: cover; }
.status-dot-large {
    position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%;
    border: 3px solid #000; box-shadow: 0 0 5px #000;
}
.st-online { background: #43b581; }
.st-idle { background: #faa61a; }
.st-dnd { background: #f04747; }
.st-offline { background: #747f8d; }

.prof-name { font-size: 1rem; font-weight: bold; color: #fff; margin-bottom: 4px; }
.prof-desc { font-size: 0.75rem; color: #ccc; margin-bottom: 6px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prof-badge {
    background: var(--main-color); color: #000; font-size: 0.6rem; font-weight: bold;
    padding: 2px 6px; border-radius: 4px; display: inline-block; align-self: flex-start;
}

/* MASKOTKA NA PLAYERZE */
.mini-mascot {
    position: absolute;
    
    /* Ustawiamy ją NA GÓRZE ramki */
    bottom: 100%; /* 100% wysokości od dołu = zaczyna się na górnej krawędzi */
    right: 30px;  /* Przesunięcie w prawo (możesz zmienić na left lub center) */
    
    /* Rozmiar GIF-a (dostosuj do swojego obrazka) */
    height: 50px; 
    width: auto;
    
    /* Pixel art look */
    image-rendering: pixelated;
    
    /* Żeby nie przeszkadzała w klikaniu myszką */
    pointer-events: none; 
    
    /* Opcjonalnie: Lekkie przesunięcie w dół, żeby "stała" na ramce */
    margin-bottom: -2px;
    z-index: 1;
}

/* Opcjonalnie: Animacja pojawiania się razem z playerem */
.mini-player-container.hidden .mini-mascot {
    opacity: 0;
}
.mini-player-container.visible .mini-mascot {
    transition: opacity 0.5s ease 0.2s; /* Lekkie opóźnienie */
    opacity: 1;
}

/* =========================================
   10. RESPONSYWNOŚĆ (MEDIA QUERIES)
   ========================================= */

/* TABLET I MOBILE (< 1024px) */
@media (max-width: 1023px) {
    .intro { grid-template-columns: 1fr; }
    .intro-left { margin-top: -100px; }
    .character { right: 50%; transform: translateX(50%); width: 60vw; bottom: -20px; opacity: 0.6; }
    .layout-container { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .sidebar { flex-direction: row; border-right: none; border-bottom: 4px solid var(--main-color); overflow-x: auto; }
    .sidebar-header, .sidebar-footer { display: none; }
    .sidebar-nav { flex-direction: row; width: 100%; justify-content: space-around; }
}

/* PC (> 1024px) - UKŁAD Z TŁEM PO PRAWEJ */
@media (min-width: 1024px) {
    .rpg-section {
        max-width: 860px; 
        margin-right: auto;
    }
    .games-grid {
        grid-template-columns: repeat(4, 180px);
        justify-content: start;
    }
    .games-grid.single-highlight { grid-template-columns: 350px; }
    .games-grid.music-grid { grid-template-columns: repeat(4, 180px); }
    .games-grid.collapsed { display: none !important; }
}

/* =========================================
   11. NADPISYWANIE STYLÓW (VIDEO & SOCIAL)
   ========================================= */

/* Filmy YouTube (Poziome) */
.video-card {
    aspect-ratio: 16/9 !important; 
    width: 100%; max-width: 320px; 
}
.video-card .game-cover {
    object-fit: cover; width: 100%; height: 100%;
}
.video-card .play-icon { font-size: 2.5rem; }
.video-wrapper { width: 100%; max-width: 600px; margin-bottom: 25px; }

/* Social Media (Logotypy) */
.social-card {
    display: flex !important; justify-content: center; align-items: center;
    background: #111 !important; 
}
.social-card .game-cover {
    width: auto !important; height: auto !important;
    max-width: 65%; max-height: 65%;
    object-fit: contain !important;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.8));
    filter: grayscale(0%) !important; /* Wyjątek: Zawsze kolorowe */
    opacity: 1 !important;
}
.social-card:hover .game-cover { opacity: 1 !important; }
/* =========================================
   12. ZWIJANIE SIDEBARA (TOGGLE SIDEBAR)
   ========================================= */

/* Domyślnie na telefonach przycisk jest ukryty */
.sidebar-toggle-btn {
    display: none;
}

/* TYLKO NA PC (> 1024px) */
@media (min-width: 1024px) {
    
    /* 1. Wygląd przycisku (OTWARTY) */
    .sidebar-toggle-btn {
        display: flex;
        align-items: center; 
        justify-content: center;
        
        position: absolute;
        top: 20px;
        right: -15px; 
        width: 30px; height: 30px;
        
        /* KOLORY (Nowy styl: Czarne tło, Pomarańczowa reszta) */
        background: #000; 
        border: 2px solid var(--main-color);
        color: var(--main-color); 
        
        border-radius: 50%;
        cursor: pointer;
        z-index: 1000;
        font-weight: bold;
        
        /* Ikonka */
        font-size: 1.1rem;  
        line-height: 1;     
        padding: 0;         
        padding-top: 3px;   
        
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
        transition: background 0.3s, color 0.3s, right 0.3s, box-shadow 0.3s;
    }

    .sidebar-toggle-btn:hover {
        /* Po najechaniu: Wypełniamy kolorem (odwracamy kolory) */
        background: var(--main-color);
        color: #000;
        
        transform: scale(1.1);
        box-shadow: 0 0 15px var(--highlight);
    }

    /* 2. Animacja kontenera głównego */
    .layout-container {
        transition: grid-template-columns 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    /* 3. Styl Sidebara */
    .sidebar {
        position: relative;
        overflow: visible; 
        transition: opacity 0.2s;
        z-index: 50;
    }
    
    .layout-container.sidebar-closed .sidebar-header,
    .layout-container.sidebar-closed .sidebar-nav,
    .layout-container.sidebar-closed .sidebar-footer {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    /* === STAN ZAMKNIĘTY === */
    
    .layout-container.sidebar-closed {
        grid-template-columns: 0px 1fr;
    }

    .layout-container.sidebar-closed .sidebar {
        border-right: none;
        background: transparent;
    }

    /* Przycisk w stanie zamkniętym */
    .layout-container.sidebar-closed .sidebar-toggle-btn {
        right: -40px; 
        
        /* Utrzymujemy styl: Czarne tło, Pomarańczowe linie */
        background: #000; 
        border-color: var(--main-color); 
        color: var(--main-color); 
    }
    
    .layout-container.sidebar-closed .sidebar-toggle-btn:hover {
        /* Hover w stanie zamkniętym: też wypełniamy */
        background: var(--main-color);
        color: #000;
        box-shadow: 0 0 15px var(--highlight);
    }
}

/* =========================================
   13. FOOTER (STOPKA RPG)
   ========================================= */

.rpg-footer {
    margin-top: 80px; /* Odstęp od ostatniej sekcji */
    padding-bottom: 20px;
    width: 100%;
    opacity: 0.8;
    font-size: 0.8rem;
    position: relative;
}

/* Ozdobna linia oddzielająca */
.footer-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
    margin-bottom: 20px;
    opacity: 0.5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-section.right-align {
    text-align: right;
}

/* Kolorowe akcenty */
.rpg-footer .highlight {
    color: var(--highlight);
    text-shadow: 0 0 5px var(--main-color);
}

.rpg-footer .sub-text {
    color: #666;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* --- ANIMACJA SERCA (SOUL) --- */
.footer-soul {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #000;
    border: 1px solid var(--main-color);
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 0 5px rgba(224, 139, 27, 0.2);
}

.soul-icon {
    color: #ff0000; /* Czerwone serce */
    font-size: 1.2rem;
    animation: heartbeat 1.5s infinite;
    display: inline-block;
    text-shadow: 0 0 5px red;
}

.lv-text {
    font-weight: bold;
    color: #fff;
}

/* Animacja bicia serca */
@keyframes heartbeat {
    0% { transform: scale(1); }
    5% { transform: scale(1.2); }
    10% { transform: scale(1); }
    15% { transform: scale(1.3); }
    50% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Zegar */
#footer-clock {
    font-family: monospace; /* Wygląd cyfrowy */
    font-size: 1rem;
    color: var(--main-color);
}

/* Poprawka dla stopki na stronie głównej (Intro) */
.intro.content-area {
    position: relative; /* Żeby footer wiedział względem czego się pozycjonować */
}

/* Kiedy footer jest wewnątrz klasy .intro, przypnij go do dołu */
.intro.content-area .rpg-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin-top: 0;
    /* Usuwamy górne marginesy, żeby nie przeszkadzały */
}

/* Responsywność dla telefonów */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-section.right-align {
        text-align: center;
    }
}

/* Przycisk Języka w Stopce */
.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    font-family: var(--font-stack); /* Twoja czcionka */
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 10px;
    padding: 2px 5px;
    transition: 0.3s;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--main-color);
    border-color: var(--main-color);
    text-shadow: 0 0 5px var(--main-color);
    transform: scale(1.1);
}


/* =========================================
   14. PODSTRONA FURSONA (AKTA POSTACI)
   ========================================= */

/* Układ główny: Obrazek po lewej, Staty po prawej */
.fursona-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dwie kolumny */
    gap: 30px;
    margin-bottom: 40px;
}

/* --- LEWA STRONA: REF SHEET --- */
.ref-sheet-box {
    border: 4px solid var(--main-color);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    position: relative;
    box-shadow: 5px 5px 0 #000;
    transition: transform 0.3s;
}
.ref-sheet-box:hover {
    transform: scale(1.01);
}
.main-ref-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    border: 2px solid #000;
}
.ref-caption {
    text-align: center; font-size: 0.8rem; margin-top: 5px; opacity: 0.7;
}

/* --- PRAWA STRONA: STATYSTYKI --- */
.stats-panel {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.panel-title {
    color: var(--main-color);
    border-bottom: 2px solid var(--main-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: 0 0 5px var(--main-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px dashed #444;
    transition: background 0.2s, color 0.2s;
    user-select: none; /* Żeby tekst się nie zaznaczał przy klikaniu */
}

.stat-row:hover {
    background: rgba(224, 139, 27, 0.1);
    cursor: pointer; /* Zmieniamy na łapkę, sugerującą kliknięcie */
    color: var(--highlight); /* Tekst lekko się rozjaśni */
}

/* Klasa dodawana przez JS podczas "odkrywania" sekretu */
.stat-row.decrypting {
    background: var(--main-color);
    color: #000;
    font-weight: bold;
}
.stat-label { font-weight: bold; color: #888; }
.stat-value { font-weight: bold; color: #fff; font-family: monospace; font-size: 1.1rem; }

/* --- PALETA KOLORÓW --- */
.palette-section { margin-top: 30px; }
.panel-subtitle { font-size: 1rem; color: #aaa; margin-bottom: 10px; }

.palette-grid {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.color-swatch {
    width: 40px; height: 40px;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 5px #000;
}
.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--main-color);
    border-color: var(--main-color);
}

/* --- OPIS (LORE) --- */
.lore-box {
    background: rgba(0,0,0,0.6);
    border-left: 4px solid var(--main-color);
    padding: 20px;
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- GALERIA (HORYZONTALNY SLIDER) --- */
.gallery-section {
    overflow: hidden; /* Ukrywa pasek przewijania strony, zostawia tylko galerii */
}

.gallery-grid {
    display: flex; /* Ustawia elementy w rzędzie */
    gap: 20px;
    overflow-x: auto; /* Pozwala na przewijanie w poziomie */
    padding-bottom: 20px; /* Miejsce na pasek przewijania */
    scroll-behavior: smooth;
    
    /* Ukrycie paska na chwilę, żeby dodać własny styl poniżej */
    scrollbar-width: thin; 
    scrollbar-color: var(--main-color) #000;
    
    cursor: grab; /* Kursor "łapka" sugerujący przesuwanie */
}

.gallery-grid:active {
    cursor: grabbing; /* Kursor zaciśniętej pięści przy przesuwaniu */
    scroll-behavior: auto; /* Wyłączamy smooth scroll przy przeciąganiu dla płynności */
}

.gallery-item {
    min-width: 250px; /* Stała szerokość kafelka */
    height: 250px;    /* Stała wysokość */
    flex-shrink: 0;   /* Zapobiega zgniataniu obrazków */
    
    overflow: hidden;
    border: 2px solid var(--main-color);
    position: relative;
    transition: transform 0.3s;
    user-select: none; /* Zapobiega zaznaczaniu obrazków przy przesuwaniu */
}

.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
    pointer-events: none; /* Ważne: obrazek nie blokuje myszki przy przeciąganiu */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(224, 139, 27, 0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- STYLIZACJA PASKA PRZEWIJANIA (Scrollbar) --- */
.gallery-grid::-webkit-scrollbar {
    height: 8px; /* Wysokość paska poziomego */
}

.gallery-grid::-webkit-scrollbar-track {
    background: #000; 
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--main-color); 
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
    background: var(--highlight); 
}

/* --- RESPONSYWNOŚĆ (TELEFONY) --- */
@media (max-width: 768px) {
    .fursona-container { grid-template-columns: 1fr; } /* Jedna kolumna na telefonie */
}

/* =========================================
   15. MODAL GALERII (LIGHTBOX & ZOOM)
   ========================================= */

/* Tło modala (ciemna nakładka na cały ekran) */
.modal-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 2000; /* Musi być najwyżej */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Prawie czarne tło */
    backdrop-filter: blur(5px); /* Lekkie rozmycie tła pod spodem */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Klasa do ukrywania (używamy twojej globalnej .hidden, ale tu dodajemy animację) */
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Kontener samego obrazka */
.modal-image-container {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Ukrywa to, co wystaje przy dużym zoomie */
}

/* Sam obrazek w modalu */
.modal-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 3px solid var(--main-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    transition: none; 
    
    cursor: grab; /* Łapka sugerująca możliwość chwycenia */
    transform-origin: center center; /* Zoomujemy zawsze od środka */
}

/* Gdy chwytamy obrazek */
.modal-content:active {
    cursor: grabbing; /* Zaciśnięta pięść */
}

/* Przycisk Zamknij (X) */
.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--main-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: 0.3s;
    text-shadow: 0 0 10px #000;
}
.close-modal-btn:hover {
    color: var(--highlight);
    transform: scale(1.2);
}

/* --- KONTROLKI ZOOM --- */
.zoom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 30px;
    border: 2px solid var(--main-color);
    z-index: 2001;
}

.zoom-btn {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}

.zoom-btn:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 10px var(--main-color);
}

.reset-btn { font-size: 1.2rem; } /* Mniejsza ikonka resetu */

/* =========================================
   16. SYSTEM HASŁA
   ========================================= */

.secret-container {
    margin-top: 15px;
    text-align: center;
}

.secret-btn {
    background: #2a0000;
    color: #ff3333;
    border: 1px dashed #ff3333;
    padding: 8px 15px;
    
    /* ZMIANA: Główna czcionka */
    font-family: var(--font-stack);
    
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
    font-size: 0.9rem; /* Lekka korekta, bo pixel fonty są często duże */
}

.secret-btn:hover {
    background: #ff3333;
    color: #000;
    box-shadow: 0 0 15px #ff0000;
}

/* Styl przycisku PO odblokowaniu */
.secret-btn.unlocked {
    background: var(--main-color);
    color: #000;
    border-style: solid;
    border-color: var(--main-color);
}

/* --- MODAL HASŁA --- */
.password-box {
    background: #000;
    border: 2px solid var(--main-color);
    padding: 30px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 20px var(--main-color);
    
    /* ZMIANA: Główna czcionka dla całego pudełka */
    font-family: var(--font-stack);
}

.pass-header {
    color: var(--main-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.pass-input-group {
    display: flex;
    align-items: center;
    background: #111;
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 10px;
}

.prompt { color: var(--highlight); margin-right: 10px; font-weight: bold; }

#pass-input {
    background: transparent;
    border: none;
    color: #fff;
    
    /* ZMIANA: Inputy nie dziedziczą czcionki automatycznie, trzeba wymusić */
    font-family: var(--font-stack);
    
    font-size: 1.2rem;
    width: 100%;
    outline: none;
    text-transform: uppercase;
}

/* Placeholder (tekst "WPROWADŹ KOD...") też musi mieć dobrą czcionkę */
#pass-input::placeholder {
    font-family: var(--font-stack);
    opacity: 0.5;
}

.pass-error {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 5px red;
}

.pass-actions {
    display: flex; justify-content: space-around; gap: 10px;
}

.rpg-btn {
    padding: 8px 20px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    
    /* ZMIANA: Przyciski w modalu */
    font-family: var(--font-stack);
    font-size: 1rem;
}

.rpg-btn.confirm { background: var(--main-color); color: #000; }
.rpg-btn.confirm:hover { background: #fff; }

.rpg-btn.cancel { background: #333; color: #fff; }
.rpg-btn.cancel:hover { background: #555; }

/* Animacja trzęsienia przy błędzie */
.shake {
    animation: shake 0.5s;
}
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* =========================================
   17. PODSTRONA LORE 
   ========================================= */

.lore-intro.fantasy-intro {
    font-family: var(--font-stack);
    font-style: italic; /* Kursywa dla klimatu opowieści */
    color: #aaa;
    margin-bottom: 40px;
    border-left: none; /* Usuwamy techniczną linię */
    text-align: center; /* Centrujemy tekst jak w książce */
    background: radial-gradient(circle, rgba(224,139,27,0.1) 0%, rgba(0,0,0,0) 70%); /* Lekka poświata w tle */
    padding: 20px;
}

/* --- TIMELINE (Stylizacja bardziej organiczna) --- */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Linia czasu - złota nić losu */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--main-color), transparent); /* Zanikająca linia */
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
    box-shadow: 0 0 10px var(--main-color); /* Świecenie linii */
}

/* Kółeczko na linii - magiczny punkt */
.timeline-marker {
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--main-color);
    box-shadow: 0 0 10px var(--main-color); /* Świeci zawsze */
    left: 15px; top: 8px;
    z-index: 10;
    transition: transform 0.3s;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.5);
    background: #fff; /* Rozbłysk przy najechaniu */
}

/* Pudełko z treścią - stary pergamin / kamienna tablica */
.timeline-content {
    background: rgba(10, 5, 0, 0.8); /* Bardzo ciemny brąz/czerń */
    border: 1px solid #5a3a1a; /* Kolor starego złota/brązu */
    padding: 25px;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    font-family: var(--font-stack); /* Możesz tu użyć innej czcionki jeśli masz, np. szeryfowej */
}

.timeline-content:hover {
    transform: translateX(5px) translateY(-5px); /* Lekkie uniesienie */
    border-color: var(--main-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(224, 139, 27, 0.05);
}

.lore-title {
    color: var(--main-color);
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-variant: small-caps; /* Wygląda jak nagłówek w księdze */
    letter-spacing: 2px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

/* --- MAGICZNE UKRYWANIE TEKSTU (MAGIC BLUR) --- */
.magic-blur {
    color: transparent; /* Tekst jest przezroczysty */
    text-shadow: 0 0 8px var(--main-color); /* Tekst jest rozmyty i świeci */
    filter: blur(4px); /* Dodatkowe rozmycie konturów */
    cursor: help;
    transition: 0.5s ease-in-out;
    user-select: none;
    display: inline-block; /* Ważne dla filtra blur */
}

.magic-blur:hover {
    color: var(--highlight); /* Tekst staje się widoczny */
    text-shadow: 0 0 0 transparent; /* Poświata znika (lub staje się ostra) */
    filter: blur(0); /* Rozmycie znika */
    transform: scale(1.05); /* Lekkie powiększenie magicznego słowa */
}

/* =========================================
   18. PODSTRONA KOMISZE (CENNIK - FIXED)
   ========================================= */

/* --- STATUS BOX --- */
.comm-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid;
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.2s;
    user-select: none;
}
.comm-status:active { transform: scale(0.98); }

/* Status OTWARTY */
.status-open {
    background: rgba(0, 255, 0, 0.1);
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}
.status-open .status-icon {
    width: 15px; height: 15px; background: #0f0;
    border-radius: 50%; margin-right: 15px;
    box-shadow: 0 0 10px #0f0;
    animation: blink 2s infinite;
}
.status-open .value { color: #0f0; font-weight: bold; }

/* Status ZAMKNIĘTY */
.status-closed {
    background: rgba(255, 0, 0, 0.1);
    border-color: #f00;
}
.status-closed .status-icon {
    width: 15px; height: 15px; background: #f00;
    border-radius: 50%; margin-right: 15px;
}
.status-closed .value { color: #f00; font-weight: bold; }

.status-text { font-size: 1.2rem; font-family: var(--font-stack); }


/* --- SIATKA KART --- */
.comm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.comm-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.comm-card:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* --- KONTENER OBRAZKA (NAPRAWIONY) --- */
.comm-img-container {
    height: 300px; /* Zwiększona wysokość, żeby ładnie wyglądało */
    overflow: hidden;
    
    /* TO JEST KLUCZ DO NAPRAWY "LATAJĄCYCH NAPISÓW" */
    position: relative; 
    
    border-bottom: 1px solid #333;
}

/* Zastąp tym fragmentem obecny styl dla obrazka w karcie */
.comm-img-container img {
    width: 100%;
    height: 100%;
    
    /* ZMIANA KLUCZOWA: */
    object-fit: contain; /* Skaluje obrazek tak, żeby zmieścił się w całości */
    
    background-color: #050505; /* Ciemne tło dla pustych przestrzeni po bokach */
    transition: transform 0.5s;
}

.comm-card:hover .comm-img-container img {
    transform: scale(1.1);
}

/* Badge (np. Popularne / NSFW) */
.comm-badge {
    position: absolute; /* Dzięki 'relative' wyżej, to teraz działa poprawnie */
    top: 10px; right: 10px;
    background: var(--main-color);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 2px;
    z-index: 5;
}

/* --- TREŚĆ KARTY --- */
.comm-content {
    padding: 20px;
    flex-grow: 1;
}

.comm-title {
    color: var(--main-color);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.comm-desc {
    font-size: 0.9rem; color: #aaa; margin-bottom: 20px;
    height: 40px; 
}

/* --- LISTA CEN (MENU) --- */
.price-list {
    list-style: none; padding: 0; margin: 0;
}
.price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-family: var(--font-stack);
}
.service-name { color: #ddd; }
.price { color: var(--highlight); font-weight: bold; }

.dots {
    flex-grow: 1;
    border-bottom: 1px dotted #555;
    margin: 0 10px;
    position: relative;
    top: -4px;
}

/* --- TOS SECTION --- */
.tos-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-left: 4px solid var(--main-color);
}
.tos-title { color: #fff; margin-top: 0; }
.tos-list li { margin-bottom: 10px; color: #ccc; }

/* =========================================
   19. REGULAMIN (CONTRACT ACCORDION)
   ========================================= */

.contract-container {
    max-width: 800px;
    margin: 0 auto 50px auto;
    border: 2px solid #333;
    background: rgba(0, 0, 0, 0.9);
}

/* Nagłówek (Pasek, w który się klika) */
.contract-header {
    background: #111;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #333;
    transition: background 0.3s;
    user-select: none;
}

.contract-header:hover {
    background: #222;
}

.contract-title {
    font-family: var(--font-stack);
    font-size: 1.2rem;
    color: var(--main-color);
    font-weight: bold;
    display: flex; align-items: center; gap: 10px;
}

.contract-arrow {
    color: var(--main-color);
    transition: transform 0.3s;
}

/* Klasa dodawana przez JS gdy otwarte */
.contract-container.open .contract-arrow {
    transform: rotate(180deg); /* Obrót strzałki */
}
.contract-container.open .contract-header {
    border-bottom: 1px solid var(--main-color); /* Podświetlenie linii */
}

/* Ciało kontraktu (To co się chowa) */
.contract-body {
    max-height: 0; /* Domyślnie zamknięte */
    overflow: hidden;
    transition: max-height 0.5s ease-out; /* Płynna animacja */
}

.contract-inner-padding {
    padding: 30px;
    color: #ccc;
    font-family: var(--font-stack);
    line-height: 1.6;
}

/* Sekcje wewnątrz */
.contract-section {
    margin-bottom: 25px;
    border-left: 2px solid #444;
    padding-left: 15px;
}

.contract-section h3 {
    color: #fff;
    margin-top: 0;
    border-bottom: 1px dashed #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contract-section ul {
    list-style: square;
    padding-left: 20px;
}
.contract-section li { margin-bottom: 5px; }

strong { color: var(--highlight); }

.contract-footer {
    text-align: center;
    font-style: italic;
    color: #888;
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 10px;
}

/* Przycisk pod kontraktem */
.order-btn-container {
    text-align: center;
    padding: 20px;
    background: #050505;
    border-top: 1px solid #333;
}

.large-btn {
    font-size: 1.2rem;
    padding: 15px 40px;
    letter-spacing: 2px;
}

/* =========================================
   20. GOAL TRACKER (NEON BORDER + INVERTED TEXT)
   ========================================= */

.goal-container {
    max-width: 800px;
    margin: 0 auto 50px auto;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #444;
}

.goal-header {
    background: #111;
    padding: 10px 20px;
    font-family: var(--font-stack);
    color: var(--main-color);
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.goal-content { padding: 20px; text-align: center; }

.goal-description {
    color: #ccc; margin-bottom: 15px; font-style: italic; font-family: var(--font-stack);
}

/* KONTENER PASKA */
.rpg-progress-track {
    width: 100%;
    height: 35px; /* Wysokość paska */
    background: #000; /* Czarne tło dla pustej części */
    
    /* Świecąca obramówka w kolorze motywu */
    border: 2px solid var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
    
    position: relative; /* Ważne dla pozycjonowania tekstów */
    overflow: hidden; /* Żeby nic nie wystawało */
}

/* WYPEŁNIENIE (CIEMNIEJSZE OD OBRAMÓWKI) */
.rpg-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%; 
    
    /* ZMIANA: Trik z gradientem. 
       Nakładamy 25% czerni (rgba(0,0,0,0.25)) na Twój główny kolor.
       Dzięki temu pasek jest zawsze ciemniejszy od ramki, niezależnie jaki masz kolor motywu! */
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), var(--main-color);
    
    overflow: hidden; 
    transition: width 0.5s ease-out;
    z-index: 2;
}

/* STYLE TEKSTU (Wspólne) */
.rpg-progress-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-weight: bold;
    font-size: 1.1rem;
    white-space: nowrap; /* Tekst nie może się łamać */
}

/* TEKST 1 (TYLNY - BIAŁY) */
.text-back {
    color: #fff;
    z-index: 1;
}

/* TEKST 2 (PRZEDNI - CZARNY) */
.text-front {
    color: #000;
    /* Pogrubienie czcionki, żeby była czytelniejsza na kolorze */
    font-weight: 900; 
    
    /* TRICK: Tekst wewnątrz paska musi mieć szerokość CAŁEGO paska, 
       a nie tylko wypełnienia, żeby stał w miejscu. Ustawimy to w JS, 
       ale tu dajemy fallback */
    width: 100vw; 
    max-width: 800px; /* Przybliżona szerokość kontenera */
}

/* =========================================
   21. SEKRETNA SEKCJA (COMMISSIONS)
   ========================================= */

#secret-comm-section {
    margin-top: 80px;
    border-top: 1px dashed #333;
    padding-top: 40px;
    animation: fadeIn 2s;
}

/* Specjalny styl dla kart z cienia */
.secret-card {
    border-color: #500;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.1);
}

.secret-card:hover {
    border-color: #ff3333; /* Czerwone podświetlenie */
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    transform: translateY(-5px) scale(1.02);
}

.secret-card .comm-img-container {
    border-bottom: 1px solid #500;
}

/* Animacja pojawiania się */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   24. MINI BLOG (SYSTEM LOGS TERMINAL)
   ========================================= */

.news-terminal {
    width: 100%;
    
    /* ZMIANA: Powiększenie */
    max-width: 600px; /* Było 450px -> Teraz jest szersze */
    height: 450px;    /* Było 350px -> Teraz jest wyższe */
    
    background: rgba(0, 5, 10, 0.9); /* Nieco mniej przezroczyste dla czytelności */
    border: 1px solid var(--main-color);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.15); /* Mocniejsza poświata */
    
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    margin: 0 auto; 
}

/* --- NAGŁÓWEK OKNA --- */
.terminal-header {
    background: var(--main-color);
    color: #000; /* Czarny tekst na kolorowym pasku */
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--main-color);
}
.terminal-header .controls .dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #000;
    border-radius: 50%;
    margin-left: 4px;
    opacity: 0.5;
}

/* --- TREŚĆ (SCROLLOWANA) --- */
.terminal-content {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto; /* Pasek przewijania tylko w pionie */
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Stylizacja paska przewijania (Scrollbar - Webkit) */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}
.terminal-content::-webkit-scrollbar-track {
    background: #000;
}
.terminal-content::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border: 1px solid #000;
}

/* --- POJEDYNCZY WPIS --- */
.log-entry {
    margin-bottom: 5px;
}

.log-date {
    display: block;
    font-size: 0.75rem;
    color: #555; /* Szara data */
    margin-bottom: 2px;
}
/* Jeśli najedziesz na wpis, data się podświetli */
.log-entry:hover .log-date { color: var(--highlight); }

.log-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 1px 4px;
    margin-right: 5px;
    border: 1px solid;
    font-weight: bold;
}

/* Kolory tagów */
.tag-update { color: var(--main-color); border-color: var(--main-color); }
.tag-new    { color: #0f0; border-color: #0f0; } /* Zielony */
.tag-alert  { color: #f00; border-color: #f00; } /* Czerwony */
.tag-info   { color: #ff0; border-color: #ff0; } /* Żółty */

.log-text {
    margin: 5px 0 0 0;
    line-height: 1.4;
    opacity: 0.9;
}

.log-divider {
    border: 0;
    border-bottom: 1px dashed #333;
    margin: 10px 0;
}

/* --- STOPKA TERMINALA --- */
.terminal-footer {
    padding: 5px 10px;
    background: #000;
    border-top: 1px solid #333;
    font-size: 0.8rem;
    color: var(--main-color);
}
.blink {
    animation: blinking 1s infinite;
}
@keyframes blinking {
    0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; }
}