*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #5A6DB3 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;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-size: cover;          /* Растягивает изображение на весь экран */
    background-repeat: no-repeat;    /* Запрещает повторение */
    background-position: center;     /* Центрирует изображение */
    background-attachment: fixed;    /* Фиксирует фон при прокрутке */
    margin: 0;
    padding: 0;
    background-image: url(../img/bgs.png);
    overflow-x: hidden;
}

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;
}

body::before {
    width: 200px;
    height: 200px;
    top: -100px;
    right: -100px;
}

body::after {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(255,236,196,0.3) 0%, rgba(230,213,195,0) 70%);
}

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: rgba(24, 24, 24, 0.5);
    backdrop-filter: blur(12px);
    padding: 0.8rem 1.5rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    position: fixed;
    top: 20px;
    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: #b3b3b3;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a.active,
.mobile-menu a.active {
    color: #5A6DB3;
    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, rgba(77, 127, 255,0) 0%, #5A6DB3 50%, rgba(77, 127, 255,0) 100%);
    border-radius: 2px;
}

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

.nav-links a:hover,
.mobile-menu a:hover {
    color: #5A6DB3;
    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-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 25%;
    object-fit: cover;
    border: 2px solid #5A6DB3;
}

.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: 100%;
        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) {
    .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;
    z-index: 1000;
    max-width: 100px;
    cursor: pointer;
}

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

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

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