/* --- Global Reset & Typography --- */
:root {
--primary-color: #9b59b6; 
--secondary-color: #8e44ad; 
--accent-color: #007bff;
--text-color: #ecf0f1; 
--bg-color-dark: #1e1b26; 
--bg-color-light: #2c283a;
--border-radius: 12px; 
--transition-speed: 0.3s;
 --header-border-color: rgba(255, 255, 255, 0.1);
}

/* --- Light Mode Variables --- */
body.light-mode {
--primary-color: #8e44ad;
--secondary-color: #9b59b6;
--accent-color: #0056b3;
--text-color: #2c3e50;
--bg-color-dark: #ecf0f1;
--bg-color-light: #ffffff;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    user-select: none; 
}

body { 
    font-family: 'Roboto', sans-serif; 
    background-color: var(--bg-color-dark); 
    color: var(--text-color); 
    line-height: 1.6; 
    overflow-x: hidden; 
}

h1, h2, h3 { 
    font-weight: 700; 
}

a { 
    color: var(--accent-color); 
    text-decoration: none; 
    transition: color var(--transition-speed); 
}

a:hover { 
    color: var(--primary-color); 
}

/* --- Particles.js Background --- */
#particles-js { 
    position: fixed; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    z-index: -1; 
}

/* --- Header & Navigation (Wersja Ostateczna i Poprawna) --- */

.header { 
    background: rgba(30, 27, 38, 0.85); 
    backdrop-filter: blur(10px); 
    padding: 15px 0; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    left: 0;
    z-index: 1000; 
    transition: background var(--transition-speed), box-shadow var(--transition-speed); 
    border-bottom: 1px solid transparent;
}

body.light-mode .header {
    background: rgba(236, 240, 241, 0.85); /* Lepszy kolor dla light-mode */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
}

.header.scrolled { 
    background: var(--bg-color-light); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--header-border-color); 
}

/* --- GŁÓWNY KONTENER NAWIGACJI --- */
.nav-container { 
    display: flex; 
    align-items: center;
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 25px;
    width: 100%;
}

/* --- Logo i nazwa (lewa strona) --- */
.logo-link { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-right: auto; /* KLUCZOWE: Wypycha wszystko inne na prawo */
}

.logo { 
    height: 50px; 
    width: 50px; 
    transition: transform var(--transition-speed) ease; 
}

.logo:hover { 
    transform: scale(1.1) rotate(15deg); 
}

.logo-text {
    color: #ecf0f1;
    font-size: 1.8em; 
    font-weight: 700;
}

body.light-mode .logo-text {
    color: #2c3e50;
}

/* --- KONTENER NA LINKI NAWIGACYJNE --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px; /* Mały odstęp między przyciskami */
}

/* --- PRZYCISKI NAWIGACJI --- */
.nav-button { 
    padding: 10px 15px;
    border-radius: var(--border-radius); 
    background: transparent; 
    font-weight: 500; /* Lżejsza czcionka, jak na screenie */
    font-size: 0.95em;
    color: #ecf0f1;
    transition: all var(--transition-speed) ease; 
    white-space: nowrap;
}

.nav-button:hover { 
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.light-mode .nav-button {
    color: #2c3e50;
}
body.light-mode .nav-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}


/* --- PRZYCISK ZMIANY MOTYWU --- */
#theme-toggle {
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    flex-shrink: 0;
    margin-left: 15px; /* Odstęp od ostatniego linku */
    position: relative; /* Potrzebne dla ikon wewnątrz */
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}
body.light-mode #theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* --- MENU HAMBURGEROWE (UKRYTE NA DESKTOPIE) --- */
.hamburger-menu { 
    display: none; 
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    margin-left: 15px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ecf0f1;
    transition: all 0.3s ease-in-out;
}
body.light-mode .bar {
    background-color: #2c3e50;
}


/* --- Main Content --- */
.content-wrapper { 
    padding: 120px 5% 60px; 
    max-width: 1400px; 
    margin: 0 auto; 
}

