/*
Theme Name: Blocksy Child
Template: blocksy
*/
/* Цвета для светлой темы (по умолчанию) */
:root {
    --bg-color: #f4f7f6;
    --content-bg: #ffffff;
    --text-color: #333333;
    --border-color: #eeeeee;
    --accent-color: #1bbc9b;
}

a:hover {
    color: var(--theme-link-hover-color)!important;
}

/* Цвета для темной темы */
[data-theme="dark"] {
    --bg-color: #121212;
    --content-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --accent-color: #1bbc9b;
}

[data-theme="dark"]  .toc-container {
	background:transparent!important;
}

/* Применяем переменные к основным элементам */
body {
    background-color: var(--bg-color);
    color: var(--text-color)!important;
    transition: background 0.3s, color 0.3s; /* Плавный переход */
}
main#main .ct-container-full{
	padding-top:var(--theme-content-vertical-spacing)!important;
}
 
.game-content-section, .sidebar-widget, .item-card {
    background-color: var(--content-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color);
}

h1, h2, h3, h4, a,.ct-footer [data-column]>[data-id] {
    color: var(--text-color)!important;
}
.main-box-title,.category-badge,#download h3,.spec-item {
	color:#000!important;
}

#theme-toggle {
    background: var(--content-bg); /* Цвет фона кнопки будет меняться */
    color: var(--text-color);      /* Цвет иконки/текста будет меняться */
    transition: all 0.3s ease;
    outline: none;
