/* Основные стили тела */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: white;
    min-height: 100vh;
    background-color: #070707;
}

/* ====================== ГЛАВНАЯ СТРАНИЦА ====================== */

body:not(.wiki-page) {
    background-image: 
        linear-gradient(to bottom, 
            transparent 0%, 
            rgba(7, 7, 7, 0.4) 60%, 
            rgba(7, 7, 7, 0.8) 90%, 
            #070707 100%
        ),
        url('images/background.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

body:not(.wiki-page)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px 0 120px;
    box-sizing: border-box;
}

header { width: 100%; text-align: center; margin-bottom: 20px; }
nav.nav { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 60px; 
    flex-wrap: wrap; 
}

.button { 
    padding: 12px 24px; 
    text-decoration: none; 
    color: gray; 
    background-color: transparent; 
    border: none; 
    border-radius: 8px; 
    font-size: 18px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: color 0.3s ease; 
    white-space: nowrap; 
}
.button:hover, .button.active { 
    color: white; 
}

.logo { text-align: center; margin-top: 15vh; }
.logo img { max-width: 90%; width: 600px; height: auto; filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.9)); image-rendering: pixel-art; }

.bottom-text { text-align: center; margin: 50px 0 30px; font-size: 15px; color: gray; padding: 0 20px; font-weight: 600; }