.section-title { 
    font-size: 3em; 
    text-align: center; 
    margin-bottom: 20px; 
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.section-subtitle { 
    text-align: center; 
    font-size: 1.2em; 
    margin-bottom: 60px; 
    color: #6c757d; 
}

/* --- Sections (Hero, Features, Admin etc.) --- */
.hero-section { 
    text-align: center; 
    padding: 100px 0; 
}

.hero-title { 
    font-size: 4em; 
    margin-bottom: 20px; 
}

.hero-subtitle { 
    font-size: 1.8em; 
    margin-bottom: 30px; 
    color: #6c757d; 
}

.hero-description { 
    max-width: 700px; 
    margin: 0 auto 40px; 
    font-size: 1.1em; 
}

.cta-button { 
    padding: 15px 30px; 
    border-radius: var(--border-radius); 
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); 
    color: #fff; 
    font-weight: 700; 
    font-size: 1.1em; 
    transition: all var(--transition-speed) ease; 
    display: inline-block; 
    margin: 10px; 
}

.cta-button:hover { 
    transform: scale(1.05) translateY(-5px); 
    box-shadow: 0 15px 30px rgba(155, 89, 182, 0.3); 
}

.cta-button.secondary { 
    background: transparent; 
    border: 2px solid var(--primary-color); 
    color: var(--primary-color);
}

.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.feature-card { 
    background: var(--bg-color-light); 
    padding: 40px; 
    border-radius: var(--border-radius); 
    text-align: center; 
    border: 1px solid rgba(0, 0, 0, 0.1); 
    transition: all var(--transition-speed) ease; 
}

.feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); 
    border-color: var(--primary-color); 
}

.feature-icon { 
    font-size: 3em; 
    margin-bottom: 20px; 
    color: var(--primary-color);
}

.feature-title { 
    font-size: 1.5em; 
    margin-bottom: 15px; 
}

.admin-section { 
    padding-top: 60px; 
}

.admin-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.admin-card { 
    background: var(--bg-color-light); 
    padding: 30px; 
    border-radius: var(--border-radius); 
    text-align: center; 
    border: 1px solid rgba(0, 0, 0, 0.1); 
    transition: all var(--transition-speed) ease; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.admin-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); 
}

.admin-avatar { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    margin-bottom: 20px; 
    border: 4px solid var(--primary-color); 
}

.admin-name { 
    font-size: 1.8em; 
    margin-bottom: 5px; 
}

.admin-discord { 
    color: #6c757d; 
    margin-bottom: 15px; 
}

.admin-role { 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-weight: 700;
    color: #fff;
}

.admin-role.owner { background-color: #e74c3c; }
.admin-role.dev { background-color: #3498db; }

.admin-description { 
    font-size: 0.9em; 
    margin-top: auto; 
    padding-top: 15px;
}

.server-info-section { 
    padding-top: 60px; 
}

.server-card-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
    background: var(--bg-color-light); 
    padding: 40px; 
    border-radius: var(--border-radius); 
    border: 1px solid rgba(0, 0, 0, 0.1); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); 
}

.info-column { 
    display: flex; 
    flex-direction: column; 
}

.info-column h3 { 
    font-size: 1.8em; 
    color: var(--primary-color); 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 2px solid var(--secondary-color); 
}

.column-description { 
    color: #6c757d; 
    font-size: 0.9em; 
    margin-bottom: 20px; 
}

.info-column ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    flex-grow: 1; 
}

.info-column li { 
    padding: 12px 0 12px 25px; 
    position: relative; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
}

.info-column li::before { 
    content: '✓'; 
    color: var(--accent-color); 
    font-weight: 700; 
    position: absolute; 
    left: 0; 
    top: 12px; 
}

.admin-preview-list li { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 10px 0; 
}

.admin-preview-list li::before { 
    display: none; 
}

.admin-avatar-preview { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    border: 2px solid var(--secondary-color); 
}

.admin-info { 
    display: flex; 
    flex-direction: column; 
}

.admin-info span { 
    font-weight: 700; 
}

.role-tag { 
    font-size: 0.8em; 
    padding: 2px 8px; 
    border-radius: 5px; 
    color: #fff; 
    margin-top: 3px; 
    width: fit-content; 
}

.card-button { 
    display: block; 
    width: 100%; 
    text-align: center; 
    margin-top: auto; 
    padding: 12px; 
    background: rgba(155, 89, 182, 0.1); 
    border: 1px solid var(--primary-color); 
    border-radius: var(--border-radius); 
    color: var(--primary-color); 
    font-weight: 700; 
    transition: all var(--transition-speed) ease; 
}

