/* --- Zmienne --- */
:root {
    --bg-color: #0b0c10;
    --glass-bg: rgba(17, 18, 22, 0.65);
    --glass-panel-bg: rgba(22, 24, 30, 0.45);
    --glass-border: rgba(255, 255, 255, 0.07);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-green: #22c55e;
    --accent-green-hover: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Delikatny, klimatyczny zielony gradient w tle serwera */
    background-image: radial-gradient(circle at 50% -20%, rgba(34, 197, 94, 0.12), transparent 50%);
}

/* --- Klasy Glassmorphism --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-panel {
    background: var(--glass-panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

/* --- Kontener Główny (Spina całą stronę) --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    /* Odstępy między dużymi sekcjami */
    flex-grow: 1;
}

/* --- Nawigacja --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-green);
    text-shadow: 0 0 10px var(--accent-glow);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-green);
}

/* --- Sekcja Hero --- */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: var(--accent-green);
    text-shadow: 0 0 15px var(--accent-glow);
}

.lore {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* --- Status Serwera & Widget IP --- */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.server-status p {
    font-size: 0.95rem;
}

.server-status strong {
    color: var(--accent-green);
}

.ip-copy {
    background: var(--accent-green);
    color: #0b0c10;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.ip-copy:hover {
    background: var(--accent-green-hover);
    transform: scale(1.05);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    animation: float 4s ease-in-out infinite;
    /* Efekt unoszenia się skina w powietrzu */
}

/* --- Sekcja Atrakcje (Features) --- */
.features {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-green);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Sekcja O serwerze (About) --- */
.about {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3.5rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6));
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.about-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

.about-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}
/* =========================================
   STYLE DLA SEKCJI MAPY
   ========================================= */

.server-map-section {
    margin-top: 2rem;
}

.map-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 15px;
}

.map-title-box {
    text-align: left;
}

.map-title-box h2 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 5px;
}

.map-title-box p {
    color: #9ca3af;
    margin: 0;
}

.btn-fullscreen {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.btn-fullscreen:hover {
    background: #2980b9;
    color: #fff;
}

.map-iframe-container {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 1000px;
    resize: vertical;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-iframe-container iframe {
    border: none;
}

.map-resize-tip {
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* =========================================
   ANIMACJA LEWITACJI (np. dla pszczółki)
   ========================================= */

@keyframes floatUpDown {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
        /* Pszczółka leci w górę o 20 pikseli */
    }

    100% {
        transform: translateY(0px);
    }
}

.floating-bee {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.3));
    /* Zachowujemy Twój żółty cień! */
    animation: floatUpDown 4s ease-in-out infinite;
    /* Czas trwania jednego cyklu to 4 sekundy */
}

/* --- Stopka (Footer) --- */
.footer {
    margin-top: auto;
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: none;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-left h3 {
    font-size: 1.6rem;
    font-weight: 700;
}

.footer-left h3 span {
    color: var(--accent-green);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mojang-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

.footer-right {
    display: flex;
    gap: 5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-green);
}

/* --- Pozostałe klasy (Zachowane na przyszłość) --- */
.stat-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-left: 4px solid #4ade80;
    height: 100%;
}

.btn-pass {
    background: transparent;
    border: 1px solid #374151;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-pass:hover {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    color: #fff;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.status-online {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-offline {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af !important;
    border: 1px solid var(--glass-border);
}

.border-rank {
    border-left-color: #a855f7 !important;
}

/* --- Animacje (Efekty Wizualne) --- */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Responsywność (RWD dla Smartfonów i Tabletów) --- */
@media (max-width: 968px) {
    .container {
        gap: 3.5rem;
        padding: 2rem 1.2rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }

    .server-status {
        justify-content: center;
    }

    .about {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-right {
        justify-content: center;
        gap: 3rem;
    }
}

/* =========================================
   FORMULARZE I LOGOWANIE (login.php)
========================================= */

/* Wyśrodkowanie panelu na ekranie */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    /* Pozwala kontenerowi zająć resztę wolnego miejsca */
    min-height: 70vh;
}

/* Węższy panel dopasowany do formularza */
.auth-panel {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.panel-header {
    text-align: center;
    margin-bottom: 2rem;
}

.panel-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

/* Pola tekstowe */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 12px var(--accent-glow);
    background: rgba(0, 0, 0, 0.4);
}

/* Komunikaty o błędach (Alert) */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Przycisk logowania */
.btn-submit {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--accent-green);
    color: #0b0c10;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
    background: var(--accent-green-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* =========================================
   STYLE DLA ZAKŁADKI STATYSTYKI (stats.php)
   ========================================= */

.stats-body {
    background: #0b0c10;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.active-link {
    color: #4ade80 !important;
}

.stat-subtitle {
    color: #9ca3af;
}

.stats-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stats-tab {
    padding: 10px 25px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.stats-tab.active {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border-color: #4ade80;
}

/* Tabela ze statystykami */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-table th {
    color: #9ca3af;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stats-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Kolory podium (miejsca 1, 2, 3) */
.rank-1 {
    color: #f1c40f;
    font-weight: bold;
}

.rank-2 {
    color: #bdc3c7;
    font-weight: bold;
}

.rank-3 {
    color: #cd7f32;
    font-weight: bold;
}

.stat-avatar {
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 10px;
}

.stat-balance {
    color: #4ade80;
    font-weight: 600;
}

.in-construction {
    color: #9ca3af;
}