/* Общие стили и сброс */
:root {
    --primary-color: #4CAF50; /* Зелёный, как трава */
    --secondary-color: #8D6E63; /* Коричневый, как дерево */
    --accent-color: #FFC107; /* Золотой, как солнце/руда */
    --text-color-dark: #333;
    --text-color-light: #f4f4f4;
    --bg-light: #f0f0f0;
    --bg-dark: #2c3e50; /* Тёмный фон для футера/хедера */
    --border-color: #ccc;
    --card-bg: #ffffff;
    --spacing-lg: 60px;
    --spacing-md: 40px;
    --spacing-sm: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--bg-light);
    overflow-x: hidden; /* Предотвращает горизонтальную прокрутку */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color-dark);
    margin-bottom: var(--spacing-sm);
}

h2 { font-size: 2.8em; text-align: center; margin-bottom: var(--spacing-md); }
h3 { font-size: 2.2em; text-align: center; margin-bottom: var(--spacing-md); }
h4 { font-size: 1.6em; margin-bottom: 10px; }

p {
    margin-bottom: 1em;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-size: 1em;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.primary-btn:hover {
    background-color: #5cb85c; /* Чуть темнее */
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: var(--accent-color);
    color: var(--text-color-dark);
}

.secondary-btn:hover {
    background-color: #FFD700; /* Чуть темнее */
    transform: translateY(-2px);
}

.text-link {
    font-weight: 600;
}

/* Header */
.header {
    background-color: var(--bg-dark);
    color: var(--text-color-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2em;
    color: var(--text-color-light);
    margin: 0;
}

.nav ul {
    list-style: none;
    display: flex;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    color: var(--text-color-light);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav ul li a:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent-color);
}


/* Hero Section */
.hero-section {
    background: linear-gradient(to bottom right, #4CAF50, #8D6E63); /* От зеленого к коричневому */
    color: var(--text-color-light);
    text-align: center;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    background-position: center center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2); /* Немного уменьшил прозрачность для градиента */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h2 {
    color: var(--text-color-light);
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.ip-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    gap: 15px;
}

#server-ip {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--accent-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid var(--accent-color);
    user-select: all; /* Позволяет легко выделить текст */
}

/* Sections */
.section {
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.section:nth-of-type(even) {
    background-color: var(--bg-light); /* Светлый фон для чередования */
}

.section:nth-of-type(odd) {
    background-color: #e8e8e8; /* Чуть темнее светлого фона */
}

.about-section .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.feature-item {
    background-color: var(--card-bg);
    padding: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: left;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h4 {
    color: var(--primary-color);
}

.join-section .step-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto var(--spacing-md) auto;
    text-align: left;
}

.join-section .step-list li {
    background-color: var(--card-bg);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    font-size: 1.1em;
}

.highlight-ip {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    background-color: #e6ffe6;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--primary-color);
    white-space: nowrap; /* Чтобы IP не переносился */
}

.rule-list {
    list-style: none;
    max-width: 700px;
    margin: 0 auto var(--spacing-md) auto;
    text-align: left;
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.rule-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.rule-list li strong {
    color: var(--secondary-color);
}

.rule-list li::before {
    content: '⛏️'; /* Символ кирки или другого элемента Minecraft */
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.note {
    font-style: italic;
    color: #666;
    margin-top: 20px;
}

/* Стили для секции "Моды" */
.mods-section .download-all-mods {
    margin-bottom: var(--spacing-md); /* Отступ между большой кнопкой и заголовком отдельных модов */
}

.mods-section .large-btn {
    padding: 18px 40px; /* Увеличиваем размер кнопки */
    font-size: 1.4em; /* Увеличиваем шрифт */
    margin-bottom: 10px; /* Отступ от описания */
}

.mods-section .mod-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md); /* Отступ от "Отдельные Моды:" */
    text-align: left;
}

.mod-item {
    background-color: var(--card-bg);
    padding: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.mod-item:hover {
    transform: translateY(-5px);
}

.mod-item h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.mod-item p {
    margin-bottom: 0.8em;
}

.mod-note {
    font-size: 0.9em;
    color: #777;
}

.mod-version {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
}

.mod-item .btn {
    align-self: flex-start;
    margin-top: auto;
}


/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-color-light);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9em;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav ul {
        flex-direction: column;
        margin-top: 15px;
    }

    .nav ul li {
        margin: 5px 0;
    }

    .hero-section {
        padding: 80px 0;
    }

    .hero-section h2 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    .ip-display {
        flex-direction: column;
        gap: 10px;
    }

    #server-ip {
        font-size: 1.2em;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: var(--spacing-md) 0;
    }

    h2 { font-size: 2em; }
    h3 { font-size: 1.8em; }

    .features-grid, .mods-section .mod-list-grid {
        grid-template-columns: 1fr;
    }

    .mods-section .large-btn {
        font-size: 1.2em; /* Уменьшаем шрифт на мобильных */
        padding: 15px 30px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8em;
    }
    .hero-section h2 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    /* Стили для выравнивания кнопок модов в ряд */
.mod-item .mod-buttons {
    display: flex; /* Используем Flexbox */
    gap: 10px;     /* Отступ между кнопками */
    justify-content: flex-start; /* Выравнивание по левому краю по умолчанию */
    flex-wrap: wrap; /* Разрешаем кнопкам переноситься на новую строку, если места мало */
}

/* Чтобы вторая кнопка (Lithium) отъехала вправо */
.mod-item .mod-buttons a:last-child {
    margin-left: auto; /* Занимает всё доступное пространство слева */
}
}