.card-button:hover { 
    background: var(--primary-color); 
    color: #fff; 
    transform: scale(1.03); 
}

/* --- Dynamic Admin List & Roles --- */
.loading-message, .error-message { 
    font-style: italic; 
    color: #6c757d; 
    text-align: center; 
    padding: 20px 0; 
}

.error-message { 
    color: #e74c3c; 
}

.role-prezes, .role-współwłaściciel, .role-kierownik-serwera, .role-zarząd-serwera, .role-kapitan-helperów, .role-admin, .role-helper, .role-helper-testowy {
    color: #fff;
}

.role-prezes { background-color: #d3af37; color: #1e1e1e; }
.role-wspolwlasciciel { background-color: #c0392b; color: #1e1e1e; }
.role-kierownik-serwera { background-color: #9b59b6; }
.role-zarzad-serwera { background-color: #8e44ad; }
.role-admin { background-color: #2980b9; }
.role-kapitan-helperow { background-color: #3498db; }
.role-helper { background-color: #2ecc71; }
.role-helper-testowy { background-color: #27ae60; }

/* --- Coming Soon Page --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.coming-soon-body { 
    overflow: hidden; 
}

.coming-soon-container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    height: 100vh; 
    padding: 20px; 
    z-index: 1; 
    position: relative; 
}

.mystery-header { 
    font-size: 6em; 
    font-weight: 700; 
    margin-bottom: 0; 
    color: rgba(0, 0, 0, 0.1); 
    text-shadow: 0 0 15px rgba(155, 89, 182, 0.2); 
}

.soon-title { 
    font-size: 3.5em; 
    margin-bottom: 15px; 
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.soon-subtitle { 
    font-size: 1.2em; 
    color: #6c757d; 
    max-width: 600px; 
    margin-bottom: 40px; 
}

.countdown-timer { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 40px; 
}

.time-block { 
    background: var(--bg-color-light); 
    padding: 20px; 
    border-radius: var(--border-radius); 
    min-width: 100px; 
    border: 1px solid rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease; 
}

.time-block:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); 
}

.time-number { 
    display: block; 
    font-size: 3em; 
    font-weight: 700; 
    line-height: 1; 
}

.time-label { 
    display: block; 
    font-size: 0.9em; 
    color: #6c757d; 
    text-transform: uppercase; 
    margin-top: 5px; 
}

.animate-fade-in { 
    animation: fadeIn 1s ease-out forwards; 
}

.animate-slide-up { 
    opacity: 0; 
    animation-name: slideUp; 
    animation-duration: 0.8s; 
    animation-timing-function: ease-out; 
    animation-fill-mode: forwards; 
}

.delay-1 { animation-delay: 0.2s; } 
.delay-2 { animation-delay: 0.4s; } 
.delay-3 { animation-delay: 0.6s; } 
.delay-4 { animation-delay: 0.8s; }

/* --- Footer --- */
.footer { 
    background: var(--bg-color-light); 
    text-align: center; 
    padding: 30px 5%; 
    margin-top: 60px; 
    border-top: 1px solid rgba(0, 0, 0, 0.1); 
}

.footer-links { 
    margin-top: 10px; 
}

.footer-links a { 
    margin: 0 15px; 
}

/* --- Animations & Responsive Design --- */
.animate-on-scroll { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}

.animate-on-scroll.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

@media (max-width: 992px) {
    .nav-links {
        display: none; 
    }
    .hamburger-menu {
        display: flex; 
    }

    .nav-container > .nav-links {
        position: fixed;
        top: 80px; 
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-color-dark);
        
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 25px;

        transition: right 0.4s ease-in-out;
    }

    .nav-container > .nav-links.active {
        right: 0; 
    }
    
    .hamburger-menu.active .bar:nth-child(1) { 
        transform: translateY(8px) rotate(45deg); 
    }
    .hamburger-menu.active .bar:nth-child(2) { 
        opacity: 0; 
    }
    .hamburger-menu.active .bar:nth-child(3) { 
        transform: translateY(-8px) rotate(-45deg); 
    }
}

.nav-container {
    padding: 0 15px;
}

/* Zmniejszamy logo i odstęp od tekstu */
.logo {
    height: 45px;
    width: 45px;
}
.logo-link {
    gap: 12px;
}

/* KLUCZOWA ZMIANA: Łamiemy tekst na dwie linie */
.logo-text {
    font-size: 1.4em;   /* Lekko zmniejszamy czcionkę */
    line-height: 1.1;   /* Zbliżamy linie do siebie */
    display: block;     /* Pozwalamy na ustawienie szerokości */
    max-width: 110px;   /* Ustalamy maksymalną szerokość, co wymusza łamanie tekstu */
}


@media (max-width: 768px) { 
    .hero-title { font-size: 3em; } 
    .section-title { font-size: 2.5em; } 
    .server-card-container { grid-template-columns: 1fr; } 
}

@media (max-width: 480px) { 
    .hero-title { font-size: 2.5em; } 
    .section-title { font-size: 2em; } 
    .nav-button { padding: 10px 18px; } 
}

.error-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    overflow: hidden;
}

.error-container {
    z-index: 1;
    position: relative;
}

.error-code {
    font-size: 10em;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title {
    font-size: 3em;
    margin-bottom: 10px;
}

.error-message {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #6c757d; 
}

.news-section {
    width: 100%;
}

.auth-form, .news-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 30px auto;
    background: var(--bg-color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-form input, .news-form input, .news-form textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-color-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1em;
}

.auth-form input:focus, .news-form input:focus, .news-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.2);
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
}

.user-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.user-panel p {
    font-size: 1.1em;
}

.subsection-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.news-article {
    background: var(--bg-color-light);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    transition: all var(--transition-speed);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.news-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.news-title {
    font-size: 1.8em;
    margin: 0;
}

.news-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 15px;
}

.news-content {
    white-space: pre-wrap; 
}

.news-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.news-actions button,
.event-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition-speed);
    color: white;
}

.edit-btn { background-color: #3498db; }
.delete-btn { background-color: #e74c3c; }
.edit-btn:hover { background-color: #2980b9; }
.delete-btn:hover { background-color: #c0392b; }

/* --- Modal do Edycji --- */
#edit-news-modal .modal-content {
    width: 90%;
    max-width: 600px;
}

#edit-news-modal .modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.news-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.news-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.news-author-details {
    display: flex;
    flex-direction: column;
}

.news-author-role {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.1em;
}

.news-author-name {
    font-size: 0.9em;
    color: #6c757d;
}

/* --- Style dla Modala Edycji (NOWE) --- */
#edit-news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#edit-news-modal.visible {
    display: flex;
    opacity: 1;
}

#edit-news-modal .modal-content {
    background: var(--bg-color-light); /* Light mode background for modal */
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#edit-news-modal .modal-buttons {
    margin-top: 20px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-button {
    padding: 10px 15px;
    border: 2px solid var(--bg-color-light);
    border-radius: var(--border-radius);
    background-color: var(--bg-color-light);
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.pagination-button:hover:not(:disabled) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.pagination-button.active {
    background-color: var(--primary-color);
    border-color: var(--secondary-color);
    color: #fff;
    cursor: default;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
}

/* --- NOWE, POPRAWIONE STYLE DLA PRZYCISKU MOTYWU --- */
#theme-toggle {
    /* Rozmiar i pozycja */
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    order: 99; /* Upewnia się, że jest na końcu */
    
    /* Wygląd */
    background-color: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    
    /* Pozycja ikon wewnątrz */
    position: relative;
    padding: 0;
}

/* Styl przy najeżdżaniu */
#theme-toggle:hover {
    background-color: var(--primary-color);
    transform: scale(1.1) rotate(15deg);
}

/* Kontenery na ikony */
.icon-sun, .icon-moon {
    position: absolute;
    width: 60%; /* Rozmiar ikony wewnątrz przycisku */
    height: 60%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- IKONA SŁOŃCA (SVG) --- */
.icon-sun {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
    opacity: 0;
    transform: scale(0);
}

/* --- IKONA KSIĘŻYCA (SVG) --- */
.icon-moon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F0F0F0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
    opacity: 1;
    transform: scale(1);
}

/* --- LOGIKA ZMIANY IKON --- */
/* Gdy jest jasny motyw, pokaż słońce i ukryj księżyc */
body.light-mode .icon-sun {
    opacity: 1;
    transform: scale(1);
}

body.light-mode .icon-moon {
    opacity: 0;
    transform: scale(0);
}

/* --- Kalendarz Wydarzeń (NOWE) --- */
.events-section {
    margin-top: 60px;
}

.event-article {
    background: var(--bg-color-light);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-color); /* Inny kolor dla odróżnienia */
    transition: all var(--transition-speed);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.event-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.event-title {
    font-size: 1.6em;
    margin: 0;
}

.event-date {
    font-weight: bold;
    color: var(--text-color);
    background-color: var(--primary-color);
    padding: 5px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    white-space: nowrap;
}

.event-author {
    font-size: 0.9em;
    color: #6c757d;
    width: 100%;
    margin-bottom: 10px;
}

.event-description {
    white-space: pre-wrap;
}

.event-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Modal do Edycji Wydarzeń */
#edit-event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2001; /* Wyżej niż modal aktualności */
    opacity: 0;
    transition: opacity 0.3s ease;
}

#edit-event-modal.visible {
    display: flex;
    opacity: 1;
}

#edit-event-modal .modal-content {
    background: var(--bg-color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
}

#edit-event-modal .modal-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* --- Dodatkowe Ikony Font Awesome --- */
.fa, .fas {
    color: var(--primary-color);
}

/* --- Sekcja Statystyk Serwera --- */
.server-stats-section {
    padding-top: 80px;
    padding-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--bg-color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
    transition: all var(--transition-speed) ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-color);
    word-break: break-all;
}

