/* --- GLOBALNE USTAWIENIA I ZMIENNE (NOWA, POPRAWIONA PALETA Z AKCENTEM RUST) --- */
:root {
    --color-bg-main: #1A1A1A;      /* Głęboka czerń ze słuchawek */
    --color-bg-surface: #2c2521;  /* Ciemny, lekko nasycony brąz na karty/panele */
    --color-bg-stats: #3D342E;     /* Ciemny brąz z futra - dla paska statystyk */

    --color-text-header: #FFFFFF;  /* Czysta biel dla nagłówków, dla max kontrastu */
    --color-text-body: #F1E3AD;   /* Jasny beż z pyszczka - dla głównego tekstu */
    --color-text-muted: #D4C494;  /* Ciemniejszy beż - dla etykiet i opisów */

    --color-accent-primary: #5BC0EB; /* Główny błękit ze słuchawek */
    --color-accent-secondary: #1B8BBD;/* Ciemniejszy błękit dla przycisków/hoverów */
    --color-accent-rust: #E76F51; /* MOCNY RUSTOWY POMARAŃCZ - jako pop! */
    --color-accent-rust-dark: #D45B3E; /* Ciemniejszy odcień dla hoverów */
    
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Nowe zmienne dla animacji */
    --shadow-strong: 0 10px 30px rgba(0,0,0,0.6);
    --shadow-hover: 0 15px 45px rgba(0,0,0,0.8);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-body);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Zapobiega poziomemu scrollowaniu od animacji */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAGŁÓWEK --- */
.main-header {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-bg-surface);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-strong);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 28px;
    color: #fff;
    letter-spacing: 1px;
}
.logo span {
    color: var(--color-accent-primary);
}

.main-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -8px;
    left: 50%;
    background-color: var(--color-accent-rust);
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-nav a:hover {
    color: #fff;
}
.main-nav a:hover:after {
    width: 100%;
}

.button-primary {
    background-color: var(--color-accent-rust);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(231,111,81,0.4);
}
.button-primary:hover {
    background-color: var(--color-accent-rust-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(231,111,81,0.6);
}
.button-primary .icon {
    margin-right: 8px;
    font-size: 20px;
}

/* --- PRZEŁĄCZNIK JĘZYKÓW --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-surface);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-switcher button.active {
    background-color: var(--color-accent-rust);
    color: #fff;
    box-shadow: 0 3px 10px rgba(231,111,81,0.4);
}

.lang-switcher button:not(.active):hover {
    color: var(--color-accent-rust);
}

.lang-switcher span {
    color: var(--color-bg-stats);
    padding: 0 2px;
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--color-bg-main);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.25;
}
#hero-canvas video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zapewnia pełne pokrycie */
}


.hero-content {
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 6.5rem;
    font-weight: 900;
    color: var(--color-text-header);
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 25px rgba(91, 192, 235, 0.6), 0 0 50px rgba(91, 192, 235, 0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}
@keyframes textGlow {
    from { text-shadow: 0 0 15px rgba(91, 192, 235, 0.4), 0 0 30px rgba(91, 192, 235, 0.2); }
    to { text-shadow: 0 0 25px rgba(91, 192, 235, 0.6), 0 0 50px rgba(91, 192, 235, 0.3); }
}


.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--color-accent-primary);
    margin: 0 0 25px 0;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-body);
    opacity: 0.9;
}

/* --- STATYSTYKI --- */
.stats-bar {
    background-color: var(--color-bg-stats);
    border-top: 1px solid var(--color-bg-surface);
    border-bottom: 1px solid var(--color-bg-surface);
    padding: 30px 0;
    box-shadow: var(--shadow-strong);
}
.stats-bar .container {
    display: flex;
    justify-content: space-around;
}
.stat {
    text-align: center;
    position: relative;
    padding: 0 10px;
}
.stat .value {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text-header);
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
    line-height: 1.2;
}
.stat .label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#admin-status.online {
    color: #4CAF50;
    text-shadow: 0 0 8px rgba(76,175,80,0.5);
}
#admin-status.offline {
    color: #9E9E9E;
    text-shadow: 0 0 8px rgba(158,158,158,0.3);
}

/* --- SEKCJE GŁÓWNE --- */
.content-section {
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="5" cy="5" r="1" fill="%234A403A" opacity="0.1"/></svg>');
    background-size: 30px 30px;
    animation: moveParticles 60s linear infinite;
    opacity: 0.1;
    z-index: 0;
}
@keyframes moveParticles {
    0% { background-position: 0 0; }
    100% { background-position: 300px 300px; }
}


.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 900;
    color: var(--color-text-header);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.section-title span {
    color: var(--color-accent-rust);
    text-shadow: 0 0 10px rgba(231,111,81,0.5);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-body);
    max-width: 700px;
    margin: -20px auto 60px auto;
    opacity: 0.9;
}

/* --- WYDARZENIA --- */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.event-card {
    background-color: var(--color-bg-surface);
    border: 1px solid #4a403a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: var(--shadow-strong);
    position: relative;
}
.event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, var(--color-accent-rust-dark) 0%, var(--color-accent-primary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}
.event-card:hover::before {
    opacity: 0.1;
}

.event-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent-rust);
}
.event-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    filter: brightness(0.8) contrast(1.1);
    transition: filter 0.3s ease;
    position: relative;
    z-index: 2;
}
.event-card:hover img {
    filter: brightness(1) contrast(1);
}
.card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}
.card-content h3 {
    margin: 0 0 12px 0;
    font-family: var(--font-heading);
    color: var(--color-accent-rust);
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(231,111,81,0.3);
}
.card-content p {
    color: var(--color-text-body);
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* --- GALERIA --- */
#gallery {
    background-color: #151210;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--color-bg-surface);
}
.parallax-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.07;
    z-index: 0;
}
.parallax-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

