body {
    margin: 0;
    overflow-x: hidden;
}

.all-con {
    width: auto;
    height: auto;
}

.all {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding: 0 1rem;
}

.search {
    grid-area: search;
    display: flex;
    gap: 1rem;
}

.search-txt {
    all: unset;
    flex: 1;
    border: solid 1px rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    transition: 0.2s ease;
}

.search-txt:hover {
    border: solid 1px rgba(255, 255, 255, 0.3);
}

.search-txt:focus {
    border: solid 1px white;
}

.toplist {
    background: white;
    color: var(--bci);
    border-radius: 15px;
    padding: 0 4rem;
    cursor: pointer;
}

.filtercon {
    background: var(--bci);
    border-radius: 15px;
    border: solid 1px rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    z-index: 2;
    overscroll-behavior: contain;
    touch-action: pan-x;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

.tegscon {
    gap: 1rem;
    border-radius: 15px;
    padding: 0 1rem;
    background: rgb(255, 255, 255);
    position: relative;
    z-index: 1;
}

.itemlist {
    cursor: pointer;
    transition: 0.2s ease;
    color: var(--bci);
    padding: 10px 15px;
    border-radius: 15px;
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.3rem;
}

.itemlist:hover {
    color: #000000;
    background-color: #f0f0f0;
}

.itemlist.active {
    background-color: #e0e0e0;
}

.fa-angle-up {
    transition: transform 0.3s;
}

.fa-angle-up.rotated {
    transform: rotate(180deg);
}

.conlist {
    position: absolute;
    background: var(--bcm);
    border: solid 1px rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    bottom: 100%;
    left: 0;
    overflow: hidden;
    width: 100%;
    height: min-content;
    transition: height 0.3s ease, opacity 0.3s ease;
}

#conlist {
    height: 0;
    opacity: 0;
}

.version-content,
.category-content,
.teg-content {
    height: min-content;
}

.teglist {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 1rem;
}

.teg {
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    background: var(--bci);
    border: solid 1px rgba(255, 255, 255, 0.1);
    color: white;
    line-height: 1.5;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: background-color 0.2s, color 0.2s;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.teg:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.checkbox-teg {
    display: block;
    margin: 2px 0;
}

.sub-teg-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 8rem;
}

.sub-teg {
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    background: var(--bci);
    border: solid 1px rgba(255, 255, 255, 0.1);
    color: white;
    line-height: 1.5;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.sub-teg:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(2px);
}

.sub-teg.active,
.teg.active {
    background-color: white;
    color: #333;
    border-color: white;
}

.sub-teg-checkbox,
.teg-checkbox {
    display: none;
}

.content-section {
    display: none;
}

.content-section.active {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.tippy-box[data-theme~='custom'] {
    background: var(--bcm);
    color: white;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.tippy-box[data-theme~='custom'] .tippy-content {
    padding: 10px;
}

.fline {
    border: solid 1px white;
    flex: 1;
    border-radius: 15px;
    bottom: 1rem;
}

.fline:empty::before {
    content: 'Добро пожаловать, это ваша панель управления!';
    height: 100%;
    color: rgb(163, 163, 163);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.libcon {
    border-radius: 15px;
    width: 4rem;
    height: 4rem;
    cursor: pointer;
    border: solid 1px white;
    background: var(--bci);
    color: white;
    transition: 0.1s ease;
}

.libcon:hover {
    background: white;
    color: var(--bci);
}

.all-content {
    grid-area: content;
    width: 100%;
    height: min-content;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    grid-gap: 0.8rem;
    padding-bottom: 8rem;
}

.top {
    width: auto;
    height: min-content;
    border-radius: 15px;
    background: var(--bci);
    position: relative;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: white;
    border: solid 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: 1s ease;
}

.top.visible {
    opacity: 1;
    transform: translateY(0);
}

.icon {
    width: auto;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.icon img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
}

.gcon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.3rem;
    transition: 0.3s ease;
}

.tcon {
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: center;
}

.mcon {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.uinfo {
    width: 100%;
}

.icit {
    background: rgba(55, 55, 55, 0.7);
    border-radius: 20px;
    padding: 0.1rem 0.4rem;
}

.mcinfo {
    background: rgba(55, 55, 55, 0.5);
    border: 1px solid white;
    overflow-y: hidden;
    border-radius: 8px;
    padding: 0.3rem;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease 0.1s, 
                visibility 0.3s ease 0.1s,
                transform 0.3s ease 0.1s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mcinfo::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.mcinfo::-webkit-scrollbar-track {
    margin: 5px 0;
}

.mcinfo::-webkit-scrollbar-thumb {
    background: #b3b3b3;
    border-radius: 10px 0 0 10px;
}

.mcinfo::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}

.servertext {
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: max-content;
}

.servertegs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.steg {
    background: rgba(55, 55, 55, 0.7);
    border-radius: 20px;
    padding: 0.1rem 0.4rem;
}

.top:hover {
    background: rgb(85, 85, 85);
}

.top:hover .mcinfo {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.top:hover .gcon {
    opacity: 0;
}

.dinfo {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.people {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.tippy-box .tippy-content {
    font-size: 12px;
}

@media (max-width: 1300px) {

}

@media (max-width: 1095px) {

}

@media (max-width: 1090px) {

}

@media (max-width: 750px) {
    html {
        background-size: 20vw 20vw;
    }
}

@media (max-width: 600px) {
    .all-content {
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    }
    
    .filtercon {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tegscon {
        padding: 0.5rem;
    }
}

@media (max-width: 500px) {
    .active {
        width: calc(100vw - 3rem);
    }
    
    .tegslist {
        width: calc(100vw - 4rem - 60px);
    }
    
    .teglist {
        padding: 0.5rem;
        gap: 0.2rem;
    }
    
    .teg,
    .sub-teg {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
}