.stat-label {
    font-size: 1em;
    color: #6c757d;
    margin-top: 5px;
}

/* --- Sekcja Przewodnika po Kanałach --- */
.channels-section {
    padding-top: 80px;
    padding-bottom: 40px;
}

.channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dwie kolumny */
    gap: 30px;
}

.channel-card {
    background: var(--bg-color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.channel-card:hover {
     transform: scale(1.03);
     box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.channel-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.channel-name::before {
    content: '#';
    color: var(--accent-color);
    margin-right: 5px;
}

.channel-description {
    color: #6c757d;
    font-size: 1em;
    flex-grow: 1; /* Wypełnia dostępną przestrzeń */
}


/* --- Sekcja Bota Nexa --- */
.bot-section {
    padding-top: 80px;
    padding-bottom: 40px;
    text-align: center;
}

.bot-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    text-align: center; /* Zmieniono na center */
}

.command-card {
    background: transparent;
    padding: 35px 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(155, 89, 182, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center; /* Wycentrowanie elementów */
    gap: 15px;
    transition: all var(--transition-speed) ease;
}

.command-card:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-color-light);
    transform: translateY(-5px);
}

.command-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.command-name {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-color-dark);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.2em;
    color: var(--accent-color);
    font-weight: bold;
}

.command-description {
    color: #6c757d;
}

