*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #d48728 rgba(255,255,255,0.1);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><polygon points="10,2 18,18 10,14 2,18" fill="%23ffd700" stroke="%23ffd700"/></svg>') 2 2, auto !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a, button, [role="button"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><path d="M15,2 L25,25 L15,20 L5,25 Z" fill="%23ffd700" stroke="%23ffd700" stroke-width="2"/></svg>') 2 2, pointer !important;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background-color: #170704;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    background-color: #1f120585;
}

/* Video background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 7, 4, 0.3);
    z-index: 1;
}

/*
 * The game cabinet was designed around a compact 67% browser zoom.
 * Apply the same visual scale inside the site so the layout stays neat
 * when players keep the browser at the default 100% zoom.
 */
body:not(.forum-page) {
    zoom: 0.67;
    min-height: 319.253731vh;
}

body.forum-page {
    zoom: 0.8;
    min-height: 125vh;
}

body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,236,196,0.4) 0%, rgba(230,213,195,0) 70%);
    pointer-events: none;
    z-index: -1;
}


main {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 120px;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #5A6DB3;
    border-radius: 4px;
    transition: background 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: #596eb3;
}

.nav-container {
    background: rgb(28 20 14 / 61%);
    backdrop-filter: blur(15px);
    padding: 1.1rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #1f170fb5;
    border-radius: 21px;
    width: 100%;
    max-width: 1480px;
    margin: 10px auto 0;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    transition: max-height 0.3s ease;
    width: 100%;
}

.nav-links a {
    color: #fff0de;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.nav-links a:first-child {
    font-weight: bold;
    font-size: 1.1rem;
}

.nav-links a.active,
.mobile-menu a.active {
    color: #bd8a4f;
    font-weight: bold;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, rgb(255 128 77 / 0%) 0%, #bb7538 50%, rgba(77, 127, 255, 0) 100%);
    border-radius: 2px;
}

.mobile-menu a.active::after {
    content: '';
    display: block;
    width: 30%;
    height: 2px;
    background-color: #bd8a4f;
    margin: 5px auto 0;
    border-radius: 2px;
}

.nav-links a:hover,
.mobile-menu a:hover {
    color: #bd8a4f;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.login-btn, .register-btn {
    transition: all 0.2s;
}

.login-btn {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-btn:hover {
    color: #5A6DB3;
}

.register-btn {
    background: #5A6DB3;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
}

.register-btn:hover {
    background: #596eb3;
}

.lang-btn {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.9rem;
}

.lang-btn img {
    width: 35px;
    height: 35px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #b3b3b3;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(24, 24, 24, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1rem;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: #5A6DB3;
}

.social-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: #fff;
    background: rgba(77, 127, 255, 0.2);
    transform: translateY(-3px);
}


footer {
    flex-shrink: 0;
    width: 100%;
    background: rgba(24, 24, 24, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    position: relative;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    gap: 2rem;
}

.footer-logo {
    height: 3rem;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    text-align: center;
    flex: 1;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.footer-link:hover {
    color: #fff;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #fff;
    transition: width 0.2s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .social-icons {
        justify-content: center;
        margin: 1rem 0;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.home-date{
    top: 10px;
    left: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    z-index: 1;
    font-family: 'Courier New', Courier, monospace;
}

.home-tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    bottom: 10px; /* Отступ снизу */
    right: 10px;  /* Отступ справа */
    background-color: #f0f0f0;
    color: #333;
    text-transform: uppercase;
    z-index: 1;
    position: fixed;
}


.home-tag.notice {
    background: #5A6DB3;
    color: #fff;
}

.home-tag.event {
    background: #9c44dc;
    color: #fff;
}

.home-tag.update {
    background: #4CAF50;
    color: #fff;
}

.home-tag.maintenance {
    background: #c7660c;
    color: #fff;
}

.home-tag.news {
    background: #cc1259;
    color: #fff;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-forum-actions {
    display: flex;
    gap: 9px;
    width: 264px;
    height: 52px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 1px;
}

.main-forum-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(189, 138, 79, 0.45);
    border-radius: 10px;
    background: rgba(28, 20, 14, 0.72);
    color: #f1d5a4;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.main-forum-icon:hover {
    background: rgba(59, 42, 25, 0.86);
    border-color: rgba(226, 179, 103, 0.8);
    color: #fff1c4;
    transform: translateY(-1px);
}

.main-forum-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: #cf2f38;
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    font-weight: 700;
    text-align: center;
}

.main-forum-search {
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(189, 138, 79, 0.45);
    border-radius: 10px;
    background: rgba(28, 20, 14, 0.72);
}

.main-forum-search input {
    width: 130px;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 10px;
    background: transparent;
    color: #f1d5a4;
    font-size: 13px;
}

.main-forum-search input::placeholder {
    color: rgba(241, 213, 164, 0.65);
}

.main-forum-search button {
    width: 36px;
    height: 100%;
    border: 0;
    border-left: 1px solid rgba(189, 138, 79, 0.3);
    background: transparent;
    color: #f1d5a4;
    cursor: pointer;
}

.main-forum-search button:hover {
    background: rgba(226, 179, 103, 0.14);
    color: #fff1c4;
}

.user-avatar {
    position: relative;
    width: 54px;
    height: 52px;
    cursor: pointer;
    transform-style: preserve-3d;
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 21%;
    object-fit: cover;
    border: 1px solid #5c5c5c;
}

.dropdown-arrow {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2c2c2c;
    border: 1px solid #444;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    width: 150px;
    z-index: 10;
    border-radius: 5px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.user-avatar:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.user-avatar:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #444;
}

.dropdown-menu a:hover {
    background-color: #5A6DB3;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}


@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        width: 30px;
        height: 20px;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger div {
        width: 80%;
        height: 3px;
        background-color: #b3b3b3;
        transition: all 0.3s ease;
    }

    .hamburger.active div:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active div:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links,
    .nav-buttons > *:not(.hamburger) {
        display: none;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.95);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 20px;
    }

    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu a {
        margin: 15px 0;
        font-size: 1.2rem;
        color: #fff;
        text-decoration: none;
    }

    .mobile-menu .user-avatar {
        margin-top: 30px;
        width: 100px;
        height: 100px;
    }
}

.mobile-user-buttons {
    display: none;
}

@media (max-width: 768px) {
    .main-forum-actions,
    .mobile-menu .main-forum-actions {
        display: none;
    }

    .user-avatar {
        display: none;
    }

    .mobile-user-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px;
        margin-top: 30px;
    }

    .mobile-profile-btn,
    .mobile-logout-btn {
        background: rgba(77, 127, 255, 0.2);
        color: #fff;
        padding: 10px 20px;
        border-radius: 25px;
        text-decoration: none;
        width: 200px;
        text-align: center;
        transition: background 0.3s ease;
    }

    .mobile-profile-btn {
        background: #5A6DB3;
    }

    .mobile-profile-btn:hover {
        background: #596eb3;
    }

    .mobile-logout-btn {
        background: rgba(77, 127, 255, 0.1);
        border: 1px solid rgba(77, 127, 255, 0.5);
    }

    .mobile-logout-btn:hover {
        background: rgba(77, 127, 255, 0.2);
    }
}

.mmotop-button {
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 1px -1px -6px 6px;
    z-index: 1100;
    max-width: 130px;
    width: 300px;
    height: 95px;
    cursor: pointer;
}

.mmotop-button img {
    width: 100%;
    height: auto;
    max-height: 90px;
}

.mmotop-button:hover {
    opacity: 0.9;
}

@media screen and (max-width: 600px) {
    .mmotop-button {
        max-width: 70px;
    }
}
