/* BASIC LAYOUT
----------------------------------------------- */
.wrapper {min-width: 320px; position: relative;}
.wrapper-container {max-width: var(--maximum-width); margin: 0 auto; position: relative; z-index: 20;}
.wrapper-main {padding: 0 var(--indent); min-height: 100vh;}
.header {background-color: var(--bg); position: relative; z-index: 100; padding-top: 20px; padding-bottom: 20px;}
.header-nav {background: var(--bg-3); --tt: #fff; position: relative; z-index: 100; gap: 20px;}
.content {grid-area: main; min-height: 80vh;}
.sidebar {grid-area: side; border-left: 1px solid var(--bdc); padding-left: 40px;}
.footer {background-color: var(--bg-2); padding-top: 20px; color: var(--tt-2); 
	font-size: 14px; --tt: #fff; --tt-l: var(--tt-2);}
.footer__two {background-color: var(--bg-3); margin-top: 20px; padding-top: 20px; padding-bottom: 20px;}
.cols {display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 30px; grid-template-areas: "main side";}
.cols-content {padding: 40px 0;}
	
#scrolltop {position: fixed; width: 60px; height: 60px; line-height: 60px; right: 10px; bottom: 10px;
	z-index: 990; display: none; background-color: var(--bg-2); color: var(--tt-2); 
	cursor: pointer; font-size: 24px; border-radius: 50%; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}


/* HEADER, NAV
----------------------------------------------- */
.logo {display: inline-flex; flex-direction: column; justify-content: center; font-weight: 700; text-transform: uppercase;
	font-size: 22px; height: 50px; line-height: 1; color: var(--tt) !important; letter-spacing: 2px;
	background: url(../images/logo.svg) 0 center / 50px no-repeat; padding-left: 60px;}
.logo span {color: var(--accent-darker);}
.logo__caption {font-size: 11px; text-transform: uppercase; font-weight: 400; 
	margin-top: 8px; letter-spacing: 1px; color: var(--tt-l);}
.header__logo {min-width: 200px; margin-right: 30px;}
.header__menu > li {margin-right: 30px; position: relative;}
.header__menu > li > a {height: 60px; font-size: 16px; display: flex; align-items: center;}
.header__menu > li > a .fal {margin-right: 8px; color: var(--tt-2);}
.header__menu > li > a:hover {color: var(--accent);}
.header-nav .header__menu > li > a.is-active {background: var(--accent); color: #fff; padding: 0 15px; --tt-2: #fff;}
.menu {column-width: 180px; column-gap: 40px;}
.header-nav .menu {position: absolute; top: 100%; left: 0; width: 900px; background: var(--bg-2); 
	padding: 20px; --tt-3: var(--tt-2); display: none;}
.menu li {margin-bottom: 15px; break-inside: avoid; position: relative;}
.menu li a {display: block; padding-right: 30px;}	
.menu li span {position: absolute; right: 0; top: 0; color: var(--tt-3); font-size: 13px; pointer-events: none;}
.menu li a:hover {text-decoration: underline;}
.header-nav .header__menu > li:hover .menu {display: block;}
.side__menu {margin-bottom: 30px; margin-top: -10px; border-bottom: 1px solid var(--bdc); padding-bottom: 20px;}
.side__menu > li {margin: 0;}
.side__menu > li > a {height: 40px; border-radius: 4px;}
.side__menu > li > a .fal {margin-right: 0; opacity: 1; width: 30px;}
.sidebar .menu {border-bottom: 1px solid var(--bdc); padding-bottom: 15px;}
.sidebar .header__menu > li > a .fal {--tt-2: var(--tt-3);}
.sidebar .header__menu > li > a.is-active {background-color: var(--accent); --tt: #fff;
	margin: 5px -10px; border-radius: 3px; padding: 0 10px; height: 30px;}
.side__menu > li > a.is-active .fal {--tt-2: #fff;}

.header__search {position:relative; margin-right: 20px;}
.header__search form {max-width: 500px; position: relative;}
.header__search-box {position: relative;}
.header__search input, .header__search input:focus {padding: 0 60px 0 20px; border-radius: 20px; 
	background: var(--bg-4); box-shadow: none; color: var(--tt);}
.header__search input:not(:focus)::placeholder {color: var(--tt); opacity: 0.7; font-size: 14px; font-weight: 400;} 
.header__search button {position:absolute; z-index: 5; right: 0; top: 0; width: 60px; padding: 0; 
	background: none; color: var(--accent); font-size: 16px;}
.header__reg {margin-right: 10px; background-color: var(--bg-4); color: var(--tt);}
.theme-toggle {display: inline-flex; justify-content: space-between; align-items: center; cursor: pointer;
	background-color: var(--bg-2); height: 40px; border-radius: 20px; padding: 5px 0;}
.theme-toggle li {cursor: pointer; width: 30px; height: 30px; line-height: 30px; 
	border-radius: 50%; text-align: center; color: #fff; margin: 0 5px;} 
.theme-toggle:hover li {color: #fff; background-color: rgba(0,0,0,0.3);}
.dt-is-active .theme-toggle li:first-child, body:not(.dt-is-active) .theme-toggle li:last-child {background-color:#fff; color: #212228;}
.header__upl {border-radius: 4px; gap: 10px;}
.header__login-btn--not-logged {height: 36px; padding: 0 15px;}
.header__login-pm {position: relative; font-size: 24px; margin-right: 20px;}
.header__login-pm::after {content: ''; width: 8px; height: 8px; border-radius: 50%; 
	background-color: var(--accent); position: absolute; right: -1px; top: 3px;}
.header__login-btn--logged {padding: 0; display: block; width: 40px; height: 40px; border-radius: 50%;}
.header__login-pm:not(.header__login-pm--0)::after {animation: pmNew 1s infinite linear; animation-direction: alternate;}
@keyframes pmNew {
	from {background-color: #7ae026; box-shadow: 0 0 0 0 rgba(81, 175, 5,1);}
	to {background-color: #51af05; box-shadow: 0 0 0 10px rgba(81, 175, 5,0);}
}


/* SECTION
----------------------------------------------- */
.sect:not(:last-child) {margin-bottom: 20px;}
.sect__header {margin-bottom: 18px;}
.sect__title {font-size: 18px; font-weight: 700; text-transform: uppercase; 
	letter-spacing: 1px; color: var(--tt); gap: 10px; display: flex; align-items: center; flex-wrap: wrap;}
.sect__title span {color: var(--tt);}
.sect__title .fal {color: var(--accent);}
.sect__sort {position: relative;}
.sect__sort * {display: inline-block; vertical-align: middle;}
.sect__sort li:nth-child(5), .sect__sort li:nth-child(33) {display: none;}
.sect__sort a {text-transform: uppercase; margin-left: 10px; color: var(--tt-3); font-size: 11px;}
.sect__sort a::after, .submenu > a::after {content: "\f107"; font-weight: 300; font-family: 'Font Awesome 5 Pro'; margin-left: 8px; display: inline-block;}
.sect__sort .desc a::after {content:"\f106";}
.sect__sort li[class] a {color: var(--tt); font-weight: 500;}
.sect__link {margin-left: 20px; padding: 0 10px; border-radius:4px; height: 30px; 
	background-color: var(--bg-d); color: var(--tt); font-weight: 500; font-size: 13px;}
.sect__subtitle {font-size: 24px; margin-bottom: 40px;}
.descr {display: grid; grid-gap: 10px 0; line-height: 1.5; font-size: 14px; color: var(--tt-l); margin-bottom: 40px; padding-top: 20px;}
.descr h1, .descr h2, .descr h3 {font-size: 18px; font-weight: 700; text-transform: uppercase; color: var(--tt-3); line-height: 1.3;}
.descr:last-child, .sect:last-child {margin-bottom: 0;}
.descr--top {margin-bottom: 16px; grid-gap: 10px 0; font-size: 13px; line-height: 1.5; padding: 0;}
.descr--top h1 {font-size: 15px;}
.speedbar {font-size: 12px; color: var(--tt-2); margin-bottom: 20px;}
.speedbar a:after {color: var(--tt); display: inline; content: '/'; margin: 0 5px;}
.speedbar a:hover {text-decoration: underline;}
.sect--padding {padding-top: 20px;}
.sect--tags {gap: 10px;}
.sect--tags .sect__title {padding-right: 10px; font-size: 16px;}
.sect.sect--tags a {font-size: 14px;}
.sect--tags a {border: 1px solid var(--bdc); border-radius: 3px; display: flex; align-items: center; height: 30px; 
	padding: 0 10px; font-weight: 500; color: var(--tt-3);}


/* SHORT ITEM
----------------------------------------------- */
.thumb {position: relative; background: var(--bg-4); border: 1px solid var(--bdc);}
.thumb__desc {padding: 13px;}
.thumb__title {font-size: 15px; font-weight: 500; line-height: 1;}
.thumb__meta {margin-top: 13px; font-size: 13px; color: var(--tt-2d); font-weight: 500;}
.thumb__label, .thumb__img .thumb__rating {position: absolute; z-index: 5; background: rgba(0,0,0,.7); color: #fff; height: 24px;
	font-size: 12px; display: flex; align-items: center; gap: 3px; white-space: nowrap; padding: 0 5px; 
	pointer-events: none; transition: all 0.1s linear;}
.thumb__img .thumb__rating {right: 5px; top: 5px;}
.thumb__label--views {left: 5px; bottom: 5px;}
.thumb__label--views::after {display: inline; content: attr(data-text);}
.thumb__label--time {right: 5px; bottom: 5px;}
.thumb__label--milf {right: 5px; top: 5px; background: var(--accent); font-weight: 500; letter-spacing: 1px;}
.thumb__label--hd {left: 5px; top: 5px;}
.thumb__label--hd span {background: var(--accent); margin-right: -5px; display: inline-flex; height: 24px; 
	text-transform: uppercase; font-weight: 500; padding: 0 5px; align-items: center; margin-left: 5px;}
.thumb__rating {white-space: nowrap; gap: 5px; display: flex; align-items: center;}
.js-count-percent {opacity: 0;}
.thumb__img:hover .thumb__label, .thumb__img:hover .thumb__rating {opacity: 0; transform: scale(0.3,0.3);}
.thumb__text {font-size: 12px; margin-top: 8px; color: var(--tt-l);}
.thumb__text::before {display: inline; content: attr(data-text); color: var(--accent);}
.thumb--model {background: none;}
.thumb--model .thumb__title {text-align: center;}
.thumb--model .thumb__meta {color: var(--tt); font-weight: 400;}
.thumb:hover {border-color: var(--tt);}

/* ОСНОВНАЯ СЕТКА ИГР - Полные постеры */
#dle-content .grid-item .thumb__img,
#dle-content .grid-item .img-responsive {
    padding-top: 0 !important;
    height: 320px; /* Фиксированная высота для показа полного постера */
}

#dle-content .grid-item .thumb__img img,
#dle-content .grid-item .img-fit-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Показывает весь постер целиком */
    object-position: center !important;
    position: static !important;
}

#dle-content .grid-item .thumb {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#dle-content .grid-item .thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#dle-content .grid-item .thumb__img {
    background: var(--bg-4);
    border-radius: 8px 8px 0 0;
}

#dle-content .grid-item .thumb__desc {
    background: #fff;
    border-radius: 0 0 8px 8px;
}

/* ПОХОЖИЕ ИГРЫ - Миниатюрные постеры */
.page__related .thumb,
.related-games .thumb {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.page__related .thumb:hover,
.related-games .thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

/* Убираем padding-top от .img-responsive для похожих игр */
.page__related .img-responsive,
.related-games .img-responsive {
    padding-top: 0 !important;
    height: 280px; /* Фиксированная высота для показа полного постера */
}

.page__related .thumb__img,
.related-games .thumb__img {
    position: relative;
    width: 100%;
    height: 280px; /* Увеличенная высота для показа полного постера */
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: var(--bg-4); /* Фон для пустых областей */
}

/* ВАЖНО: Переопределяем object-fit для показа полного постера */
.page__related .thumb__img img,
.page__related .img-fit-cover img,
.related-games .thumb__img img,
.related-games .img-fit-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Показывает весь постер целиком без обрезки */
    object-position: center !important; /* Центрируем постер */
    position: static !important; /* Убираем absolute позиционирование */
    transition: transform 0.3s ease;
}

.page__related .thumb:hover .thumb__img img,
.related-games .thumb:hover .thumb__img img {
    transform: scale(1.02); /* Меньший зум, чтобы не выходить за границы */
}

.page__related .thumb__desc,
.related-games .thumb__desc {
    padding: 12px;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.page__related .thumb__title,
.related-games .thumb__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tt);
    text-align: center;
    white-space: normal !important; /* Разрешаем перенос строк */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Максимум 2 строки */
    -webkit-box-orient: vertical;
}

/* Адаптивная сетка для похожих игр */
.page__related #dle-content,
.page__related .d-grid,
.related-games .d-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important; /* Ровно 4 колонки */
    gap: 15px;
    margin-top: 20px;
}

/* Адаптивность для разных экранов */
@media screen and (max-width: 1200px) {
    .page__related .d-grid,
    .related-games .d-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 колонки на средних экранах */
    }
}

@media screen and (max-width: 768px) {
    .page__related .d-grid,
    .related-games .d-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 колонки на планшетах */
    }
}