/* --- Poprawki responsywności dla nowych sekcji --- */
@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: 1fr;
    }
}

.commands-page {
    padding: 120px 0 60px 0; /* Więcej miejsca od góry przez header */
}

/* --- Przycisk Powrotu --- */
.btn-back {
    display: inline-block;
    padding: 12px 24px;
    margin-bottom: 30px; /* Odstęp od paska wyszukiwania */
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-back:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
}

.btn-back i {
    margin-right: 8px; /* Odstęp między ikoną a tekstem */
}

/* --- Pasek Wyszukiwania --- */
.search-bar-container {
    position: relative;
    margin: 30px auto;
    max-width: 700px;
}

#command-search {
    width: 100%;
    padding: 15px 20px 15px 50px; /* Miejsce na ikonę */
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background-color: var(--background-color-light);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#command-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-muted);
}

/* --- Główny Kontener --- */
.commands-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-top: 40px;
}

/* --- Sidebar z kategoriami --- */
.category-sidebar {
    flex: 0 0 250px; /* Stała szerokość sidebara */
    background-color: var(--background-color-light);
    border-radius: 10px;
    padding: 15px;
    height: fit-content; /* Dopasowuje wysokość do zawartości */
}

.category-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2rem;
}

.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-sidebar li {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.category-sidebar li:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.category-sidebar li.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 8px rgba(var(--primary-color-rgb), 0.3);
}

