/* Header + popular layout overrides */

html {
	overflow-x: clip;
}

body {
	overflow-x: clip;
	max-width: 100%;
}

.bc-header {
	overflow-x: clip;
}

.bc-site-logo-img.bc-logo-dark,
.custom-logo.bc-logo-dark {
	display: none;
}

.dark .bc-site-logo-img.bc-logo-light,
.dark .custom-logo.bc-logo-light {
	display: none;
}

.dark .bc-site-logo-img.bc-logo-dark,
.dark .custom-logo.bc-logo-dark {
	display: block;
}

.bc-site-logo--footer {
	display: inline-flex;
	align-items: center;
}

.bc-site-logo-img--footer {
	height: 2.25rem;
	width: auto;
	max-width: 9rem;
	object-fit: contain;
}

@media (min-width: 768px) {
	.bc-site-logo-img--footer {
		height: 2.5rem;
		max-width: 10rem;
	}
}

@media (max-width: 767px) {
	.bc-header-main-inner {
		justify-content: center;
	}
}

.bc-header-actions {
	display: none;
	flex-shrink: 0;
	align-items: center;
	gap: 0.25rem;
	margin-inline-start: auto;
}

@media (min-width: 768px) {
	.bc-header-actions {
		display: flex;
	}
}

.bc-has-tooltip {
	position: relative;
}

