:root {
    --bg-dark: #121215;
    --bg-card: #1c1c22;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a5;
    --accent-red: #d32f2f;
    --accent-orange: #f57c00;
    --hover-red: #b71c1c;
    --hover-orange: #e65100;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(28, 28, 34, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-orange);
    letter-spacing: 2px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-rules-btn {
    background-color: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 6px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-rules-btn:hover {
    background-color: var(--accent-red);
    color: #fff;
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switcher button:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

/* Hero Section со слайдером (4 биома) */
.hero {
    position: relative;
    text-align: center;
    padding: 120px 20px;
    overflow: hidden;
}

.hero-slides {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
}

/* Пути к картинкам PNG */
.hero-slide:nth-child(1) { background-image: url('images/bg-forest.png'); animation: fade1 20s infinite; }
.hero-slide:nth-child(2) { background-image: url('images/bg-desert.png'); animation: fade2 20s infinite; }
.hero-slide:nth-child(3) { background-image: url('images/bg-snow.png'); animation: fade3 20s infinite; }
.hero-slide:nth-child(4) { background-image: url('images/bg-jungle.png'); animation: fade4 20s infinite; }

/* Математика для 4 слайдов */
@keyframes fade1 {
    0%, 20% { opacity: 1; }
    25%, 95% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fade2 {
    0%, 20% { opacity: 0; }
    25%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@keyframes fade3 {
    0%, 45% { opacity: 0; }
    50%, 70% { opacity: 1; }
    75%, 100% { opacity: 0; }
}
@keyframes fade4 {
    0%, 70% { opacity: 0; }
    75%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(18, 18, 21, 0.7), var(--bg-dark));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* Servers Section */
.servers-section {
    padding: 60px 20px;
    text-align: center;
}

.servers-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.server-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.server-card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    width: 350px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--accent-red);
}

.server-card.biweekly {
    border-top: 4px solid var(--accent-orange);
}

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

.server-card h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.server-type {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.server-features {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 0;
}

.server-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.server-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
}

.server-status {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-dot.online { background-color: #4caf50; box-shadow: 0 0 8px #4caf50; }
.status-dot.offline { background-color: #f44336; box-shadow: 0 0 8px #f44336; }

.timers {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: block;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    color: #fff;
}

.btn-primary { background-color: var(--accent-red); }
.btn-primary:hover { background-color: var(--hover-red); }

.btn-secondary { background-color: var(--accent-orange); }
.btn-secondary:hover { background-color: var(--hover-orange); }

.btn-donate {
    background-color: #4caf50;
    display: inline-block;
    padding: 15px 40px;
    margin-top: 20px;
}
.btn-donate:hover { background-color: #388e3c; }

/* Donate Section */
.donate-section {
    background-color: var(--bg-card);
    text-align: center;
    padding: 60px 20px;
    margin-top: 40px;
}

.donate-section h2 { color: var(--text-main); margin-bottom: 15px; }
.donate-section p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background-color: #0a0a0c;
    border-top: 1px solid #222;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent-orange); }
footer p { margin-top: 20px; color: #555; font-size: 0.8rem; }

/* Адаптивность */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; }
    .nav-controls { flex-direction: column; }
    .hero h1 { font-size: 2rem; }
    .server-cards { flex-direction: column; align-items: center; }
    .server-card { width: 100%; max-width: 400px; }
}

/* Модальное окно (Правила) */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px); 
    overflow: hidden;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5vh auto; 
    padding: 40px;
    border: 1px solid var(--accent-red);
    width: 90%;
    max-width: 700px;
    max-height: 90vh; 
    overflow-y: auto; 
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    animation: slideDown 0.3s ease-out;
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 8px; }
.modal-content::-webkit-scrollbar-thumb { background-color: var(--accent-red); border-radius: 8px; }

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close-btn:hover { color: var(--accent-red); }

.modal-content h2 {
    color: var(--text-main);
    margin-bottom: 25px;
    text-align: center;
    font-size: 2rem;
    text-transform: uppercase;
}

.rules-list {
    list-style: decimal inside;
    color: var(--text-muted);
}
.rules-list li {
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}
.rules-list li strong {
    color: var(--accent-orange);
    display: block;
    font-size: 1.15rem;
    margin-bottom: 8px;
}