.join-button { display: inline-block; padding: 16px 40px; background-color: #FFD1DC; color: #fff5f8; font-size: 20px; font-weight: 600; text-decoration: none; border-radius: 12px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(255, 209, 220, 0.4); margin-bottom: 20px; }
.join-button:hover { background-color: #ffbcd9; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 209, 220, 0.6); }

.online-players { text-align: center; font-size: 18px; color: #FFD1DC; margin-bottom: 60px; padding: 0 20px; }

.useful-links-title { text-align: center; font-size: 18px; font-weight: normal; color: gray; padding: 0 20px; margin-bottom: 30px; }

.links-buttons { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 30px; flex-wrap: wrap; margin-bottom: 80px; }

.link-btn { 
    width: 170px; 
    height: 52px; 
    background-color: #19191961; 
    color: gray; 
    font-size: 16px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 8px; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    gap: 10px; 
}
.link-btn:hover { background-color: #131313; color: #42AAFF; }

.server-icon { width: 28px; height: 28px; fill: currentColor; }
.ip-btn { cursor: default; }

/* ====================== ГАЙД ====================== */

.how-to-start-guide {
    width: 90%;
    max-width: 1400px;
    text-align: center;
    margin: 0 auto 120px;
}

.guide-title {
    font-size: 36px;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
}

.guide-subtitle {
    font-size: 20px;
    color: gray;
    margin-bottom: 60px;
}

.guide-cards-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: nowrap;
}

.guide-card-with-skin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.guide-big-card {
    background-color: #19191961;
    border-radius: 24px;
    padding: 40px;
    width: 580px;
    min-height: 290px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.guide-steps {
    text-align: left;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step {
    margin-bottom: 40px;
}

.step:last-child {
    margin-bottom: 0;
}

.step h3 {
    font-size: 23px;
    color: white;
    margin: 0 0 12px 0;
}

.step p {
    font-size: 18px;
    color: #bbbbbb;
    margin: 0;
    line-height: 1.6;
}

.guide-link {
    color: #42AAFF;
    text-decoration: none;
}

.guide-link:hover {
    text-decoration: underline;
}

.bottom-overlay-skin {
    width: 280px;
    height: auto;
    image-rendering: pixel-art;
    position: absolute;
    bottom: -40px;
    z-index: 3;
}

.left-bottom-overlay {
    right: 53%;
    transform: translateX(-70%);
}

.right-bottom-overlay {
    left: 64%;
    transform: translateX(30%);
}

.guide-footer {
    font-size: 18px;
    color: #aaaaaa;
    margin-top: 40px;
}

/* ====================== СТЕНА РАЗРАБОТЧИКОВ ====================== */

.dev-wall-title {
    font-size: 36px;
    color: white;
    text-align: center;
    margin: 120px 0 20px 0;
    font-weight: 600;
}

.dev-wall-subtitle {
    font-size: 20px;
    color: #bbbbbb;
    text-align: center;
    margin-bottom: 60px;
}

.dev-cards-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-bottom: 120px;
}

.dev-card {
    width: 240px;
    height: 212px;
    background-color: #19191961;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.dev-top-skins {
    position: absolute;
    top: -20px;
    left: 10px;
}

.dev-small-skin {
    width: 64px;
    height: 64px;
    image-rendering: pixel-art;
    border-radius: 8px;
    object-fit: cover;
}

.dev-divider {
    height: 1px;
    background-color: #444444;
    margin: 40px 0 20px 0;
}

.dev-main-text {
    font-size: 18px;
    color: #bbbbbb;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.dev-sub-text {
    font-size: 15px;
    color: #aaaaaa;
    margin: 0;
}

/* ====================== АДАПТИВ ====================== */

@media (max-width: 1300px) {
    .guide-big-card { width: 500px; padding: 30px; min-height: 420px; }
    .bottom-overlay-skin { width: 240px; bottom: -70px; }
}

@media (max-width: 1100px) {
    .guide-big-card { width: 450px; padding: 25px; min-height: 420px; }
    .bottom-overlay-skin { width: 220px; bottom: -70px; }
}

@media (max-width: 768px) {
    /* Кнопки навигации на телефоне — помещаются в одну строку */
    nav.nav {
        gap: 15px; /* Меньше расстояние между кнопками */
        padding: 0 10px;
        flex-wrap: nowrap; /* Не переносим на новую строку */
        justify-content: center;
    }

    .button {
        font-size: 16px; /* Чуть меньше шрифт */
        padding: 10px 16px; /* Меньше отступы внутри */
        min-width: auto;
    }

    .guide-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 80px;
    }

    .guide-big-card {
        width: 90%;
        max-width: 600px;
        padding: 40px;
        min-height: 380px;
    }

    .guide-steps {
        justify-content: flex-start;
    }

    .step {
        margin-bottom: 30px;
    }

    .step:last-child {
        margin-bottom: 0;
    }

    .bottom-overlay-skin {
        display: none;
    }

    .guide-footer {
        margin-top: 60px;
    }

    .guide-title { font-size: 32px; }
    .guide-subtitle { font-size: 18px; }

    /* Адаптив для Стены Разработчиков */
    .dev-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }

    .dev-card {
        width: 300px;
        height: 260px;
        padding: 30px;
        overflow: visible;
    }

    .dev-top-skins {
        top: -15px;
        left: 15px;
    }

    .dev-small-skin {
        width: 78px;
        height: 78px;
    }

    .dev-divider {
        margin: 50px 0 20px 0;
    }

    .dev-main-text {
        font-size: 21px;
        margin-top: 10px;
    }

    .dev-sub-text {
        font-size: 17px;
    }

    .dev-wall-title {
        font-size: 32px;
        margin: 100px 0 15px 0;
    }

    .dev-wall-subtitle {
        font-size: 18px;
    }
}

/* ====================== ФУТЕР ====================== */

.footer {
    margin-top: 150px;
    text-align: center;
    width: 100%;
}

.copyright {
    font-size: 14px;
    color: #888888;
    margin-bottom: 20px;
}

.agreement-link {
    display: inline-block;
    font-size: 14px;
    color: #888888;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.3s ease;
}

.agreement-link:hover {
    color: white;
}

/* Адаптив для футера */
@media (max-width: 768px) {
    .footer {
        margin-top: 100px;
    }

    .copyright {
        font-size: 13px;
    }

    .agreement-link {
        font-size: 13px;
    }
}

/* ====================== WIKI СТИЛИ ====================== */
.wiki-wrapper { display: flex; max-width: 1200px; width: 90%; margin: 60px auto; gap: 60px; }
.back-button { position: absolute; top: 20px; left: 5%; padding: 10px 20px; background-color: #140F0B; color: white; font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 8px; transition: all 0.3s ease; }
.back-button:hover { background-color: #202020; color: #42AAFF; }
.wiki-nav-list { width: 300px; flex-shrink: 0; }
.wiki-nav-list ul { list-style: none; padding: 0; margin: 0; }
.wiki-nav-list li { margin-bottom: 8px; }
.category { color: gray; font-size: 20px; font-weight: 600; padding: 15px 0 5px 0; cursor: default; }
.nav-link, .sub-link { display: block; padding: 8px 0; color: white; font-size: 18px; font-weight: 600; text-decoration: none; transition: color 0.3s ease; padding-left: 20px; }
.nav-link:hover, .sub-link:hover { color: #FFD1DC; }
.nav-link.active, .sub-link.active { color: #FFD1DC; }
.wiki-content { flex: 1; padding: 20px; font-size: 18px; color: #e0e0e0; line-height: 1.6; min-height: 70vh; background-color: #111; border-radius: 12px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
#content-area { padding: 20px; }

@media (max-width: 768px) {
    .wiki-wrapper { flex-direction: column; }
    .back-button { position: static; margin-bottom: 20px; text-align: center; display: block; width: fit-content; margin-left: auto; margin-right: auto; }
    .wiki-nav-list { width: 100%; }
    .sub-link, .nav-link { font-size: 17px; padding-left: 10px; }
}
