body {
    margin: 0;
    padding: 0;
    font-family: 'Comfortaa', sans-serif;
    background-color: #ffffff;
    user-select: none;
    overflow-x: hidden;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    transform-origin: top left;
}  

a {
    text-decoration: none;
}

@font-face {
    font-family: 'Comfortaa';
    src: url('fonts/comfortaa.ttf') format('truetype');
}

@font-face {
    font-family: 'Font2';
    src: url('fonts/font-2.ttf') format('truetype');
}

@font-face {
    font-family: 'Font3';
    src: url('fonts/font-3.ttf') format('truetype');
}

@font-face {
    font-family: 'Neometic-black';
    src: url('fonts/Neometric-Black.ttf') format('truetype');
}

@font-face {
    font-family: 'Neometic-bold';
    src: url('fonts/NeometricAlt-Bold.ttf') format('truetype');
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("src/phonn.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.page {
    width: 100%;
    min-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(60px);
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #CFCFCF #F5F5F5;
    z-index: 0;
}

.page.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 10;
}

.page.inactive {
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transform: translateX(60px);
}

.header {
    width: 1500px;
    height: 73px;
    position: absolute;
    border: 2px solid #1a1a1a;
    border-radius: 20px;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    background-color: transparent;
}

.logo {
    top: 50%;
    position: absolute;
    left: 10px;
    transform: translateY(-50%);
    user-select: none;
    pointer-events: none;
}

.name-title {
    color: white;
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    top: 50%;
    left: 92px;
    transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif;
}

.tg {
    position: absolute;
    left: 478px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    transition: color 0.5s ease;
    cursor: pointer;
}

.tg:hover {
    color: rgb(190, 190, 190);
}

.vk {
    position: absolute;
    left: 943px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    transition: color 0.5s ease;
    cursor: pointer;
}

.vk:hover {
    color: rgb(190, 190, 190);
}

.voiti-v-akk-div {
    width: 110px;
    height: 42px;
    position: absolute;
    border-radius: 30px;
    border: 2px solid white;
    transition: background-color 0.5s ease, border 0.5s ease, color 0.5s ease;
    cursor: pointer;
}

.vxod-span {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.5s ease;
}

.voiti-v-akk-div:hover {
    background-color: white;
    border: 2px solid rgb(102, 102, 102);
}

.voiti-v-akk-div:hover .vxod-span {
    color: black;
}

.div-info {
    width: 1037px;
    height: 604px;
    position: absolute;
    border: 1px solid #2c2c2c;
    background-color: #16161680;
    border-radius: 20px;
    left: 50%;
    top: 187px;
    transform: translateX(-50%);
    backdrop-filter: blur(15px);
}