/* --- Lista komend --- */
.command-list {
    flex-grow: 1;
}

.command-category-section {
    margin-bottom: 40px;
}

.command-category-title {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.command-item {
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.command-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.command-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.command-item-name {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--background-color-dark);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.command-item-aliases {
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.command-item-description {
    margin: 0;
    line-height: 1.6;
}

.placeholder-text, #no-results-message {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color-muted);
    padding: 50px 0;
}

/* --- Responsywność --- */
@media (max-width: 768px) {
    .commands-container {
        flex-direction: column;
    }

    .category-sidebar {
        flex: 0 0 auto; /* Zresetuj flexbox */
        width: 100%;
    }
}
..sidebar-pagination {
    display: flex;
    justify-content: space-between; 
    align-items: center;        
    margin-top: 20px;              
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
}

.sidebar-pagination button {
    background-color: #007bff; 
    color: #fff;
    border: none;
    padding: 8px 15px; 
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px; 
}

.sidebar-pagination button:hover:not(:disabled) {
    background-color: #0056b3; /* --accent-hover-color */
}

.sidebar-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


.sidebar-pagination .page-indicator {
    font-size: 16px;    
    font-weight: 700;     
    color: #fff;          /* Możesz tu użyć swojej zmiennej --text-color */
    padding: 0 15px;      
    white-space: nowrap;  
}

.content-page .container {
    max-width: 1400px; /* Zwiększamy szerokość, aby 3 kolumny wyglądały dobrze */
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: left;
}

/* Przycisk powrotu (bez zmian) */
.btn.btn-back {
    display: inline-block;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.btn.btn-back i {
    margin-right: 8px;
}

.btn.btn-back:hover {
    background-color: var(--accent-hover-color);
    transform: translateY(-2px);
}

/* === GŁÓWNA ZMIANA - UKŁAD SIATKI NA 3 KOLUMNY === */
.rules-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* <--- ZMIANA Z 2 NA 3 */
    gap: 1.5rem; /* Zmniejszony odstęp, aby pasowało do 3 kolumn */
    
    background: none;
    border: none;
    padding: 0;
}

/* Pojedyncza sekcja regulaminu (bez zmian) */
.rule-section {
    background-color: rgba(20, 22, 30, 0.6);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Tytuł paragrafu regulaminu (bez zmian) */
.rule-title {
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Tekst w paragrafie regulaminu (bez zmian) */
.rule-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary-color, #ccc);
    margin-bottom: 0.5rem;
}


/* === ULEPSZONY RESPONSIVE DESIGN === */

/* Dla dużych tabletów i mniejszych desktopów - przełączamy na 2 kolumny */
@media (max-width: 1200px) {
    .rules-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Dla małych tabletów i telefonów - przełączamy na 1 kolumnę */
@media (max-width: 768px) {
    .rules-container {
        grid-template-columns: 1fr;
    }

    .content-page .container {
        padding: 2rem 1.5rem;
    }

    .rule-title {
        font-size: 1.5rem;
    }
}

.features-section {
    padding-top: 80px;
    padding-bottom: 40px;
}

.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.feature-card { 
    background: var(--bg-color-light); 
    padding: 40px; 
    border-radius: var(--border-radius); 
    text-align: center; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-speed) ease; 
}

.feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); 
    border-bottom-color: var(--primary-color); 
}

.feature-icon { 
    font-size: 3em; 
    margin-bottom: 20px; 
    color: var(--primary-color);
}

.feature-title { 
    font-size: 1.5em; 
    margin-bottom: 15px; 
}

.feature-description {
    color: #6c757d;
    font-size: 1em;
    line-height: 1.6;
}

/* ====================================================== */
/* === POCZĄTEK STYLI DLA WIDŻETU POMOCY              === */
/* ====================================================== */

/* Przycisk otwierający widżet (FAB) */
.widget-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

.widget-fab img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Główny kontener widżetu */
.chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 370px;
    max-height: 70vh;
    background-color: var(--bg-color-dark);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    
    /* Animacja pojawiania się */
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.chat-widget-container.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Nagłówek widżetu */
.widget-header {
    background-color: var(--bg-color-light);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--header-border-color);
    flex-shrink: 0;
}