/* 	position: relative;
    top: -47px;
    z-index: 1000;
    width: fit-content;
    left: 50%;
height:0;  */
}
/* Сделаем иконку чуть больше */
#theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопка переключателя */
.blocksy-theme-switcher {
   position: absolute;
    top: 6px;
    right: 22px;
    z-index: 9999;
    width: 40px;
    height: 40px;
	border:none;
    border-radius: 50%;
     cursor: pointer;
    box-shadow: 0 3px 15px var(--theme-palette-color-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.blocksy-theme-switcher:hover {
    transform: scale(1.1);
}

/* Настройки цветов для переключения (добавьте это в начало style.css) */
:root {
    --bg-color: #f4f7f6;
    --text-color: #3d4650;
}

[data-theme="dark"] {
    --bg-color: #121519;
    --text-color: #ffffff;
}

/* Пример применения к фону сайта */
[data-theme="dark"] body, [data-header*="type-1"] .ct-header,[data-header*="type-1"] .ct-header [data-row*="middle"],[data-footer*="type-1"] .ct-footer {
    background-color: var(--bg-color) !important;
}

[data-theme="dark"] .game-content-section, 
[data-theme="dark"] .sidebar-widget {
    background: #1e2227 !important;
    color: #fff !important;
    border-color: #2d333b !important;
}
#header-menu-1 {padding-right: 70px!important}

/* 1. ГЛОБАЛЬНЫЕ КОНТЕЙНЕРЫ */
.container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

/* сетка топ игр */
.top-rated-items{
	display:flex;
	gap: 12px;
	overflow-x: auto;    
     padding: 10px 5px 20px;    
    scroll-snap-type: x mandatory; /* "Прилипание" карточек при прокрутке */
    -webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;  
    scrollbar-width: none;
}
.top-rated-items::-webkit-scrollbar {
    display: none;            
}
a.top-rated-item {
 	gap: 12px;
	align-items:center;
		border-bottom:2px solid var(--theme-palette-color-1)!important;
	flex: 0 0 280px;         
    scroll-snap-align: start;   
    display: flex;             
    background: var(--content-bg, #fff);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none;
    transition: transform 0.2s;
}
.top-rated-item:hover {
    transform: translateY(-5px);
color: var(--text-color) !important;}

a.top-rated-item .left   {
	width:60px;
	height:60px;
	border-radius:15px;
	overflow:hidden;
	flex: 0 0 60px;
 }

a.top-rated-item .left img {
	width:100%;
	object-fit:cover;
}


/* most rated apps */

.most-rated-apps {
	display:grid;
	grid-template-columns: 1fr 1fr;
	gap:50px;
	row-gap:15px;
}
.most-rated-item {
	display: block;
    position: relative;
    z-index: 9;
    overflow: hidden;
    padding: 10px;
	border-radius:12px;
}
.most-rated-item:hover::before {
    position: absolute;
    width: 100%;
    background: rgb(243 245 249 / 30%);
}
 .most-rated-item::before {
    content: "";
    width: 0px;
    height: 100%;
    position: absolute;
    z-index: -1;
    left: 0px;
    top: 0px;
	 transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, width 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.most-rated-item:hover{
	color:var(--theme-heading-color)!important;
 }

.most-rated--rigt{
	display:flex;
	flex-direction:column;
	gap:8px;
}

/* 2. СЕТКА КАТАЛОГА (Архивы и Категории) */
.items-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1100px) { .items-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 850px) { .items-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .items-grid { grid-template-columns: repeat(2, 1fr); } }

/* 3. КАРТОЧКА ТОВАРА */
.item-card {
	position:relative;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
	border-bottom:2px solid var(--theme-palette-color-1)!important;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.item-card a:hover::before {
    opacity: 1;
	border-radius: 14px;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, width 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.item-card a::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    bottom: 0;
    background: rgba(29, 34, 45, .33);
    opacity: 0;
    z-index: 9;
    border-radius: 2px 2px 0 0;
}
 

.item-card a::after{
	content: '+';
    position: absolute;
    left: 0;
    font-size: 33px;
    line-height: 33px;
    color: #fff;
    opacity: 0;
    z-index: 9;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
	transform: translateY(-50%);
    top: 50%;
    right: 0;
	padding-bottom:6px;
}

.item-card a:hover::after {
    opacity: 1;
background:var(--theme-palette-color-1);
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, width 0.2s ease-in-out, opacity 0.2s ease-in-out;};
.item-card-image img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.item-card-image img {width:100%}

.item-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.item-title {
    font-size: 15px !important;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
	display: -webkit-box;
    -webkit-line-clamp: 1; /* Количество строк (1) */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Дополнительно, чтобы карточки были одной высоты */
    min-height: 1.2em; 
    line-height: 1.2em;
    word-break: break-all;
}

/* 4. ЕДИНАЯ СИСТЕМА РЕЙТИНГА (Звезды) */
.stars-outer {
    position: relative;
    display: inline-block;
    color: #e0e0e0; /* Серый */
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #ffb400; /* Золотой */
    line-height: 1;
}
.toc-container {
    max-width: 500px;
}

.toc-container ul li a:hover {
    text-decoration: underline !important;
 }
 
.game-main-description h2, 
.game-main-description h3 {
    scroll-margin-top: 100px;
}
/* 5. СТРАНИЦА ИГРЫ (SINGLE ITEM) */
.game-header-section {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.category-badge {
 
     background: #e8f8f5;
    padding: 4px 12px;
    border-radius: 20px;
    transition: 0.3s;
}

.category-badge:hover {
    background: var(--theme-link-initial-color);
    color: #fff !important;
}

.votes-count {
    border-left: 1px solid #ddd;
    padding-left: 10px;
    margin-left: 5px;
}

.version-badge {
    background: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.app-specs-grid {
    display: grid;
     background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
 	  grid-template-columns: repeat(auto-fit, minmax(25px, 1fr)); gap: 8px; margin-bottom: 15px;
}


.spec-item b {
    display: block;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
 }
.spec-item {
    line-height: 1.1;
    font-size: 14px;
}
#download {color:grey;}
h1,h2,h3 {
	margin-bottom:12px!important;
}
h1 {
	font-size: 1.8em!important;
}
h2 {
	font-size:1.4em!important;
}
h3 {
	font-size:1.2em!important;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

#loading-message {
    animation: pulse 1.5s infinite;
}
 .buttond, .download-btn-top {
    background: var(--theme-link-initial-color);
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.buttond:hover, .download-btn-top:hover { background: grey; color:#fff!important}
.category-buttons-wrapper .buttond {
	font-weight:normal;
	padding:  7px 15px;
}
/* 7. ХЛЕБНЫЕ КРОШКИ */
.breadcrumbs-section {
    font-size: 14px;
    margin-bottom: 20px;
    color: #888;
}

/* 8. HERO СЕКЦИЯ (ГЛАВНАЯ) */
#main .hero-games-section {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 30px 30px;
	    position: relative;
max-width: none !important;
    background-image: url(https://apkzers.com/wp-content/uploads/2026/01/hero-main-1.webp) !important;
    background-size: 200% 200% !important;
    animation: moveBackground 100s infinite alternate linear !important;
    min-height: 450px !important;
}

.hero-title {
	color:#fff!important;
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 10px;
}

.hero-games-section .search-form input {
	max-width:600px;
	margin:0 auto 15px;
	color:#fff;
}
.search-container{max-width:600px;margin: 0 auto;}
.search-container form {
	position:relative;
}

.search-container form button {
	width:fit-content;
	position:absolute;
	right: -50px;
    padding: 15px 30px;
    top: -7px;
    border-radius: 50px;
}

/* 9. ПАГИНАЦИЯ */
.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.archive-pagination .page-numbers {
    padding: 10px 18px;
     border: 1px solid #eee;
    border-radius: 8px;
	transition:all 0.3s linear;
    color: #333;
}

.archive-pagination .page-numbers.current {
    background: #2575fc;
    color: #fff;
}

.archive-pagination .page-numbers:hover{opacity:0.6}
.ct-container-fluid{display:flex!important;
align-items:center;justify-content:space-between}
/* Адаптивность для Related Apps */
@media (max-width: 1000px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
	.blocksy-theme-switcher{
		right:14px;
	}
	[data-column=end] [data-items=primary]>*:last-child {
     padding-right: 50px !important;
}
}


@media (max-width: 950px) {
    /* Переключаем контейнер на одну колонку */
    .container[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar-area {
        position: static !important; /* Убираем липкость на мобильных */
        margin-top: 40px;
    }
}

.recent-item:hover a {
    color: #1bbc9b !important;
}
@media (max-width: 750px) {

.search-container form button
  {
     position: static;
     
}
	.search-container form {
		display:flex;
		flex-direction:column;
		gap:12px;align-items:center;
		justify-content:center;
	}
}

@media (max-width: 600px) {
	.category-buttons-wrapper{display:flex;flex-wrap:wrap;gap:12px;}
    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
	.most-rated-apps{grid-template-columns:1fr;}
	.game-header-section,.game-meta-row{flex-direction:column;}
}

/* Сделаем иконки в связанных играх чуть скругленными */
.related-grid .item-card-image img {
    border-radius: 18%;
    padding: 5px;
}

.item-metadata {
    color: grey;
}


 