/* GLOBAL AND BASE STYLES */
@import url('https://fonts.googleapis.com/css2?family=Advent+Pro:wght@100..900&display=swap');

body {
    font-family: 'Advent Pro', Arial, sans-serif;
    background-color: #0A0D12;
    background-size: cover;
    color: #e0e0e0;

    /* Utrzymujemy flex dla centrowania */
    display: flex;
    /* Zmiana: aby stopka była na dole, zmieniamy kierunek flex i justyfikację */
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    /* USUŃ NADMIAROWY PADDING GÓRNY */
    padding: 0; /* Cały padding kontrolujemy teraz w stopce */

    min-height: 100vh;
    margin: 0;
    box-sizing: border-box;
    /* DLA PWA iOS: Umożliwia rozciągnięcie do bezpiecznych krawędzi */
    padding-bottom: env(safe-area-inset-bottom);
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* --- ORYGINALNE STYLE KONTENERA DLA WIDOKU GŁÓWNEGO (index.html) --- */
.container {
    background-color: #16191E;
    padding: 25px 25px;
    border-radius: 12px;
    border-width: 1px;
    border-color: #26292E;
    border-style: solid;
    text-align: center;
    max-width: 1220px;
    width: 100%;
    /* Zwiększenie marginesu górnego, by zmieścić stopkę (WAŻNE dla fixed navbar) */
    margin-top: 110px;
    flex-grow: 1;
}

h1 {
    color: #C9FF00;
    font-size: 2em;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.3em;
    color: #fff;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}

/* MAIN BUTTONS (GAME/MENU) */
button {
    background-color: #444444;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    margin: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    text-transform: uppercase;
}

button:hover, button:focus {
    background-color: #555555;
    transform: none;
    box-shadow: none;
}

.instruction {
    color: #ffffff;
    font-size: 1em;
    line-height: 1.5;
    margin-top: 0px;
}

/* --- MAIN MENU AND GAME TILES STYLES --- */
.game-category {
    margin-bottom: 20px;
}

.game-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 20px;
}

.tile {
    flex: 0 0 auto;
    width: 280px;
    height: 120px;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
    text-decoration: none;
    color: #e0e0e0;
    background-color: #1D2025;
    transition: background-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
    /* KLUCZOWE DLA BADGE'A: Ustawia kontekst pozycjonowania dla absolutnego elementu wewnątrz */
    position: relative;
}

.tile:hover {
    background-color: #222429;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0);
    border-color: #76c7c0;
}

.tile h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.tile p {
    font-size: 0.8em;
    color: #b0b0b0;
}

.disabled-tile {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #1a1a1a;
}
/* --- END OF MAIN MENU STYLES --- */


/* --- NAVBAR STYLES (ORYGINALNE) --- */
.navbar {
    background-color: #040709;
    padding: 20px 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    /* DLA PWA iOS: Umożliwia rozciągnięcie do bezpiecznych krawędzi */
    padding-top: calc(20px + env(safe-area-inset-top));
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1215px;
    width: 100%;
    margin: 0 auto;
}

/* --- LOGO W CSS: PRZYWRÓCONY ORYGINALNY ROZMIAR --- */
.logo img {
    /* Usunięto: height: 46px; */
    vertical-align: middle;
}
/* --- KONIEC LOGO CSS --- */

/* Ikony PWA i Selektor są poprawnie rozmieszczone dzięki flex-grow w HTML i space-between w CSS */
#pwa-install-container {
    margin: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    margin-left: 0;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    margin-left: 25px;
    padding: 5px 0;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #76c7c0;
}

/* END GAME MODAL (Uniwersalny Modal) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #131921;
    color: #e0e0e0;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
}

#final-feedback-title {
    font-size: 2.2em;
    margin-top: 0;
}

.total-score-info {
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 30px;
}

.modal-content button {
    padding: 12px 30px;
    width: 100%;
}

/* --- STYL DLA ZÓŁTEGO PRZYCISKU RESTARTU --- */
.yellow-btn {
    background-color: #FFCA1A;
    color: #080C10;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

.yellow-btn:hover {
    background-color: #e6b717;
}

.default-btn {
    background-color: #1F252C;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

.default-btn:hover {
    background-color: #1C2128;
}


/* Responsiveness (ORYGINALNE) */
@media (max-width: 1250px) {
    .container {
        padding: 30px 15px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px 15px;
        box-shadow: none;
        /* Ważne: usuwamy ramkę na małych ekranach */
        border: none;
        background-color: transparent;
    }
    .modal-content {
        margin: 20px;
        padding: 30px;
    }
    .tile {
        width: 100%;
    }
    .navbar {
        padding: 10px 0;
        /* Ponownie dostosowujemy padding dla bezpiecznych stref na mobilnych */
        padding-top: calc(10px + env(safe-area-inset-top));
    }
    .nav-links a {
        margin-left: 15px;
        font-size: 0.9em;
    }
    /* Aby elementy nie były zbyt ściśnięte na małych ekranach */
    .nav-content {
        gap: 10px;
    }
}

/* --- DODANE STYLE DLA PRZYCISKU I MODALA SUGEROWANIA GRY --- */

/* Styl dla głównego przycisku */
.button-primary {
    background-color: #BFFF09;
    height: 60px;
    color: #212121;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s;
    display: block;
    width: 250px;
    margin: 20px auto;
}

.button-primary:hover {
    background-color: #CCFF3A;
}

/* Style dla Modala Sugestii (Overrides general .modal) */
#suggestion-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    padding: 0;
}

#suggestion-modal .modal-content {
    background-color: #101317;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    color: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    text-align: left;
}