.widget-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.widget-header-logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.widget-header button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.widget-header button:hover {
    opacity: 1;
}

.widget-back-btn {
    visibility: hidden; /* Domyślnie ukryty */
}

/* Ciało widżetu */
.widget-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.widget-view {
    display: none; /* Wszystkie widoki domyślnie ukryte */
}

.widget-view.active {
    display: block; /* Pokazuje tylko aktywny widok */
}

/* Widok: Strona główna */
.widget-welcome-message h1 {
    font-size: 2em;
    margin-bottom: 20px;
}
.wave {
    display: inline-block;
    animation: wave-animation 2s infinite;
}
@keyframes wave-animation {
    0% { transform: rotate(0.0deg) }
    10% { transform: rotate(14.0deg) }
    20% { transform: rotate(-8.0deg) }
    30% { transform: rotate(14.0deg) }
    40% { transform: rotate(-4.0deg) }
    50% { transform: rotate(10.0deg) }
    60% { transform: rotate(0.0deg) }
    100% { transform: rotate(0.0deg) }
}

.widget-chat-prompt {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--bg-color-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}
.widget-chat-prompt img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.widget-chat-prompt p {
    margin: 0;
    font-size: 0.9em;
}

.widget-button-primary {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 20px;
}
.widget-button-primary:hover {
    background-color: #0056b3;
}
.widget-button-primary i {
    margin-left: 8px;
}

.widget-options .widget-option-card {
    background-color: var(--bg-color-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.widget-option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
.widget-option-card i {
    color: var(--primary-color);
    margin-right: 10px;
}
.widget-option-card h3 {
    font-size: 1em;
    margin: 0 0 5px 0;
    display: inline;
}
.widget-option-card p {
    font-size: 0.8em;
    color: #6c757d;
    margin: 0;
}

/* Widok: Czat (Placeholder) */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 200px;
}
.message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 80%;
}
.message.received {
    align-self: flex-start;
}
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.message-content {
    background: var(--bg-color-light);
    padding: 10px 15px;
    border-radius: 15px;
}
.message-content p {
    margin: 0;
    font-size: 0.9em;
}
.chat-input-area {
    display: flex;
    margin-top: 20px;
    gap: 10px;
}
.chat-input-area input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--header-border-color);
    background-color: var(--bg-color-dark);
    color: var(--text-color);
}
.chat-input-area button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: #fff;
    cursor: pointer;
}

/* Widok: Centrum Pomocy */
.help-search-bar {
    position: relative;
    margin-bottom: 20px;
}
.help-search-bar input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border-radius: 8px;
    border: 1px solid var(--header-border-color);
    background-color: var(--bg-color-light);
    color: var(--text-color);
}
.help-search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}
.help-category {
    margin-bottom: 15px;
}
.help-category h4 {
    margin-bottom: 10px;
    font-size: 1em;
    color: var(--primary-color);
}
.help-article-link {
    display: block;
    padding: 10px;
    background-color: var(--bg-color-light);
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--text-color);
    transition: background-color 0.2s;
}
.help-article-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Widok: Formularz kontaktowy */
.widget-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.widget-form label {
    font-size: 0.9em;
    font-weight: bold;
}
.widget-form input, .widget-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--header-border-color);
    background-color: var(--bg-color-light);
    color: var(--text-color);
    font-family: inherit;
}
.widget-form textarea {
    resize: vertical;
}

/* Stopka widżetu */
.widget-footer {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background-color: var(--bg-color-light);
    border-top: 1px solid var(--header-border-color);
    flex-shrink: 0;
}
.widget-nav-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    width: 60px;
}
.widget-nav-btn i {
    font-size: 1.5em;
}
.widget-nav-btn.active {
    color: var(--primary-color);
}

/* Responsywność dla widżetu */
@media (max-width: 480px) {
    .chat-widget-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    .widget-fab {
        bottom: 15px;
        right: 15px;
    }
}
/* ====================================================== */
/* === KONIEC STYLI DLA WIDŻETU POMOCY                 === */
/* ====================================================== */