:root {
    --primary-color: #38a169; /* Zielony Minecraft (Akcent) */
    --secondary-color: #2c5236; /* Ciemniejszy zielony (Tło nawigacji/Stopki) */
    --text-color: #333;
    --background-color: #f4f4f9;
    --card-background: #fff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* --- Nagłówek --- */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.logo-area {
    margin-bottom: 10px;
}

.server-logo {
    max-width: 150px; 
    height: auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px var(--secondary-color);
}

.ip-address {
    font-size: 1.2em;
    background-color: var(--secondary-color);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.ip-address span {
    font-weight: bold;
}

.ip-address i {
    margin-left: 10px;
    transition: color 0.3s;
}

.ip-address i:hover {
    color: #ffcc00; 
}

/* --- Nawigacja --- */
.main-nav {
    background-color: var(--secondary-color); 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: sticky; 
    top: 0;
    z-index: 500;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; 
}

.main-nav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.main-nav li a:hover {
    background-color: var(--primary-color); 
}

/* --- Kontener i Sekcje Główne --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--secondary-color);
}

h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 2em;
}

/* --- Tryby Gry (Grid) --- */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.mode-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.mode-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.mode-card h3 {
    color: var(--primary-color);
    margin: 15px 15px 5px;
    font-size: 1.5em;
}

.mode-card p {
    padding: 0 15px;
    font-size: 0.95em;
    color: #555;
    margin-bottom: 15px;
}

.details-button {
    display: block;
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 10px 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.details-button:hover {
    background-color: var(--secondary-color);
}

.plans {
    text-align: center;
    margin-top: 40px;
    font-style: italic;
    color: #888;
}

.info-section {
    margin-top: 60px;
    padding: 30px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

/* --- Regulamin (sekcja na podstronie regulamin.html) --- */
.rules-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.rules-heading {
    text-align: center;
    margin-bottom: 15px;
}

.rules-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
    padding-left: 0;
}

.rules-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.rules-intro, .rules-footer {
    text-align: center;
    margin: 15px 0;
    font-style: italic;
    color: #555;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 20px 0;
}

/* --- Modal (Wyskakujące Okienko) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7); 
    padding-top: 60px;
}

.modal-content {
    background-color: var(--card-background);
    margin: 5% auto; 
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    animation-name: animatetop;
    animation-duration: 0.4s
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-content h3 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 1.1em;
    color: #444;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* --- Stopka (Footer) --- */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 0.9em;
}

footer p {
    margin: 5px 20px; 
    line-height: 1.4;
}

/* --- Media Queries (Responsywność) --- */
@media (max-width: 768px) {
    .modes-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 15px 0;
    }

    .logo {
        font-size: 2em;
    }

    .server-logo {
        max-width: 120px; 
    }

    .ip-address {
        font-size: 1em;
    }

    .container {
        margin: 20px auto;
    }
}

@media (max-width: 600px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .main-nav li a {
        padding: 10px 15px;
    }
}