/* Podstawowe resetowanie i ustawienia globalne */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    font-size: 16px;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Główny obszar treści */
#content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 20px;
    padding-bottom: 160px;
}

.page {
    display: none;
}
.page.active {
    display: block;
}

/* Nagłówki sekcji (Polska/Świat) */
h2 {
    font-size: 2em;
    font-weight: 600;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

/* Artykuły */
.article {
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 0;
    padding: 25px;

    /* --- NOWA SEKCJA: Ograniczenie szerokości i centrowanie --- */
    max-width: 800px; /* Ustaw maksymalną szerokość artykułu. Możesz zmienić tę wartość (np. na 700px, 900px). */
    margin: 0 auto 40px; /* Góra:0, Boki:auto (centrowanie), Dół:40px (odstęp między artykułami) */
    /* --- Koniec nowej sekcji --- */
}

.article-preview,
.article-full {
    line-height: 1.7;
}

/* Stylizacja Markdown wewnątrz artykułów */
.article h1, .article h2, .article h3, .article h4, .article h5, .article h6 {
    color: #000000;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}
.article p {
    margin-bottom: 1em;
}
.article strong, .article b {
    font-weight: 600;
}
.article em, .article i {
    font-style: italic;
}
.article a {
    color: #000000;
    text-decoration: underline;
    text-decoration-color: #999999;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.article a:hover {
    text-decoration-color: #000000;
}


.article-preview {
    max-height: calc(5 * 1.7em);
    overflow: hidden;
    margin-bottom: 15px;
}
.article-full {
    display: none;
}
.article.expanded .article-preview {
    display: none;
}
.article.expanded .article-full {
    display: block;
}

/* Przycisk Rozwiń/Zwiń */
.article button {
    background-color: transparent;
    color: #000000;
    border: 1px solid #000000;
    padding: 8px 18px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-top: 15px;
}
.article button:hover {
    background-color: #000000;
    color: #ffffff;
}


/* Dolny pasek nawigacyjny */
#bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #eeeeee;
    z-index: 1000;
}

.main-audio-player-controls,
.page-navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.main-audio-player-controls {
    margin-bottom: 12px;
    gap: 15px;
}
.page-navigation-controls {
    gap: 30px;
}

#bottom-bar button {
    background-color: transparent;
    color: #000000;
    border: none;
    padding: 8px;
    border-radius: 0;
    cursor: pointer;
    font-size: 1em;
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    position: relative;
}

#btn-rewind, #btn-forward,
#btn-polska, #btn-swiat {
    font-weight: 500;
}

#btn-rewind:hover .material-icons,
#btn-forward:hover .material-icons,
#btn-polska:hover,
#btn-swiat:hover {
    color: #777777;
}

#bottom-bar .play-pause-circle {
    background-color: #000000;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0 5px;
    color: #ffffff;
}
#bottom-bar .play-pause-circle:hover {
    background-color: #333333;
    color: #ffffff;
}
#bottom-bar .play-pause-circle .material-icons {
    font-size: 28px;
    color: #ffffff;
}

#btn-polska.active-nav::after,
#btn-swiat.active-nav::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: #000000;
    border-radius: 0;
}

#bottom-bar button .material-icons {
    font-size: 26px;
    vertical-align: middle;
}

.progress-container {
    width: 80%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
#current-time, #duration-time {
    font-size: 0.85em;
    color: #555555;
    min-width: 35px;
    text-align: center;
}
#progress-bar {
    flex-grow: 1;
    margin: 0 10px;
    height: 6px;
    background: #eeeeee;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #000000;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
}
#progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #000000;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}
#progress-bar::-moz-range-track {
    background: #eeeeee;
    height: 6px;
    border-radius: 0;
}