#suggestion-modal .close-button {
    color: #aaa;
    float: right;
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

#suggestion-modal .close-button:hover,
#suggestion-modal .close-button:focus {
    color: #fff;
    text-decoration: none;
}

#suggestion-text {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    box-sizing: border-box;
    border: 1px solid #212427;
    border-radius: 6px;
    background-color: #1A1C20;
    color: #e0e0e0;
    resize: vertical;
    font-size: 1em;
    font-family: 'Advent Pro', Arial, sans-serif;
}

#send-suggestion-button {
    background-color: #C9FF00;
    color: #040709;
    height: 60px;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    display: block;
    width: 100%;
    margin-top: 10px;
}

#send-suggestion-button:hover {
    background-color: #D4FF33;
}

/* NEW BADGE STYLES */
.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #C9FF00;
    color: #111;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- ZMIANA: POPRAWIONE STYLE DLA STOPKI --- */
.footer {
    width: 100%;
    margin-top: 40px;
    padding: 20px 25px;
    background-color: #040709;
    text-align: center;
    margin-bottom: 0;
}

.footer-content {
    max-width: 1220px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #ccc;
}

.footer-content a {
    color: #C9FF00;
    text-decoration: underline;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
}
/* KONIEC POPRAWIONEJ STOPKI */


/* ================================================= */
/* --- NOWE STYLE DLA STRONY ARTYKUŁU (article.html) --- */
/* ================================================= */

.article-wrapper {
    /* Nadpisujemy 'text-align: center' (z .container) dla czytelności tekstu */
    text-align: left;
    /* Ograniczamy szerokość artykułu dla lepszej czytelności (typowa długość linii) */
    max-width: 750px;
    margin: 0 auto; /* Wyśrodkowujemy kolumnę artykułu wewnątrz .container */
    padding: 0 15px; /* Dodajemy padding dla małych ekranów */
}

/* Sekcja nagłówka (tytuł, data) */
.article-header {
    margin-bottom: 40px;
    /* Linia oddzielająca nagłówek od treści */
    border-bottom: 2px solid #26292E;
    padding-bottom: 20px;
}

/* Styl głównego tytułu (H1) */
.article-header h1 {
    color: #C9FF00; /* Używamy istniejącego koloru akcentu */
    font-size: 2.5em;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* Metadane (data, autor) */
.article-meta {
    color: #999;
    font-size: 0.9em;
    font-weight: 500;
}

/* Obrazek w artykule */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Główna treść artykułu - akapity */
.article-content p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #e0e0e0;
}

/* H2 w treści (podtytuły) - nadpisujemy oryginalny styl h2 */
.article-content h2 {
    font-size: 1.6em;
    color: #fff;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid #C9FF00; /* Używamy koloru akcentu */
    padding-bottom: 5px;
    text-align: left; /* Zapewnienie wyrównania do lewej */
}

/* Styl dla bloku cytatu */
blockquote {
    border-left: 5px solid #76c7c0; /* Kolor akcentu z nawigacji/logo */
    padding: 15px 20px;
    margin: 30px 0;
    /* Minimalnie jaśniejsze tło w stosunku do kontenera */
    background-color: #1A1D22;
    font-style: italic;
    color: #fff;
    border-radius: 0 4px 4px 0;
}

/* Zapewnienie, że linki w treści są widoczne i pasują do schematu */
.article-content a {
    color: #C9FF00;
    text-decoration: none;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #D4FF33;
    text-decoration: underline;
}

/* MEDIA QUERY dla responsywności artykułu */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2em;
    }

    .article-content h2 {
        font-size: 1.4em;
    }
}