#gallery .container {
    position: relative;
    z-index: 2;
}
.gallery-wrapper {
    overflow-x: auto;
    padding-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-rust) var(--color-bg-surface);
}
.gallery-wrapper::-webkit-scrollbar {
    height: 8px;
}
.gallery-wrapper::-webkit-scrollbar-track {
    background: var(--color-bg-surface);
    border-radius: 10px;
}
.gallery-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-accent-rust);
    border-radius: 10px;
    transition: background 0.3s ease;
}
.gallery-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-rust-dark);
}

.gallery-rail {
    display: flex;
    gap: 25px;
    width: max-content;
    padding: 10px 0;
}
.gallery-rail img {
    height: 320px;
    border-radius: 10px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 2px solid transparent;
}
.gallery-rail img:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    border-color: var(--color-accent-rust);
}

/* --- FOOTER --- */
footer {
    background-color: var(--color-bg-main);
    border-top: 1px solid var(--color-bg-surface);
    padding: 40px 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.social-links a {
    margin-left: 20px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}
.social-links a:hover {
    color: var(--color-accent-rust);
    transform: translateY(-3px);
}
.social-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent-rust);
    transition: width 0.3s ease;
}
.social-links a:hover:after {
    width: 100%;
}


/* --- ANIMACJE --- */
.animate-on-load {
    animation: fadeInSlideUp 1s ease both;
}
.hero-content h1.animate-on-load { animation-delay: 0.2s; }
.hero-content h2.animate-on-load { animation-delay: 0.4s; }
.hero-content p.animate-on-load { animation-delay: 0.6s; }

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.event-card:nth-child(1) { transition-delay: 0.1s; }
.event-card:nth-child(2) { transition-delay: 0.2s; }
.event-card:nth-child(3) { transition-delay: 0.3s; }
.stats-bar .stat:nth-child(1) { transition-delay: 0.1s; }
.stats-bar .stat:nth-child(2) { transition-delay: 0.2s; }
.stats-bar .stat:nth-child(3) { transition-delay: 0.3s; }
.stats-bar .stat:nth-child(4) { transition-delay: 0.4s; }

/* --- STYLIZACJA OKNA MODALNEGO Z ZASADAMI --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px) brightness(0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    visibility: visible;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background-color: var(--color-bg-surface);
    border: 1px solid #4a403a;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    width: 90%;
    max-width: 700px;
    position: relative;
    padding: 30px 40px;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid var(--color-accent-rust);
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Ogranicz maksymalną wysokość modalu */
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.7);
}
.modal-body {
    margin-top: 15px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
    max-height: 60vh; /* Ogranicz wysokość obszaru zawartości */
}
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: var(--color-bg-surface);
    border-radius: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: var(--color-accent-rust);
    border-radius: 6px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-rust-dark);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}
.modal-close-btn:hover {
    color: var(--color-accent-rust);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}
.modal-header .icon {
    font-size: 48px;
    color: var(--color-accent-rust);
    text-shadow: 0 0 15px var(--color-accent-rust);
}
.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text-header);
    margin: 10px 0 0 0;
    letter-spacing: 1px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.modal-body li {
    background-color: rgba(0,0,0,0.2);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--color-accent-primary);
    color: var(--color-text-body);
    font-size: 1.05rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: ruleFadeIn 0.5s ease forwards;
}
.modal-body li:nth-child(1) { animation-delay: 0.2s; }
.modal-body li:nth-child(2) { animation-delay: 0.3s; }
.modal-body li:nth-child(3) { animation-delay: 0.4s; }
.modal-body li:nth-child(4) { animation-delay: 0.5s; }
.modal-body li:nth-child(5) { animation-delay: 0.6s; }

@keyframes ruleFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 4.5rem; }
    .hero-content h2 { font-size: 3rem; }
    .section-title { font-size: 3rem; }
    .event-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .main-header .container { flex-direction: column; }
    .main-nav { margin: 15px 0; }
    .header-right { flex-direction: column-reverse; gap: 10px; width: 100%; }
    .connect-button { width: 100%; justify-content: center; }
    .lang-switcher { margin-right: 0; margin-bottom: 10px; }

    .hero-content h1 { font-size: 3.5rem; }
    .hero-content h2 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }

    .stats-bar .container { flex-direction: column; gap: 25px; padding: 25px 0; }
    .stat .value { font-size: 1.8rem; }
    .stat .label { font-size: 0.9rem; }

    .content-section { padding: 60px 20px; }
    .section-title { font-size: 2.5rem; margin-bottom: 25px; }
    .section-subtitle { margin-bottom: 30px; font-size: 1rem; }
    .event-grid { grid-template-columns: 1fr; }
    .event-card img { height: 180px; }
    .card-content h3 { font-size: 1.4rem; }

    .gallery-rail img { height: 250px; }
    footer .container { flex-direction: column; gap: 15px; }
    .social-links a { margin: 0 10px; }
}

@media (max-width: 480px) {
    .logo { font-size: 24px; }
    .main-nav a { margin: 0 8px; font-size: 0.9rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content h2 { font-size: 1.8rem; }
    .section-title { font-size: 2rem; }
}

/* Dodatkowe style dla lepszego formatowania treści w modalu "O serwerze" */
#about-content h3 {
    color: var(--color-accent-rust);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 10px;
    border-left: 3px solid var(--color-accent-rust);
    padding-left: 10px;
}

#about-content h3:first-child {
    margin-top: 0;
}

#about-content p, #about-content li {
    color: var(--color-text-body);
    margin-bottom: 8px;
    line-height: 1.6;
}

#about-content ul {
    padding-left: 25px;
    margin-bottom: 15px;
}

#about-content li {
    margin-bottom: 6px;
}
