*, *::before, *::after {
    box-sizing: border-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 30px;
    position: relative;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background-color: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s linear;
}

@font-face {
    font-family: 'Minecraft';
    src: url('../fonts/minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MinecraftTen';
    src: url('../fonts/minecraft-ten-font-cyrillic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Spielarcade';
    src: url('../fonts/Spielarcade-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&display=swap');

:root {
    --bg-color: #FFFCE6;
    --surface-color: #DFE9B8;
    --primary-color: #074522;
    --accent-color: #FF8200;
    --text-color: #074522;
    --main-font: 'Minecraft', sans-serif;
    --secondary-font: 'MinecraftTen', sans-serif;
}

body {
    padding: 0;
    margin: 0;
    font-family: var(--main-font);
    letter-spacing: 1px;
    background-color: var(--bg-color);
    background-image: url('../body-bg.png');
    background-repeat: repeat;
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

button {
    margin: 0;
    font-family: var(--main-font);
    background-color: transparent;
    color: var(--text-color);
}

input, textarea, select {
    font-family: var(--main-font);
}

header {
    background-color: var(--surface-color);
    background-image: url('../header-bg.png');
    background-repeat: repeat-x;
    background-position: top center;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(7, 69, 34, 0.1);
}

.logo {
    font-family: var(--secondary-font);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--bg-color) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav {
    display: flex;
    gap: 15px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #5b62e9;
    color: #ffffff;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    left: 18px;
}

.discord-btn:hover {
    transform: scale(1.05);
    background-color: #474fc4;
    box-shadow: 0 4px 12px rgba(91, 98, 233, 0.4);
}

nav button {
    background: none;
    border: none;
    color: var(--bg-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav button:hover, nav button.active {
    background-color: var(--accent-color);
    color: #fff;
}

main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    background-color: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--primary-color);
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--primary-color);
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    color: var(--text-color);
    border-top: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(255, 130, 0, 0.15);
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-buy {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--accent-color);
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    font-family: var(--main-font);
    transition: 0.3s;
    border: none;
    cursor: pointer;
    -webkit-text-fill-color: #fff;
}

.btn-buy:hover {
    background-color: #e67300;
    box-shadow: 0 4px 15px rgba(255, 130, 0, 0.4);
    transform: translateY(-2px);
}

.btn-details {
    display: inline-block;
    padding: 10px 25px;
    background-color: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    font-family: var(--main-font);
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid var(--primary-color);
}

.btn-details:hover {
    background-color: rgba(7, 69, 34, 0.1);
}

.tebex-container {
    text-align: center;
    padding: 40px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 2px solid var(--accent-color);
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--surface-color);
    background-image: url('../footer-bg.png');
    background-repeat: repeat-x;
    background-position: bottom center;
    font-size: 0.9rem;
    color: var(--bg-color);
    border-top: 2px solid var(--primary-color);
}

.server-ip {
    background: var(--surface-color);
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--secondary-font);
    font-size: 1.2rem;
    color: var(--accent-color);
    display: inline-block;
    margin: 20px 0;
    border: 2px solid var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    -webkit-text-fill-color: var(--accent-color);
}

.server-ip:hover {
    background-color: var(--bg-color);
    transform: scale(1.02);
    border-color: var(--accent-color);
}

#promo-modal, #details-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(223, 233, 184, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.close-btn {
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-color);
}

.details-list {
    text-align: left;
    margin-top: 20px;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.05rem;
}

.details-list ul {
    padding-left: 20px;
}

.details-list li {
    margin-bottom: 10px;
}

.modal-content {
    background: var(--bg-color);
    padding: 40px;
    line-height: 24px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    text-align: center;
    box-shadow: 0 10px 30px rgba(7, 69, 34, 0.2);
    max-width: 400px;
}

.promo-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    margin: 20px 0;
}

.promo-code {
    font-size: 2rem;
    color: var(--accent-color) !important;
    font-weight: bold;
    letter-spacing: 3px;
    line-height: 24px;
    padding: 15px 10px 12px 16px;
    background: var(--surface-color);
    border: 1px dashed var(--primary-color);
    border-radius: 6px;
    user-select: all;
    margin: 0;
    -webkit-text-fill-color: initial;
}

.copy-btn {
    background: var(--surface-color);
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

h1, h2, h3, #details-title {
    color: var(--primary-color) !important;
    text-shadow: none;
    -webkit-text-fill-color: initial;
    background: none;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        border-bottom: 2px solid var(--accent-color);
        padding: 15px 0;
        box-shadow: 0 10px 20px rgba(7, 69, 34, 0.4);
        z-index: 10000;
        gap: 5px;
    }
    nav.open {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    .nav-btn {
        width: 90%;
        margin: 0 auto;
        text-align: center;
        padding: 12px;
        box-sizing: border-box;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .burger-menu.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .burger-menu.open span:nth-child(2) { opacity: 0; }
    .burger-menu.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
    .card-grid { grid-template-columns: 1fr; padding: 0 15px; }
    .card-actions { flex-direction: column; gap: 15px; }
    .btn-buy, .btn-details { width: 100%; box-sizing: border-box; }
}

/* Библиотека */
.library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.filter-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.lib-tag {
    display: inline-block;
    margin-top: 15px;
    padding: 4px 10px;
    background-color: rgba(7, 69, 34, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}
.profile-icon-btn:hover { transform: scale(1.05) !important; color: var(--accent-color) !important; }