@media screen and (max-width: 480px) {
    .page__related .d-grid,
    .related-games .d-grid {
        grid-template-columns: 1fr !important; /* 1 колонка на мобильных */
    }
}


/* FOOTER, PAGINATION
----------------------------------------------- */
.footer__menu a {font-weight: 500; display: block; margin: 0 20px 0 0;}
.footer__menu a:hover {text-decoration: underline;}
.footer__text {line-height: 1.6; font-size: 13px; margin-right: 20px;}
.footer .btn {margin: 0 40px;}
.footer__counter {display: inline-block;}

.pagination {text-align: center;}
.pagination__pages a, .pagination__pages span {display: inline-block; margin: 10px 5px 0 5px; line-height: 44px; 
	padding: 0 10px; min-width: 46px; border-radius: 23px; font-size: 14px; 
	border: 1px solid var(--bg-4); background-color: var(--bg-4);}
.pagination__pages--full a, .pagination__pages--full span {line-height: 30px; min-width: 30px; font-size: 14px;}
.pagination__pages a:hover, .pagination__pages span:not(.nav_ext), .sect--tags a:hover,  .sect__link:hover 
{background: var(--accent); color: #fff; border-color: var(--accent);}


/* INNER PAGE
----------------------------------------------- */
.page__player {background-color: #000;}
.page__cols {display: grid; grid-template-columns: 1fr 300px; grid-gap: 30px 40px; margin-bottom: 30px;}
.page__main {background-color: var(--bg-4); border: 1px solid var(--bdc); padding: 0 15px 15px 15px;}
.page__player {margin-left: -15px; margin-right: -15px; margin-bottom: 15px;}
.page__player-loader {font-size: 100px; width: 100%; height: 100%; display: grid; place-items: center;
	position: absolute; left: 0; top: 0; color: var(--accent);}
.page__main > h1 {font-size: 18px; font-weight: 700; margin-bottom: 10px; padding-right: 130px;}
.page__main > h1 a {margin-left: 10px; font-size: 14px; font-weight: 400;}
.page__text.full-text {margin-top: 11px; font-size: 14px; line-height: 1.4;}

.page__meta {gap: 10px 20px; margin-bottom: 15px; position: relative;}
.page__meta-item {font-size: 13px;}
.page__meta-item .fal {margin-right: 8px; color: var(--tt-3);}
.page__meta-item--author span, .page__meta-item--author a {font-weight: 700; text-decoration: underline;}
.page__meta-item--fav {cursor: pointer; position: absolute; right: 0; top: -35px; 
	height: 30px; padding: 0 10px; --tt: #fff; border-radius: 4px; font-size: 13px; font-weight: 700;}
.page__meta-item--fav a {display: flex; align-items: center; height: 100%;}
.page__meta-item--fav .fal {margin-right: 8px;}
.page__meta2 {margin-left: -15px; margin-right: -15px; padding: 15px; background-color: var(--bg); 
	border: 1px solid var(--bdc); border-right: 0; border-left: 0; gap: 10px 20px; margin-bottom: 15px;}
.page__share, .page__dl {cursor: pointer;}
.page__share:hover, .page__dl:hover, .page__dl a:hover, .page__complaint a:hover {color: var(--accent);}

.page__rating {position: relative; width: 219px; border: 1px solid var(--bdc); border-radius: 4px; overflow: hidden;}
.page__rating a {background-color: var(--bg-4); color: var(--tt-3); font-size: 16px; display: grid; 
	height: 36px; width: 36px; border-right: 1px solid var(--bdc); place-items: center;}
.page__rating a + a {transform: scale(-1,1);}
.page__rating-bar {position: absolute; left: 40px; bottom: 8px; width: 136px;  
	height: 4px; border-radius: 2px; background-color: #fc5729; overflow: hidden;}
.page__rating-bar-progress {position: absolute; left: 0; top: 0; height: 100%; width: 0; background: #bfd128;}
.page__rating-likes i {font-style: normal; margin-right: 5px;}
.page__rating-likes span {margin-left: 2px; display: none;}
.page__rating-votes i {font-style: normal; margin-left: 2px;}
.page__rating-votes {position: absolute; left: 40px; top: 4px; width: 136px; font-weight: 500;
	text-align: center; font-size: 11px; text-transform: uppercase; white-space: nowrap; color: var(--tt-l);}
.page__rating a:hover, .page__meta-item--fav:hover, .page__meta-item--fav a:hover, .page__subinfo-item a:hover 
{background-color: var(--accent); color: #fff; border-color: var(--accent);}

.page__subinfo {font-size: 0; gap: 10px 10px;}
.page__subinfo-item > div, .page__subinfo-item > span, .page__subinfo-item a {display: flex; 
	align-items: center; height: 26px; border-radius: 3px; padding: 0 5px; margin: 5px; font-size: 13px;
	background-color: var(--bg-d); text-transform: capitalize;}
.page__subinfo-item > div {font-weight: 700; margin-left: 0; border: 0; padding: 0; background: none;}
.page__subinfo-item {margin: -5px 0;}
.page__subinfo-item--category {justify-content: flex-end; margin-right: -5px;}
.page__subinfo-item > span a {border: 0; height: 100%; margin: 0 -10px;}
[data-modelimg] {position: relative; z-index: 999;}
.model-preview {position: absolute; left: 50%; bottom: 100%; margin-left: -100px; width: 200px; 
	background-color: var(--bg-4); border-radius: 10px; padding: 10px; box-shadow: var(--bsh);}
.bottom .model-preview {top: 100%; bottom: auto;}
.tags-list {width: 100%; gap: 0;}
.page__related > .btn {border-radius: 4px; margin-bottom: 0px; position: relative; top: -15px;}
.share-box {border-radius: 6px; background-color: var(--bg-4); padding: 30px 15px; text-align: center; 
	position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 999; 
	width: 380px; max-width: 90vw; display: none;}

.mpage__img {width: 200px; margin-right: 40px;}
.mpage__social {width: 200px; margin-left: 40px;}
.mpage__img img {width: 100%;}
.mpage__bio {display: grid; grid-gap: 13px 40px; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); margin-top: 20px;}
.mpage__bio li {display: flex; justify-content: space-between; font-size: 14px;}
.mpage__bio li > span:first-child {color: var(--tt-3); display: inline-flex; align-items: center;
	flex: 1 1 0; min-width: 100px; max-width: 100%; margin-right: 10px; white-space: nowrap;}
.mpage__bio li > span:first-child::after {content: ''; border-top: 1px dotted var(--tt-3); 
	flex: 1 1 0; min-width: 10px; max-width: 100%; margin-left: 10px;}
.mpage__bio a {color: var(--accent); border-bottom: 1px dotted var(--accent);}
.mpage__social-item {display: block; margin-bottom: 10px; border-radius: 4px; 
	padding: 10px; text-align: center; background-color: #1877f2; color: #fff;}
.tw {background-color:#2daae1; color: #fff;}
.insta {background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);}


/* TEXT BLOCK, TYPOGRAPHY, VIDEO BLOCK
----------------------------------------------- */
.full-text {line-height: 1.6; font-size: 15px; color: var(--tt-l); word-wrap: break-word;}
.full-text a {text-decoration: underline; color: #5278b1;}
.full-text img:not(.emoji), .full-text p, .full-text h1, .full-text h2, .full-text h3, .full-text h4, .full-text h5, 
.full-text > ul, .full-text > ol, .full-text table, .page__title {margin-bottom: 20px;}
.full-text > img[style*="left"], .full-text > .highslide img[style*="left"] {margin:0 10px 10px 0;}
.full-text > img[style*="right"], .full-text > .highslide img[style*="right"] {margin:0 0 10px 10px;}
.full-text > ul li, .full-text > ol li {padding-left: 60px; position: relative;}
.full-text > ul li:before {content: ''; width: 8px; height: 8px; border-radius: 50%; 
	border: 3px solid #fac40c; position: absolute; top: 4px; left: 34px;}
.full-text > ol {counter-reset: num;}
.full-text > ol li:before {content: counter(num); counter-increment: num; background-color: #fac40c; color: #000; 
	position: absolute; top: -2px; left: 17px; width: 24px; height: 30px; font-size: 14px; font-weight: 500;
	display: flex; justify-content: flex-end; align-items: center; padding-right: 6px; box-sizing: border-box;}
.full-text > ol li:after {content: ''; border: 10px solid transparent; border-left-color: #fac40c; 
	position: absolute; left: 41px; top: -2px; transform: scale(0.66,1.5); transform-origin: 0 0;}
.full-text > ul li + li, .full-text > ol li + li {margin-top: 10px;}
.full-text table, .video-inside > * {width:100%;}
.full-text table tr td {padding:10px; border:2px solid #fff;}
.full-text table tr:nth-child(2n+1) {background-color:#f2f6f9;} 
.full-text table tr:nth-child(1) {background-color:#cee0ed;}
.full-text table img:not(.emoji) {margin:0; max-width:350px}
.full-text > *:last-child {margin-bottom: 0;}
.video-responsive {padding-top: 56%; position: relative;}
.video-responsive > iframe, .video-responsive > video {position: absolute; left: 0; top: 0; width: 100%; height: 100%;}
.full-text h1, .full-text h2, .full-text h3, .full-text h4, .full-text h5 {font-size: 22px;}


/* COMMENTS
----------------------------------------------- */
.page__comments {margin-top: 10px; background-color: #f5f5f5; border: 1px solid #e0e0e0; padding: 15px;}
.add-comments-form.form {padding: 0; background: none; margin-top: 10px; margin-bottom: 20px; display: none;}
.add-comments-form .form__input, .add-comments-form__input, .add-comments-form .form__textarea-inside textarea, 
.mass_comments_action select {box-shadow: inset 0 0 0 1px #e3e3e3; border-radius: 0;}
.add-comments-form__input {margin-left: 20px;}
.add-comments-form .d-none, .comments_subscribe + br {display: none;}
.mass_comments_action {display: none; align-items: center; max-width: 800px; white-space: nowrap; margin-bottom: 20px;}
.mass_comments_action select {flex: 1 1 0; margin: 0 -8px 0 20px;}
.mass_comments_action .bbcodes {border-radius: 0; padding: 0 10px;}
.page__comments-title {font-size: 15px; font-weight: 700; margin-right: 10px; color: var(--tt-3);}
.page__comments-btn {cursor: pointer; position: relative; height: 30px; line-height: 29px; font-weight: 500;
	padding: 0 10px; font-size: 11px; text-transform: uppercase; display: inline-block; 
	border: 1px solid var(--accent); border-radius: 15px;}
.page__comments-btn:hover, .page__comments-btn.is-active {color: #fff; background: var(--accent);}

/* Кнопка "Написать" комментарий */
.add-btn, .js-show-comments {
    cursor: pointer;
    background: var(--accent);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(220, 39, 67, 0.3);
}

.add-btn:hover, .js-show-comments:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.4);
}

.add-btn::before, .js-show-comments::before {
    content: "\f067";
    font-family: 'Font Awesome 5 Pro';
    font-weight: 300;
    font-size: 12px;
}

.show-comms {text-align: right; font-size: 11px; text-transform: uppercase;}	
.show-comms a {color: var(--tt-3); display: inline-block; text-decoration: underline;}

.comment-item__title {font-weight: 500; font-size: 18px; margin-top: 20px;}
.comment-item {margin-top: 10px; background-color: #ffffff; padding: 15px; border-radius: 8px; border: 1px solid #e0e0e0;}
.comment-item__img {width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;}
.comment-item__letter {width: 100%; height: 100%; text-transform: uppercase; font-weight: 500; 
	position: absolute; left: 0; top: 0; z-index: 5; color: #fff; font-size: 18px;}
.comment-item__author {font-size: 14px;}
.comment-item__date {color: var(--tt-3); margin-top: 4px; font-size: 12px;}
.comment-item__main {margin: 8px 0 0 0;}
.comment-item__rating {white-space: nowrap; font-size: 12px;}
.comment-item__rating a {margin-left: 6px;}
.comment-item__rating a > span:first-child {color: #6ab04c; text-decoration: underline;  margin-right: 2px;}
.comment-item__rating a:last-child > span:first-child {color: #eb4d4b;}


/* LOGIN
----------------------------------------------- */
.login {position: fixed; z-index: 999; left: 50%; top: 50%; transform: translate(-50%,-50%); overflow: hidden;
	background-color: var(--ui-bg); border-radius: 4px; width: 400px; 
	box-shadow: 0 0 0 10px rgba(255,255,255,0.2), 0 15px 45px rgba(0,0,0,1);}
.login__header {padding: 20px 40px; background-color: var(--ui-bg-darker);}
.login__title {font-size: 20px; font-weight: 500; padding: 1px 0; text-transform: capitalize;}
.login__close {cursor: pointer; font-size: 24px; opacity: 0.6; margin-left: 20px;}
.login__title a {border-bottom: 1px dotted var(--tt-3); margin-left: 10px; font-weight: 400; color: var(--tt-3);}
.login__content {padding: 20px 40px;}
.login__row {margin-bottom: 20px; position: relative; display: block; font-size: 14px; color: var(--tt-3);}
.login__caption {font-size: 14px; color: var(--tt); margin-bottom: 10px;}
.login__caption a {text-decoration: underline; margin-left: 6px; color: var(--accent);}
.login__input input {padding-left: 40px;}
.login__row .fal {opacity: 0.5; position: absolute; left: 0; bottom: 0; line-height: 40px; width: 40px; text-align: center;}
.login__row button {width: 100%;}
.login__social {background-color: var(--ui-bg-darker); padding: 20px 40px; text-align: center;}
.login__social-caption {font-size: 11px; text-transform: uppercase; margin-bottom: 10px;}
.login__social-btns a {display:inline-block; margin: 0 3px; vertical-align:top;}
.login__social-btns img {display:block; width:30px; height: 30px; border-radius: 50%;}
.login__avatar {width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;}
.login__menu {padding-left: 35px; padding-right: 35px; margin-bottom: -10px;}
.login__menu li {flex: 1 1 0; min-width: auto; max-width: 100%; margin: 0 5px 10px 5px;}
.login__menu a {display: block; border-radius: 6px; padding: 10px; text-align: center; white-space: nowrap;
	background-color: var(--ui-bg-darker); box-shadow: inset 0 0 10px var(--bg-d); font-size: 13px;}
.login__menu .fal {display: block; height: 30px; font-size: 24px; opacity: 0.3;}



/* --- ФИНАЛЬНАЯ УМНАЯ СЕТКА --- */

/* 1. БАЗОВАЯ НАСТРОЙКА (Для 3, 5, 6, 9 картинок) */
.gallery-grid .xfieldimagegallery {
    display: grid !important;
    /* По умолчанию 3 колонки. 
       5 картинок встанут как 3 + 2 (выровнены влево, без растягивания) */
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 2. ЕСЛИ КАРТИНОК РОВНО 2 -> Делаем 2 колонки */
.gallery-grid .xfieldimagegallery:has(li:nth-last-child(2):first-child) {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* 3. ЕСЛИ КАРТИНОК РОВНО 4 -> Делаем 2 колонки (чтобы было 2 ряда по 2) */
/* Это исправит вашу проблему "3 сверху, 1 снизу" */
.gallery-grid .xfieldimagegallery:has(li:nth-last-child(4):first-child) {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* СТИЛИ ДЛЯ ЯЧЕЕК И КАРТИНОК */
.gallery-grid .xfieldimagegallery li {
    display: block !important;
    width: auto !important;
    /* Фиксированная высота, чтобы плитка была ровной */
    height: 160px !important; 
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.gallery-grid .xfieldimagegallery li img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Заполняет плитку, обрезая края */
    border-radius: 6px;
    margin: 0 !important;
    border: none !important;
    background-color: var(--bg-4);
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Эффект наведения */
.gallery-grid .xfieldimagegallery li:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* --- АДАПТИВНОСТЬ --- */

/* На планшетах и мобильных (меньше 768px) всегда 2 колонки */
@media screen and (max-width: 768px) {
    .gallery-grid .xfieldimagegallery,
    .gallery-grid .xfieldimagegallery:has(li:nth-last-child(4):first-child),
    .gallery-grid .xfieldimagegallery:has(li:nth-last-child(2):first-child) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}



/* GAME VIEW STYLES
----------------------------------------------- */
.game-view {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- Заголовок --- */
.game-view__header {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--bdc);
    padding-bottom: 20px;
}

.game-view__title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--tt);
    letter-spacing: -0.5px;
}

.game-view__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--tt-1);
}

.game-view__meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-view__meta .meta-item i { color: var(--accent); }
.game-view__meta .category-link a { 
    color: var(--tt); 
    background: var(--bg-4); 
    padding: 3px 10px; 
    border-radius: 4px; 
    font-weight: 500;
}
.meta-right { margin-left: auto; }
.fav-btn { cursor: pointer; }
.fav-btn:hover { color: var(--accent); }

/* --- Основная сетка --- */
.game-view__grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* Левая колонка фикс, правая резина */
    gap: 40px;
    align-items: start;
}

/* --- Сайдбар (Левая колонка) --- */
.game-view__sidebar {
    position: sticky;
    top: 20px; /* Прилипание при скролле */
}

/* Постер */
.game-view__poster {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    background: var(--bg-4);
}

.game-view__poster img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Рейтинг на постере */
.game-rating-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 25, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.game-rating-overlay .rate-btn { cursor: pointer; opacity: 0.6; transition: 0.2s; font-size: 18px; }
.game-rating-overlay .rate-btn:hover { opacity: 1; color: var(--accent); }
.game-rating-overlay .rate-val { font-weight: 700; font-size: 18px; color: #fff; }

/* Кнопка скачивания */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--accent) 0%, #d82e2e 100%); /* Красный градиент под лого */
    color: #fff !important;
    padding: 18px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3); 
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 39, 67, 0.5);
    filter: brightness(1.1);
}

.btn-download .btn-icon { font-size: 24px; }
.btn-download .btn-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left;}
.btn-download .btn-text span { font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-download .btn-text small { font-size: 12px; opacity: 0.9; font-weight: 400; }

/* Инфо-таблица */
.specs-box {
    background: var(--bg-4);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--bdc);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 20px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--bdc);
    padding-bottom: 8px;
}
.spec-row:last-child { border-bottom: none; padding-bottom: 0; }

.spec-row .label { color: var(--tt-3); }
.spec-row .value { color: var(--tt); font-weight: 600; text-align: right; max-width: 60%; }
.spec-row .accent-text { color: var(--accent); }

/* Облако тегов */
.game-tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.game-tags-cloud a {
    display: inline-block;
    background: var(--bg-d);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent);
    font-weight: bold;
    transition: 0.2s;
    border: 1px solid transparent;
}
.game-tags-cloud a:hover { 
    background: var(--bg-4); 
    color: var(--accent); 
    border-color: var(--accent); 
}

/* --- Правая колонка (Контент) --- */
.game-view__content { min-width: 0; }

/* Заголовки секций */
.section-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--tt);
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 15px;
}
.section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
}

/* Блоки с иконками (Системки, Инфо) */
.game-block {
    background: var(--bg-4); /* Темнее основного фона */
    border: 1px solid var(--bdc);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.game-block .block-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tt);
    text-transform: uppercase;
    opacity: 0.9;
}
.game-block .block-title i { color: var(--accent); }

/* Видео */
.video-responsive {
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}



/* Системные требования */
.system-req-content {
    line-height: 1.6;
    font-size: 14px;
    color: var(--tt-l);
}

/* Комментарии */
.game-comments {
    margin-top: 40px;
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;: 1px solid var(--bdc);
}
.comments-header h3 .comm-count {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    vertical-align: middle;
    margin-left: 10px;
}
.empty-comments {
    text-align: center;
    padding: 40px;
    color: var(--tt-3);
    background: var(--bg-4);
    border-radius: 6px;
    border: 1px dashed var(--bdc);
}

/* АДАПТИВНОСТЬ */
@media screen and (max-width: 900px) {
    .game-view__grid {
        grid-template-columns: 1fr; /* Одна колонка */
    }
    .game-view__sidebar {
        position: static;
        display: grid;
        grid-template-columns: 220px 1fr; /* Постер слева, кнопки справа */
        gap: 20px;
    }
    .game-view__poster { margin-bottom: 0; height: 100%; }
    .game-view__poster img { height: 100%; }
}

@media screen and (max-width: 650px) {
    .game-view__sidebar {
        grid-template-columns: 1fr; /* Всё в столбик */
    }
    .game-view__poster { max-width: 250px; margin: 0 auto 20px auto; }
    .game-view__title { font-size: 24px; text-align: center; }
    .game-view__meta { justify-content: center; }
    
    .btn-download { text-align: center; }
}

/* Responsive */
@media screen and (max-width: 900px) {
    .game-view__grid {
        grid-template-columns: 1fr;
    }
    .game-view__sidebar {
        position: static;
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
    .game-view__poster { margin-bottom: 0; }
}

@media screen and (max-width: 600px) {
    .game-view__title { font-size: 24px; }
    .game-view__sidebar {
        grid-template-columns: 1fr;
    }
    .game-view__poster { max-width: 250px; margin: 0 auto 20px auto; }
    
}

/* ADAPTIVE, MOBILE MENU
----------------------------------------------- */
.overlay {position: fixed; z-index: 998; left: 0; top: 0; width: 100%; height: 100%; 
	opacity: 0.6; background-color: #000; cursor: pointer; display: none;}
.mobile-menu {width: 280px; height: 100%; overflow-x: hidden; overflow-y: auto; background-color: var(--bg);
	padding: 20px; z-index: 999; position: fixed; left: -320px; top: 0; transition: left .4s; border: 0;}
.mobile-menu.is-active {left: 0;}
.mobile-menu-close {cursor: pointer; display: block; left: 280px; top: -40px; position: fixed; z-index: 999;
	width: 40px; height: 40px; line-height: 40px; text-align: center; font-size: 18px; opacity: 0;
	background-color: #e84e36; color: #fff; transition: top .4s, opacity .4s;}
.mobile-menu-close.is-active {top: 0px; opacity: 1;}
body.mobile-menu-is-opened {overflow: hidden; width: 100%; height: 100%;}
.mobile-menu .sidebar {padding: 0; border: 0;}
.mobile-menu .header__menu {display: block;}
.mobile-menu .submenu .menu {padding-top: 15px; margin-bottom: 20px;}

@media screen and (max-width: 1220px) {
	body {background-image: none;}
	.wrapper {padding: 0; overflow: hidden;}
	.wrapper-container {max-width:1000px; padding-left: 20px; padding-right: 20px;}
	.header-nav .header__menu, .sect__sort, .cols .sidebar {display: none;}
	.header__btn-menu {cursor: pointer; display: grid; place-items: center; font-size: 30px; margin-right: -20px; 
		background-color: var(--accent); color: #fff; border-radius: 0; height: 60px; width: 60px;}
	.footer__one {justify-content: center; text-align: center; gap: 20px;}
	.footer__one > * {margin: 0 !important;}
	.footer__text {min-width: 100%;}
	.cols {display: block;}
	.header-nav .flex-grow-1.d-none {display: block;}

	.page__main {margin-top: -20px;}
	.page__cols {grid-template-columns: 1fr;}
	.page__main > h1 {padding: 0;}
	.page__meta-item--fav {position: static;}
}

@media screen and (max-width: 950px) {
	.wrapper-container {max-width:768px;}
	.footer__two {display: block; text-align: center;}
	.footer__menu {justify-content: center;}
	.footer__menu a {margin: 0 10px 16px 10px;}
	#scrolltop {width: 40px; height: 40px; line-height: 40px; font-size: 18px;}
	.mpage__desc {min-width: 100%; order: -1; margin-bottom: 20px;}
	.mpage__social {flex: 1 1 0; margin-left: 0;}
	.mpage__img {margin-right: 20px;}
	.header__reg {display: none;}
}

@media screen and (max-width: 760px) {
	.wrapper-container {max-width:640px;}
	.header {padding-top: 10px; padding-bottom: 10px;}
	.header__search {order: 10; min-width: 100%; margin: 0; margin-top: 10px;}
	.header__search form {max-width: 100%;}
	.header__logo {flex: 1 1 0; min-width: 100px; max-width: 100%; margin-right: 0;}

	.page__subinfo-item:first-child {min-width: 100%; margin: 0;}
	.page__subinfo-item--category {flex: 0 1 auto; justify-content: flex-start;}

	.page__text .quote {margin-left: -20px; margin-right: -20px; padding-right: 20px;}
	.full-text h1, .full-text h2, .full-text h3, .full-text h4, .full-text h5 {font-size: 18px;}
	
	.add-comments-form__input {min-width: 100%; margin: 0 0 10px 0;}
	.add-comments-form__btn {width: 100%; order: 10;}
	.add-comments-form .form__row--protect .form__caption {width: 100%; margin: 0 0 10px 0;}
	.mass_comments_action, .comment-item__controls, .comment-item__rating-caption {display: none;}
}

@media screen and (max-width: 590px) {
	.wrapper-container22 {max-width:480px;}
	.login {max-width: 90%; max-height: 90%; overflow-x: hidden; overflow-y: auto;}
	.login__header, .login__content, .login__social, .pages-bg {padding-left: 20px; padding-right: 20px;}
	.header__logo > * {white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
	.header .header__login {width: 40px; height: 40px; padding: 0; font-size: 0;}
	.header .header__login::before {font-size: 18px; display: grid; width: 40px; height: 40px;
		content: "\f007"; font-weight: 300; font-family: 'Font Awesome 5 Pro'; place-items: center;}
	.sect__title {font-size: 16px;}
	.sect__title .fal, .header__upl span:last-child  {display: none;}

	.page__meta2 {gap: 10px 15px;}
	.page__comms-count, .page__dl span:last-child {display: none;}
	.page__dl .fal {margin: 0;}
	.page__main {border-left: 0; border-right: 0; border-top: 0; margin-left: -20px; margin-right: -20px; margin-top: -40px;}
	.page__comments-header {justify-content: space-between;}
	.show-comms {text-align: left; min-width: 100%; margin-top: 5px; padding-bottom: 10px;}
	.page__subinfo-item > div, .page__subinfo-item > span, .page__subinfo-item a {height: 22px; font-size: 12px;}
}


@media screen and (max-width: 470px) {
	.wrapper-container22 {max-width:360px;}
	.d-grid-models, .d-grid-models #dle-content {grid-template-columns: repeat(auto-fill,minmax(140px,1fr));}
	.sect.sect--tags a {font-size: 13px;}
	.mpage__img {width: 160px;}
}

	
	
	


/* СТИЛИ ДЛЯ СТРАНИЦЫ ИГРЫ (FULLSTORY)
----------------------------------------------- */

/* Сайдбар на странице игры - светлый фон как в main.tpl */
.sidebar-menu-block {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tt);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: var(--accent);
}

/* Меню в сайдбаре - используем те же стили что и в main.tpl */
.sidebar .side__menu {
    margin-bottom: 30px;
    margin-top: 0;
    border-bottom: 1px solid var(--bdc);
    padding-bottom: 20px;
}

.sidebar .side__menu > li {
    margin: 0;
}

.sidebar .side__menu > li > a {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--tt-l);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar .side__menu > li > a:hover {
    background: var(--bg-2);
    color: var(--tt);
}

.sidebar .side__menu > li > a.is-active {
    background-color: var(--accent);
    color: #fff;
    margin: 5px 0;
    padding: 0 10px;
}

.sidebar .side__menu > li > a .fal {
    margin-right: 10px;
    opacity: 1;
    width: 30px;
    color: var(--tt-3);
}

.sidebar .side__menu > li > a.is-active .fal {
    color: #fff;
}

/* Категории в сайдбаре - светлый фон */
.sidebar .categories-menu .menu {
    column-width: auto;
    column-gap: 0;
    display: block;
    border-bottom: 1px solid var(--bdc);
    padding-bottom: 15px;
    margin-bottom: 0;
}

.sidebar .categories-menu .menu li {
    margin-bottom: 15px;
    break-inside: avoid;
}

.sidebar .categories-menu .menu li a {
    display: block;
    padding: 8px 15px;
    padding-right: 40px;
    color: var(--tt-l);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border-radius: 4px;
}

.sidebar .categories-menu .menu li a:hover {
    background: var(--bg);
    color: var(--tt);
    text-decoration: none;
}

.sidebar .categories-menu .menu li span {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tt-3);
    font-size: 13px;
    pointer-events: none;
}

/* Секции в сайдбаре */
.sidebar .sect {
    margin-bottom: 30px;
}

.sidebar .sect:last-child {
    margin-bottom: 0;
}

/* Адаптивность для fullstory */
@media (max-width: 1024px) {
    .cols {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "side";
    }
    
    .sidebar {
        border-left: none;
        border-top: 1px solid var(--bdc);
        padding-left: 0;
        padding-top: 40px;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .sidebar-menu-block {
        padding: 0;
    }
    
    .sidebar .categories-menu .menu {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .sidebar .side__menu > li > a {
        padding: 0 15px;
    }
}