.bc-tooltip {
	position: absolute;
	inset-inline: 50%;
	top: calc(100% + 0.5rem);
	z-index: 80;
	width: max-content;
	max-width: 12rem;
	padding: 0.375rem 0.625rem;
	border-radius: 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	background: rgb(15 23 42);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
	transform: translateX(-50%) translateY(-4px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	white-space: nowrap;
}

[dir='rtl'] .bc-tooltip {
	transform: translateX(50%) translateY(-4px);
}

.dark .bc-tooltip {
	color: rgb(15 23 42);
	background: rgb(226 232 240);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.bc-tooltip::after {
	content: '';
	position: absolute;
	inset-inline-start: 50%;
	bottom: 100%;
	margin-inline-start: -4px;
	border: 4px solid transparent;
	border-bottom-color: rgb(15 23 42);
}

.dark .bc-tooltip::after {
	border-bottom-color: rgb(226 232 240);
}

.bc-has-tooltip:hover .bc-tooltip,
.bc-has-tooltip:focus-visible .bc-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

[dir='rtl'] .bc-has-tooltip:hover .bc-tooltip,
[dir='rtl'] .bc-has-tooltip:focus-visible .bc-tooltip {
	transform: translateX(50%) translateY(0);
}

.bc-header-strip,
.bc-header-tabs-row,
.bc-header-tabs-scroll,
.bc-header-more {
	overflow: visible;
}

.bc-header-more {
	position: relative;
	flex-shrink: 0;
	align-self: stretch;
}

.bc-header-more.is-open .bc-nav-dropdown {
	z-index: 70;
}

.bc-nav-dropdown-item.is-active {
	background: rgba(51, 141, 255, 0.1);
	font-weight: 600;
	color: rgb(29 78 216);
}

.dark .bc-nav-dropdown-item.is-active {
	color: rgb(191 219 254);
}

.bc-poster-genre {
	text-transform: none;
	letter-spacing: normal;
	font-weight: 600;
}

.bc-views-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.bc-views-badge__icon,
.bc-views-badge__icon svg {
	flex-shrink: 0;
	display: inline-flex;
}

.bc-views-badge__label {
	font-size: inherit;
	font-weight: inherit;
	white-space: nowrap;
}

.bc-game-card-footer .bc-views-badge {
	gap: 0.25rem;
}

.bc-game-card-meta svg {
	flex-shrink: 0;
}

.bc-game-card-featured {
	background: rgb(254 243 199);
	color: rgb(146 64 14);
}

.dark .bc-game-card-featured {
	background: rgba(120, 53, 15, 0.45);
	color: rgb(253 230 138);
}

.bc-poster-views.bc-views-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.bc-game-card-poster-cats {
	position: absolute;
	inset-inline-start: 0.75rem;
	top: 0.75rem;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	max-width: calc(100% - 1.5rem);
}

.bc-game-card-poster-cats .bc-chip {
	font-size: 0.6875rem;
	padding: 0.25rem 0.5rem;
	backdrop-filter: blur(4px);
}

.bc-popular-body {
	direction: ltr;
	flex-direction: row-reverse;
	justify-content: flex-start;
	gap: 0.75rem;
}

.bc-popular-info {
	align-items: flex-start;
}

.bc-popular-title {
	text-align: left;
}

.bc-popular-meta-row {
	direction: ltr;
	justify-content: flex-start;
	flex-wrap: wrap;
	row-gap: 0.25rem;
}

.bc-popular-genre,
.bc-popular-views {
	justify-content: flex-start;
	text-align: left;
	flex-shrink: 0;
}

.bc-popular-genre svg,
.bc-popular-views svg {
	flex-shrink: 0;
	display: block;
}

.bc-popular-genre {
	white-space: normal;
	overflow: visible;
}

/* Mobile bottom navigation */

.bc-bottom-nav-wrap {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 60;
}

.bc-bottom-nav {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	direction: ltr;
	border-top: 1px solid rgba(51, 141, 255, 0.22);
	background: linear-gradient(135deg, var(--bc-glass-bg), var(--bc-glass-highlight));
	border-inline: none;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
}

.dark .bc-bottom-nav {
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

.bc-bottom-nav__item {
	position: relative;
	display: flex;
	min-height: 3.75rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.125rem;
	padding: 0.5rem 0.25rem 0.375rem;
	font-size: 0.65rem;
	font-weight: 500;
	color: rgb(100 116 139);
	background: transparent;
	border: 0;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s;
}

.dark .bc-bottom-nav__item {
	color: rgb(148 163 184);
}

.bc-bottom-nav__item:hover,
.bc-bottom-nav__item.is-active {
	color: rgb(37 99 235);
}

.dark .bc-bottom-nav__item:hover,
.dark .bc-bottom-nav__item.is-active {
	color: rgb(147 197 253);
}

.bc-bottom-nav__icon {
	display: inline-flex;
	height: 1.5rem;
	width: 1.5rem;
	align-items: center;
	justify-content: center;
}

.bc-bottom-nav__label {
	line-height: 1;
}

.bc-bottom-nav__item--home {
	margin-top: -0.75rem;
}

.bc-bottom-nav__item--home.is-active {
	color: rgb(37 99 235);
}

.dark .bc-bottom-nav__item--home.is-active {
	color: rgb(147 197 253);
}

.bc-bottom-nav__home-btn {
	display: flex;
	height: 1.5rem;
	width: 1.5rem;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	background: transparent;
	color: inherit;
	box-shadow: none;
	transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s, height 0.2s, width 0.2s, border-radius 0.2s;
}

.bc-bottom-nav__item--home.is-active .bc-bottom-nav__home-btn {
	height: 3rem;
	width: 3rem;
	border-radius: 1rem;
	background: linear-gradient(to bottom right, rgb(96 165 250), rgb(37 99 235));
	color: #fff;
	box-shadow: 0 4px 20px rgba(51, 141, 255, 0.45);
}

.bc-bottom-nav__item--home.is-active .bc-bottom-nav__home-btn,
.bc-bottom-nav__item--home.is-active:active .bc-bottom-nav__home-btn {
	transform: scale(0.95);
}

.bc-bottom-nav__item--home.is-active .bc-bottom-nav__label {
	font-weight: 600;
	color: rgb(37 99 235);
}

.dark .bc-bottom-nav__item--home.is-active .bc-bottom-nav__label {
	color: rgb(147 197 253);
}

.bc-bottom-nav__item--categories.is-active {
	margin-top: -0.75rem;
	color: rgb(37 99 235);
}

.dark .bc-bottom-nav__item--categories.is-active {
	color: rgb(147 197 253);
}

.bc-bottom-nav__item--categories.is-active .bc-bottom-nav__icon {
	height: 3rem;
	width: 3rem;
	border-radius: 1rem;
	background: linear-gradient(to bottom right, rgb(96 165 250), rgb(37 99 235));
	color: #fff;
	box-shadow: 0 4px 20px rgba(51, 141, 255, 0.45);
}

.bc-bottom-nav__item--categories.is-active .bc-bottom-nav__label {
	font-weight: 600;
	color: rgb(37 99 235);
}

.dark .bc-bottom-nav__item--categories.is-active .bc-bottom-nav__label {
	color: rgb(147 197 253);
}

.bc-bottom-nav-backdrop {
	position: fixed;
	inset: 0;
	z-index: 55;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.bc-bottom-nav-backdrop[hidden] {
	display: none !important;
}

.bc-bottom-sheet {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 65;
	margin-inline: auto;
	max-width: 32rem;
	border-radius: 1.5rem 1.5rem 0 0;
	border: 1px solid rgba(51, 141, 255, 0.22);
	background: linear-gradient(135deg, var(--bc-glass-bg), var(--bc-glass-highlight));
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
	max-height: min(78vh, 32rem);
	animation: bc-sheet-in 0.28s ease-out;
}

.bc-bottom-sheet[hidden] {
	display: none !important;
}

.bc-bottom-sheet--categories {
	max-height: min(82vh, 36rem);
}

.bc-bottom-sheet__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	border-bottom: 1px solid rgba(51, 141, 255, 0.15);
	padding: 0.75rem 1rem;
}

.bc-bottom-sheet__title {
	font-size: 0.875rem;
	font-weight: 700;
	color: rgb(15 23 42);
}

.dark .bc-bottom-sheet__title {
	color: #fff;
}

.bc-bottom-sheet__close {
	display: inline-flex;
	height: 2.25rem;
	width: 2.25rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: rgb(100 116 139);
	cursor: pointer;
	transition: background-color 0.2s;
}

.bc-bottom-sheet__close:hover {
	background: rgba(51, 141, 255, 0.08);
}

.dark .bc-bottom-sheet__close {
	color: rgb(148 163 184);
}

.dark .bc-bottom-sheet__close:hover {
	background: rgba(51, 141, 255, 0.12);
}

.bc-bottom-sheet__body {
	padding: 1rem;
}

.bc-bottom-sheet__nav {
	max-height: min(58vh, 24rem);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.bc-bottom-search-form {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.bc-bottom-search-submit {
	display: inline-flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 0;
	border-radius: 0.875rem;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(to right, rgb(26 111 245), rgb(51 141 255));
	box-shadow: 0 4px 16px rgba(51, 141, 255, 0.35);
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.bc-bottom-search-submit:hover {
	box-shadow: 0 6px 20px rgba(51, 141, 255, 0.45);
}

.bc-bottom-search-submit:active {
	transform: scale(0.98);
}

.dark .bc-bottom-search-submit {
	color: rgb(15 23 42);
	background: linear-gradient(to right, rgb(89 173 255), rgb(142 202 255));
}

.bc-scroll-styled {
	scrollbar-width: thin;
	scrollbar-color: rgba(51, 141, 255, 0.55) transparent;
}

.bc-scroll-styled::-webkit-scrollbar {
	width: 5px;
}

.bc-scroll-styled::-webkit-scrollbar-track {
	margin-block: 0.25rem;
	border-radius: 9999px;
	background: rgba(51, 141, 255, 0.06);
}

.dark .bc-scroll-styled::-webkit-scrollbar-track {
	background: rgba(89, 173, 255, 0.08);
}

.bc-scroll-styled::-webkit-scrollbar-thumb {
	border-radius: 9999px;
	background: linear-gradient(to bottom, rgb(89 173 255), rgb(26 111 245));
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.dark .bc-scroll-styled::-webkit-scrollbar-thumb {
	background: linear-gradient(to bottom, rgb(142 202 255), rgb(51 141 255));
	border-color: rgba(15, 23, 42, 0.35);
}

.bc-scroll-styled::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(to bottom, rgb(51 141 255), rgb(19 89 225));
}

.bc-bottom-nav-link {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	border-radius: 0.75rem;
	padding: 0.625rem 0.75rem;
	font-size: 0.875rem;
	color: rgb(51 65 85);
	text-decoration: none;
	transition: background-color 0.2s;
}

.bc-bottom-nav-link:hover {
	background: rgba(51, 141, 255, 0.08);
}

.dark .bc-bottom-nav-link {
	color: rgb(226 232 240);
}

.dark .bc-bottom-nav-link:hover {
	background: rgba(51, 141, 255, 0.12);
}

.bc-bottom-nav-link.is-active {
	background: rgba(51, 141, 255, 0.1);
	font-weight: 600;
	color: rgb(29 78 216);
}

.dark .bc-bottom-nav-link.is-active {
	color: rgb(191 219 254);
}

@keyframes bc-sheet-in {
	from {
		opacity: 0;
		transform: translateY(100%);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1023px) {
	body {
		padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
	}

	body.bc-bottom-nav-open {
		overflow: hidden;
	}
}

/* Archive + search listing */
.bc-page-title {
	font-size: 1.25rem;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.bc-page-title {
		font-size: 1.5rem;
	}
}

.bc-archive-trending {
	margin-bottom: 0;
}

.bc-archive-carousel {
	margin-bottom: 0;
}