.span-gm {
    width: 975px;
    font-size: 40px;
    position: absolute;
    color: white;
    left: 50%;
    top: 55px;
    transform: translateX(-50%);
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

.span-vm {
    width: 712px;
    position: absolute;
    left: 35px;
    font-size: 20px;
    color: #646464;
    top: 267px;
}

.list-span {
    color: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    font-weight: bold;
    top: 876px;
}

.div-igr {
    width: 325px;
    height: 230px;
    position: absolute;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
    background: #16161680;
    backdrop-filter: blur(15px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.div-igr:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.games-span-bold {
    color: white;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 106px;
    left: 36px;
}

.games-span {
    color: #afafaf;
    position: absolute;
    font-size: 14px;
    top: 151px;
    left: 36px;
}

.info-people-games {
    width: 1431px;
    height: 128px;
    position: absolute;
    border-radius: 20px;
    border: 1px solid #2c2c2c;
    background-color: #16161680;
    backdrop-filter: blur(15px);
    top: 1532px;
    left: 50%;
    transform: translateX(-50%);
}

.info-img-all {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
    pointer-events: none;
}

.kol {
    position: absolute;
    color: #afafaf;
    font-size: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.nichnee {
    width: 1431px;
    height: 317px;
    position: absolute;
    border-radius: 20px;
    border: 1px solid #2c2c2c;
    background-color: #16161680;
    top: 1738px;
    left: 50%;
    transform: translateX(-50%);
}

.logo-niz {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 67px;
    user-select: none;
    pointer-events: none;
}

.niz-span-mistyk {
    color: white;
    font-weight: bold;
    font-size: 25px;
    position: absolute;
    top: 131px;
    left: 230px;
    font-family: 'Orbitron', sans-serif;
}

.niz-span-copyright {
    color: #333333;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    top: 170px;
    left: 230px;
}

.about-user {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    color: white;
    right: 98px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.about-user:hover {
    color: rgb(184, 184, 184);
}

.login {
    width: 360px;
    height: 700px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    background-color: #16161680;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid #2c2c2c;
}

.login.active {
    opacity: 1;
    pointer-events: auto;
}

.login.inactive {
    opacity: 0;
    pointer-events: none;
}

.logo-register {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 21px;
    user-select: none;
    pointer-events: none;
}

.span-welcome {
    color: white;
    font-size: 20px;
    position: absolute;
    left: 50%;
    top: 171px;
    transform: translateX(-50%);
    font-family: 'Orbitron', sans-serif;
}

.input-log {
    width: 220px;
    height: 45px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #191919;
    border: none;
    border-radius: 10px;
    color: white;
    outline: none;
    padding: 0 10px;
    box-sizing: border-box;
}

.input-log:focus {
    outline: none;
    border: 1px solid rgb(70, 70, 70);
}

.input-log::placeholder {
    color: #888;
}

.eye-icon {
    position: absolute;
    right: 30px;
    user-select: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    color: #888;
}

.but-login-akk {
    width: 207px;
    height: 43px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    background-color: #1c1c1c;
    border: 1px solid white;
    cursor: pointer;
    transition: background-color 0.5s ease, border 0.5s ease;
}

.but-login-akk:hover {
    background-color: rgb(255, 255, 255);
    border: 1px solid black;
}

.span-login-akk {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    transition: color 0.5s ease;
}

.but-login-akk:hover .span-login-akk {
    color: black;
}

.span-perehod-reg-akk {
    color: #4a4a4a;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 500px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 550px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back:hover {
    color: rgb(190, 190, 190);
}

.created-by {
    user-select: none;
    pointer-events: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    color: #4a4a4a;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.back-to-login {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 580px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-to-login:hover {
    color: rgb(190, 190, 190);
}

.time-span {
    color: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    font-weight: bold;
    top: 270px;
}

.div-igri-button {
    width: 325px;
    height: 230px;
    /* position: absolute; - убрать эту строку */
    border-radius: 20px;
    background: #16161680;
    backdrop-filter: blur(15px);
    border: 1px solid #2c2c2c;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0; /* Предотвращает сжатие карточек */
}

.div-igri-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.game-igra-span-bold {
    color: white;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 106px;
    left: 36px;
}

.game-igra-span {
    color: #afafaf;
    position: absolute;
    font-size: 14px;
    top: 151px;
    left: 36px;
}

.trade-money {
    width: 1408px;
    height: 300px;
    position: absolute;
    left: 50%;
    top: 166px;
    transform: translateX(-50%);
    background-color: #16161680;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
    backdrop-filter: blur(15px);
}

.trade-span {
    font-size: 40px;
    font-family: 'Font2';
    color: white;
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
}

.line-x {
    width: 1408px;
    height: 1px;
    position: absolute;
    top: 90px;
    background-color: #d9d9d9;
}

.line-y {
    position: absolute;
    top: 91px;
    width: 1px;
    height: 209px;
    background-color: white;
}

.trade-amount {
    color: white;
    font-size: 20px;
    font-family: "Font3";
    position: absolute;
}

.trade-button {
    width: 103px;
    height: 29px;
    position: absolute;
    border-radius: 10px;
    background-color: #d9d9d9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.trade-button-span {
    font-size: 20px;
    font-family: 'Font3';
    color: black;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.trade-button:hover {
    background-color: #c4c4c4;
}

.trade-button:hover .trade-button-span {
    color: #3B3B3B;
}

.trade-crystals {
    width: 1408px;
    height: 300px;
    position: absolute;
    left: 50%;
    top: 516px;
    transform: translateX(-50%);
    background-color: #16161680;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
    backdrop-filter: blur(15px);
}

.profile-div-big {
    width: 1200px;
    height: 550px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #16161680;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
    backdrop-filter: blur(15px);
}

.profile-div-content {
    width: 350px;
    height: 150px;
    position: absolute;
    top: 66px;
    left: 51px;
    background-color: #1d1d1d;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
}

.input-smena-password {
    width: 180px;
    height: 45px;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #191919;
    border: none;
    border-radius: 10px;
    color: white;
    outline: none;
    padding: 0 10px;
}

.input-smena-password:focus {
    outline: none;
    border: 1px solid rgb(70, 70, 70);
}

.input-smena-password::placeholder {
    color: #888;
}

.content {
    width: calc(100% - 619px);
    min-width: 325px; /* Минимальная ширина равна ширине одной карточки */
    height: calc(100% - 72px);
    position: absolute;
    top: 370px;
    left: 50%;
    transform: translateX(-50%);
    overflow-y: scroll; 
    scrollbar-width: none; 
    -ms-overflow-style: none;
    display: flex;
    flex-wrap: wrap; /* Позволяет элементам переноситься на новую строку */
    justify-content: center; /* Центрирует содержимое */
    gap: 20px; /* Расстояние между карточками */
    align-content: flex-start; /* Выравнивает ряды по верху */
    padding: 20px; /* Добавляет внутренние отступы */
    box-sizing: border-box;
}

.content::-webkit-scrollbar {
    display: none;
}

/* Admin Panel Styles */
.admin-panel-container {
    position: absolute;
    top: 120px;
    left: 40px;
    right: 40px;
    color: white;
    font-family: 'Comfortaa', sans-serif;
    font-size: 20px;
}

.user-block {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #16161680;
    backdrop-filter: blur(15px);
    border: 1px solid #2c2c2c;
    border-radius: 10px;
    padding: 15px;
}

.user-info {
    flex: 1;
}

.admin-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.admin-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.make-admin-btn {
    background: #10b981;
    color: white;
}

.make-admin-btn:hover:not(:disabled) {
    background: #059669;
}

.remove-admin-btn {
    background: #f59e0b;
    color: white;
}

.remove-admin-btn:hover:not(:disabled) {
    background: #d97706;
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.delete-btn:hover:not(:disabled) {
    background: #dc2626;
}

.info-btn {
    background: #3b82f6;
    color: white;
}

.info-btn:hover:not(:disabled) {
    background: #2563eb;
}

.back-btn {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 18px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #ccc;
}

.back-btn2 {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-btn2:hover {
    color: #ccc;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    border: 2px solid #555;
    padding: 20px;
    color: white;
    font-family: 'Comfortaa', sans-serif;
    z-index: 9999;
    width: 300px;
    box-shadow: 0 0 10px #0ff;
    border-radius: 10px;
}

.modal.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
}

.modal-close:hover {
    color: #ccc;
}

.modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-btn {
    width: 100%;
    padding: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-btn:hover {
    background: #2563eb;
}

.profile-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.change-password-btn {
    background: #3b82f6;
    color: white;
}

.change-password-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 120, 246, 0.3);
}

.admin-panel-btn {
    background: #8b5cf6;
    color: white;
    
}

.admin-panel-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.logout-btn {
    background: #ef4444;
    color: white;
    position: absolute;
    bottom: 20px;
    right: 15px;
    z-index: 999;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(246, 92, 92, 0.3);
}

.dop-vozm {
    background: white;
    color: black;
}

.dop-vozm:hover {
    background: #afafaf;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 214, 214, 0.3);
}

#market-btn {
    background-color: #4fe75c;
    color: rgb(255, 255, 255);
    position: absolute;
    bottom: 20px;
    right: 110px;
    z-index: 999;
    width: 100px;
    height: 30px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.market-span {
    font-size: 14px;
    font-family: 'Comfortaa';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#market-btn:hover {
    background-color: #33a53c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 246, 161, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1600px) {
    .header {
        width: 90%;
        max-width: 1500px;
    }
    
    .div-info {
        width: 90%;
        max-width: 1037px;
    }
    
    .info-people-games,
    .nichnee {
        width: 90%;
        max-width: 1431px;
    }
    
    .profile-div-big {
        width: 90%;
        max-width: 1580px;
    }
    
    
}

.avatar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.avatar-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #40CFFF;
    border-radius: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 0 30px rgba(64, 207, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.avatar-modal-title {
    color: #40CFFF;
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(64, 207, 255, 0.5);
    flex-shrink: 0; /* Не сжимается при скролле */
}

.avatar-grid-container {
    max-height: 400px; /* Ограничиваем высоту контейнера */
    overflow-y: auto; /* Только контейнер аватаров скроллится */
    padding-right: 10px;
    margin-bottom: 20px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.avatar-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
}

.avatar-item:hover {
    border-color: #40CFFF;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(64, 207, 255, 0.5);
}

.avatar-item.selected {
    border-color: #00FF88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.avatar-item.locked {
    opacity: 0.5;
    position: relative;
}

.avatar-item.locked::after {
    content: "🔒";
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-item.locked:hover {
    border-color: #FF6666;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 102, 102, 0.3);
}

.avatar-price {
    position: absolute;
    top: 0px;
    right: -5px;
    background: linear-gradient(45deg, #40CFFF, #0099CC);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(64, 207, 255, 0.4);
}

.avatar-close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    color: #FF4444;
    font-size: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10001; /* Поверх всего */
}

.avatar-close-btn:hover {
    color: #FF6666;
    background: rgba(255, 68, 68, 0.1);
}

.avatar-select-btn {
    background: linear-gradient(45deg, #00FF88, #00CC66);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    margin: 0 auto;
    flex-shrink: 0; /* Не сжимается при скролле */
}

.avatar-select-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.avatar-select-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Стиль для кликабельного аватара в профиле */
.profile-avatar {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    background: #333 !important;
    border: 2px solid transparent;
    font-size: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.profile-avatar:hover {
    transform: scale(1.1);
    border-color: #40CFFF;
    box-shadow: 0 0 15px rgba(64, 207, 255, 0.4);
}

/* Пользовательские иконки-эмодзи для аватаров */
.avatar-emoji {
    font-size: 40px;
    line-height: 1;
    user-select: none;
}

/* Скроллбар для контейнера аватаров */
.avatar-grid-container::-webkit-scrollbar {
    width: 8px;
}

.avatar-grid-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.avatar-grid-container::-webkit-scrollbar-thumb {
    background: #40CFFF;
    border-radius: 4px;
}

.avatar-grid-container::-webkit-scrollbar-thumb:hover {
    background: #60DFFF;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .avatar-modal-content {
        padding: 20px;
        margin: 20px;
        max-height: 85vh;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        max-width: 100%;
    }
    
    .avatar-item {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .avatar-modal-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .avatar-price {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .avatar-grid-container {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .avatar-item {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    
    .profile-avatar {
        font-size: 24px !important;
    }
    
    .avatar-grid-container {
        max-height: 250px;
    }
}


/* =============================================================================
   МОДАЛЬНЫЕ ОКНА ДЛЯ СОГЛАШЕНИЙ
   ============================================================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-window {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid #40CFFF;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(64, 207, 255, 0.3);
    animation: slideIn 0.4s ease;
    font-family: 'Orbitron', Arial, sans-serif;
}

.modal-header {
    background: linear-gradient(90deg, #40CFFF, #0099CC);
    padding: 20px;
    text-align: center;
    position: relative;
}

.modal-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-content {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    color: #E0E0E0;
    line-height: 1.6;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #40CFFF, #0099CC);
    border-radius: 10px;
}

.modal-content h3 {
    color: #40CFFF;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #40CFFF;
    padding-bottom: 5px;
}

.modal-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-content li {
    margin-bottom: 8px;
}

.highlight {
    color: #40CFFF;
    font-weight: bold;
}

.contact-info {
    background: rgba(64, 207, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #40CFFF;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============================================================================
   СИСТЕМА УВЕДОМЛЕНИЙ И ЧАТОВ - ДОБАВЬТЕ В css/style.css
   ============================================================================= */

/* Колокольчик уведомлений */
.notification-bell {
    position: absolute;
    top: 20px;
    right: 200px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #40CFFF, #0099CC);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(64, 207, 255, 0.3);
    z-index: 100;
    user-select: none;
}

.notification-bell:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(64, 207, 255, 0.5);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 2px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

/* Кнопка чатов для админов */
.admin-chats-btn {
    background: #8b5cf6;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 10px;
    font-family: 'Orbitron', Arial, sans-serif;
}

.admin-chats-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Модальные окна чатов */
.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.chat-modal.show {
    display: flex;
}

.chat-window {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid #40CFFF;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(64, 207, 255, 0.3);
    display: flex;
    flex-direction: column;
    font-family: 'Orbitron', Arial, sans-serif;
    animation: slideIn 0.4s ease;
}

.chat-header {
    background: linear-gradient(90deg, #40CFFF, #0099CC);
    padding: 20px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.chat-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.back-to-chats {
    position: absolute;
    top: 8px;
    left: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Orbitron', Arial, sans-serif;
}

.back-to-chats:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Основная часть чата */
.chat-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Боковая панель с пользователями */
.chat-sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid #40CFFF;
    overflow-y: auto;
    flex-shrink: 0;
}

.user-item {
    padding: 15px;
    border-bottom: 1px solid rgba(64, 207, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #E0E0E0;
    position: relative;
}

.user-item:hover {
    background: rgba(64, 207, 255, 0.1);
}

.user-item.active {
    background: rgba(64, 207, 255, 0.2);
    border-left: 4px solid #40CFFF;
}

.user-item.unread {
    background: rgba(64, 207, 255, 0.05);
    border-left: 4px solid #40CFFF;
}

.user-email {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #40CFFF;
}

.last-message {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Область чата */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    animation: messageSlideIn 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(45deg, #40CFFF, #0099CC);
    color: white;
    border-bottom-right-radius: 6px;
    margin-left: auto;
}

.message.admin {
    align-self: flex-start;
    background: #2d2d2d;
    color: #E0E0E0;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(64, 207, 255, 0.2);
    margin-right: auto;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    font-style: italic;
}

.message-input-area {
    padding: 20px;
    border-top: 1px solid rgba(64, 207, 255, 0.2);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.1);
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(64, 207, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-family: 'Orbitron', Arial, sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.message-input:focus {
    border-color: #40CFFF;
    box-shadow: 0 0 10px rgba(64, 207, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.send-button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #40CFFF, #0099CC);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-family: 'Orbitron', Arial, sans-serif;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(64, 207, 255, 0.3);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Список уведомлений */
.notifications-list {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.notification-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(64, 207, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(64, 207, 255, 0.1);
    border-color: #40CFFF;
    transform: translateX(5px);
}

.notification-item.unread {
    border-left: 4px solid #40CFFF;
    background: rgba(64, 207, 255, 0.05);
}

.notification-title {
    color: #40CFFF;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.notification-text {
    color: #E0E0E0;
    line-height: 1.4;
    margin-bottom: 8px;
}

.notification-time {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.no-notifications {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

/* Индикатор набора текста */
.typing-indicator {
    display: none;
    align-self: flex-start;
    background: #2d2d2d;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    color: #999;
    font-style: italic;
    margin: 0 20px;
    border: 1px solid rgba(64, 207, 255, 0.2);
    animation: pulse 1.5s infinite;
}

.typing-indicator.show {
    display: block;
}

/* Кнопка очистки уведомлений */
.clear-notifications {
    background: linear-gradient(45deg, #FF4444, #CC0000);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', Arial, sans-serif;
    width: 100%;
}

.clear-notifications:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

/* Скроллбары */
.messages-container::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar,
.notifications-list::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track,
.chat-sidebar::-webkit-scrollbar-track,
.notifications-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb,
.chat-sidebar::-webkit-scrollbar-thumb,
.notifications-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #40CFFF, #0099CC);
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.chat-sidebar::-webkit-scrollbar-thumb:hover,
.notifications-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60DFFF, #20B9CC);
}

/* Анимации */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes ring {
    0%, 20%, 50%, 80%, 100% { 
        transform: rotate(0deg); 
    }
    10% { 
        transform: rotate(-10deg); 
    }
    30% { 
        transform: rotate(10deg); 
    }
    60% { 
        transform: rotate(-5deg); 
    }
    90% { 
        transform: rotate(5deg); 
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .chat-window {
        width: 95%;
        height: 90vh;
    }
    
    .chat-sidebar {
        width: 200px;
    }
    
    .notification-bell {
        right: 120px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .chat-body {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #40CFFF;
    }
    
    .notification-bell {
        right: 80px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .message {
        max-width: 95%;
        font-size: 14px;
    }
    
    .message-input {
        font-size: 14px;
    }
    
    .send-button {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Стили для тостов уведомлений */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    word-wrap: break-word;
}

/* Улучшения для профиля */
@media (min-width: 1200px) {
    .notification-bell {
        right: 250px;
    }
}

/* Дополнительные эффекты */
.user-item::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #40CFFF;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-item.unread::after {
    opacity: 1;
}

/* Стили для подключения */
.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    z-index: 1000;
    transition: all 0.3s ease;
}

.connection-status.online {
    background: rgba(0, 255, 136, 0.8);
    color: white;
}

.connection-status.offline {
    background: rgba(255, 68, 68, 0.8);
    color: white;
}

/* =============================================================================
   ИСПРАВЛЕНИЯ CSS ДЛЯ ПЕРЕНОСА ТЕКСТА В УВЕДОМЛЕНИЯХ
   ============================================================================= */

/* 1. Исправление для textarea отправки уведомлений */
.notification-textarea {
    min-height: 120px;
    font-family: 'Comfortaa', sans-serif;
    line-height: 1.5;
    resize: vertical;
    white-space: pre-wrap;           /* Сохраняет переносы строк */
    overflow-wrap: break-word;       /* Переносит длинные слова */
    word-break: break-word;          /* Разрывает длинные слова */
    hyphens: auto;                   /* Автоматические переносы */
}

/* 2. Исправление для элементов уведомлений в списке */
.notification-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(64, 207, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    /* ДОБАВЛЯЕМ ПРАВИЛА ПЕРЕНОСА */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* 3. Исправление для заголовка уведомления */
.notification-title {
    color: #40CFFF;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
    /* ДОБАВЛЯЕМ ПРАВИЛА ПЕРЕНОСА */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}

/* 4. Исправление для текста уведомления */
.notification-text {
    color: #E0E0E0;
    line-height: 1.4;
    margin-bottom: 8px;
    /* ДОБАВЛЯЕМ ПРАВИЛА ПЕРЕНОСА */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: pre-wrap;          /* Сохраняет переносы строк из textarea */
}

/* 5. Исправление для тостов уведомлений */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 350px;               /* Увеличиваем максимальную ширину */
    min-width: 250px;               /* Добавляем минимальную ширину */
    /* ДОБАВЛЯЕМ ПРАВИЛА ПЕРЕНОСА */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* 7. Улучшение контейнера уведомлений */
.notifications-list {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    /* Обеспечиваем корректное отображение */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 8. Исправление для модального окна отправки уведомлений */
.notification-send-window {
    background: linear-gradient(145deg, #2c2c54, #40407a);
    border-radius: 20px;
    padding: 30px;
    min-width: 500px;
    max-width: 600px;
    width: 90%;                     /* Адаптивная ширина */
    max-height: 80vh;               /* Ограничиваем высоту */
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;               /* Прокрутка при необходимости */
}

/* 9. Адаптивные правила для мобильных устройств */
@media (max-width: 768px) {
    .notification-toast {
        max-width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        transform: translateY(-100%);
        top: 20px;
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
    
    .notification-send-window {
        min-width: 300px;
        width: 95%;
        margin: 20px;
    }
    
    .notification-textarea {
        min-height: 100px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .notification-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-text {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .notification-send-window {
        padding: 20px;
        min-width: 250px;
    }
}

.message-date {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 2px;
    font-style: italic;
    color: #999;
    white-space: nowrap;
}