:root {
	--backdrop-blur:blur(3px);
	--backdrop-filter:blur(3px);
	--shadow-base:0 4px 15px rgba(0,0,0,0.2);
	--border-radius-sm:5px;
	--border-radius-md:8px;
	--border-radius-lg:12px;
	--transition-base:all 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
	--backdrop-bg:rgba(255,255,255,0.05);
	--text-shadow:2px 2px 4px #000;
	--orange:#ff6b00;
}

a:hover {
	color:#fff;
	text-decoration:none;
}

* {
	-webkit-user-select:none;
	user-select:none;
	-webkit-touch-callout:none;
	-webkit-tap-highlight-color:transparent;
}

input,
textarea,
[contenteditable="true"] {
	-webkit-user-select:auto;
	user-select:auto;
	-webkit-touch-callout:default;
}

body {
	touch-action:manipulation;
}

.gap-1 {
	gap:10px;
}

.h-vh-100 {
	height:var(--real-vh,100dvh);
	overflow:hidden;
	box-sizing:border-box;
	scrollbar-width:none;
	-ms-overflow-style:none;
}

#index-section,
.backpack-item,
.backpack-list,
.backpack-info,
.shop-list,
.shop-list .view,
.view.active,
.card-view {
	scrollbar-width:none;
	-ms-overflow-style:none;
}

#index-section::-webkit-scrollbar,
.backpack-item::-webkit-scrollbar,
.backpack-list::-webkit-scrollbar,
.backpack-info::-webkit-scrollbar,
.shop-list::-webkit-scrollbar,
.shop-list .view::-webkit-scrollbar,
.view.active::-webkit-scrollbar,
.mobile-detail-body::-webkit-scrollbar,
.slot-card span::-webkit-scrollbar {
	display:none;
}

#index-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-image: url(/images/4k.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.header-wrapper {
	flex:1;
	overflow: hidden;
	width: 100%;
}

.backpack-item {
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
    border-left: 1px solid var(--swal2-backdrop);
}

#index-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 50%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 0;
    pointer-events: none;
}
.backpack-container {
	display:grid;
	grid-template-columns: 3fr 6fr 4fr;
	gap:5px;
	width:100%;
	overflow:hidden;
	flex:1;
	z-index: 1;
	position: relative;
}

.backpack-list,
.backpack-info,
.shop-list {
	overflow:hidden;
	height:100%;
    display: flex;
    flex-direction: column;
}

.backpack-list-item {
	display:grid;
	grid-template-columns:repeat(6,1fr);
    gap: 10px;
    padding: 10px;
	width:100%;
}

.item-thumb {
	position:relative;
	display:flex;
	justify-content:center;
	align-items:center;
	aspect-ratio:1 / 1;
	cursor:pointer;
}

.quantity-badge,
.quantity-treasure {
	position:absolute;
	top:0;
	right:0;
	background:#ff6b00b3;
	border-radius:0 5px;
	width:auto;
	font-size:10px;
	padding:2px;
	display:flex;
	align-items:center;
}
.pet-quantity-treasure{
    position: absolute;
    bottom: 0;
    background: rgb(0 0 0 / 70%);
    width: 100%;
    font-size: 10px;
    text-align: center;
    color: var(--orange);
}
.backpack-pet-info-treasure span {
position: absolute;
    top: 0;
    background: rgb(0 0 0 / 70%);
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 10px;
}
.pet-quantity-treasure img {
	width:14px !important;
	height:14px !important;
}

.item-thumb img,
.backpack-info img,
.backpack-info-mobile img{
	width:100%;
	height:100%;
	object-fit:cover;
	border-radius:5px;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:var(--backdrop-filter);
	-webkit-backdrop-filter:var(--backdrop-filter);
	outline:1px solid rgba(255,255,255,0.8);
}

.backpack-radar img,
.backpack-info img,
.backpack-info-mobile img {
	width:60px;
	height:60px;
}

.backpack-info,
.backpack-info-mobile {
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:5px;
	padding:5px;
	min-width:100%;
	box-sizing:border-box;
}

.backpack-info span,
.backpack-info-mobile span {
	text-align:justify;
	font-size:14px;
}

.backpack-info-user {
	color:#fff;
	background:var(--orange);
	border:1px solid var(--orange);
	border-radius:5px;
	padding:3px 10px;
	cursor:pointer;
}

.backpack-info-user.active {
	background:var(--swal2-confirm-button-background-color);
	border-color:var(--swal2-confirm-button-background-color);
}

.backpack-info-user.exchange-btn {
	background:var(--orange);
	border-color:var(--orange);
}

.backpack-info-user.insufficient {
	background:gray;
	border-color:gray;
	cursor:not-allowed;
}

.backpack-info-user.status {
	display:flex;
	align-items:center;
	gap:10px;
	background:var(--red);
	border:1px solid var(--red);
	padding:5px;
	filter:drop-shadow(0 0 20px var(--blue));
}

.backpack-info-user.status img {
	width:30px;
	height:30px;
}

.view {
	display:none;
}
.mobile-detail-body .view.active {
    padding: 10px;
}
.view.active {
	display:block;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-content: start;
    overflow-y: auto;
    height: 100%;
}

.backpack-pet-radar {
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:5px;
	padding:5px;
	width:100%;
}

.backpack-pet,
.backpack-radar {
	border-radius:5px;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:var(--backdrop-filter);
	-webkit-backdrop-filter:var(--backdrop-filter);
	border:1px solid rgba(255,255,255,0.6);
	outline:1px solid rgba(255,255,255,0.8);
}

.backpack-pet-info,
.backpack-radar-info {
	display:flex;
	flex-direction:column;
	font-size:12px;
	cursor:pointer;
	position:relative;
	justify-content:space-between;
	height:100%;
}

.backpack-pet-info-index,
.backpack-radar-info-index {
    display: grid;
    grid-template-columns: 3fr 5fr;
    gap: 5px;
    width: 100%;
}

.backpack-pet-info-stats {
	display:flex;
	flex-direction:column;
}

.backpack-pet-info-hunger,
.backpack-radar-info-battery {
	position:relative;
}

.hunger-progress-container,
.battery-progress-container {
	position:relative;
	overflow:hidden;
	width:100%;
}
.backpack-pet-info-treasure {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.backpack-pet-info-treasure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.progress {
	position:relative;
	border-radius:10px;
	overflow:hidden;
	background:rgba(255,255,255,0.2);
	width:100%;
}

.progress-bar {
	position:absolute;
	left:0;
	top:0;
	height:100%;
	transition:width .3s ease;
	font-size:12px;
	line-height:20px;
	text-align:center;
	border-radius:10px;
	background:linear-gradient(90deg,#ffd700,#ff4500);
}

.hunger-icon,
.battery-icon {
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:20px !important;
	height:20px !important;
	border-radius:50% !important;
	pointer-events:none;
	background:rgba(255,255,255,0.6);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	z-index:2;
}

.detail-info-btn {
	position:relative;
	width:100%;
	display:flex;
	flex-direction:column;
	justify-content:space-around;
	align-items:center;
}

.detail-info-btn i {
	cursor:pointer;
	font-size:1.5rem;
	position:absolute;
	top:10px;
	right:10px;
	color:#fff;
	z-index:10;
	background:rgba(0,0,0,0.5);
	border-radius:50%;
	padding:8px;
}
.detail-info-btn img {
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.desc-item {
    padding: 10px;
}
.pet-stats {
	display:flex;
	flex-direction:column;
	justify-content:space-around;
	align-items:center;
	width:100%;
	padding: 10px;
}

.pet-stats-info {
	display:grid;
	grid-template-columns:1fr;
	gap:5px;
	width:100%;
	border-top:1px solid #ccc;
	margin-top:5px;
}

.pet-stats-info-progress-bar {
	display:grid;
	grid-template-columns: 4fr 4fr 3fr 1fr;
	align-items:center;
	gap:5px;
	width:100%;
	font-size:12px;
}

.pet-stats-info-progress-bar .progress {
	height:10px;
}

.hamburger-controls,
.pin-controls {
	display:flex;
	align-items:center;
	justify-content:center;
	gap:5px;
}

.qty-minus,
.qty-plus {
	width:30px;
	height:30px;
    border-radius: 5px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
	width:50%;
	height:30px;
	text-align:center;
}

.shop-name {
	max-width:100%;
	display:block;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
	align-items:center;
}

.pet-index {
	display:flex;
	flex-direction:column;
	justify-content:space-around;
	align-items:center;
	width:100%;
}

.shop-menu {
	display:grid;
	grid-template-columns:repeat(6,1fr);
	gap:5px;
	width:100%;
}

.shop-menu .menu-btn span {
	font-weight:normal;
	font-size:10px;
	text-transform:none;
}

.shop-menu .menu-btn {
	border-radius:5px;
	color:var(--swal2-footer-border-color);
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	padding:5px 3px;
	cursor:pointer;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:blur(3px);
	-webkit-backdrop-filter:blur(3px);
	border:1px solid rgba(255,255,255,0.6);
	outline:1px solid rgba(255,255,255,0.8);
}

.shop-menu .menu-btn.active {
	border:1px solid var(--orange);
	color:var(--orange);
	margin-left:0;
}

.shop-list .view {
	display:grid !important;
	grid-template-columns:repeat(4,1fr);
	grid-auto-rows:max-content;
	gap:10px;
	height:100%;
	overflow-y:auto;
	align-content:start;
}

.shop-list .view:not(.active) {
	display:none !important;
}

.shops-view-items img {
	width:100%;
	border-bottom:1px solid #ccc;
	background:var(--swal2-backdrop);
}

.shops-view-items {
	border-radius:5px;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:var(--backdrop-filter);
	-webkit-backdrop-filter:var(--backdrop-filter);
	border:1px solid rgba(255,255,255,0.6);
	outline:1px solid rgba(255,255,255,0.8);
}
.backpack-list-item,
.mobile-detail-body .view,
.shops-view-items {
    will-change: transform, opacity;
    transform: translateZ(0);
}
.shops-view-items .btn-action,
.card-owned {
	display:block;
	width:100%;
	padding:5px;
	text-align:center;
	font-size:12px;
	border-radius:0 0 5px;
	color:#fff;
	cursor:pointer;
}

.shops-view-items .btn-action.owned,
.card-owned {
	filter:drop-shadow(0 0 5px var(--orange));
	color:#fff;
	cursor:not-allowed;
}

.shops-view-items .btn-action.buy,
.card-buy {
	background-image:linear-gradient(to right,#fd7e14a6,#ff001857);
}

.shops-view-items .btn-action.mission,
.shops-view-items .btn-action.gift,
.shops-view-items .btn-action.lucky,
.card-unlock {
	background-image:linear-gradient(to right,#0f0c29,#302b63,#24243e);
}

.item-name {
	font-size:12px;
	display:block;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
	max-width:70px;
	padding:0 5px;
}

.card-view {
	grid-template-columns:repeat(2,1fr) !important;
}

.slot-card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}
.slot-card span {
    position: absolute;
    bottom: 0;
    background: rgb(0 0 0 / 70%);
    padding: 10px;
    height: 40%;
    overflow-y: auto;
    font-size: 14px;
}
.card-locked-text {
	position:absolute;
	top:50%;
	left:50%;
	transform:translate(-50%,-50%);
	background:rgba(0,0,0,0.7);
	color:#fff;
	font-weight:bold;
	font-size:14px;
	padding:8px 16px;
	border-radius:8px;
	text-align:center;
	white-space:nowrap;
	pointer-events:none;
	z-index:10;
	text-shadow:1px 1px 3px #000;
}

.card-view .item-name {
    max-width: 100%;
    font-weight: 700;
    padding: 5px;
    text-align: center;
    font-size: 14px;
}

.card-stats-canvas {
	width:100% !important;
	aspect-ratio:1 / 1;
}

.shops-view-items.card-item {
	display:flex;
    align-items:center;
	justify-content:space-between;
	box-sizing:border-box;
}

.card-owned-info {
	width:100%;
	font-size:12px;
	display:flex;
	justify-content:space-between;
}

.card-buy,
.card-unlock {
	width:100%;
	border-radius:0 0 5px 0;
	padding:5px;
	text-align:center;
	cursor:pointer;
}

.price-owned {
	font-size:12px;
	display:flex;
	justify-content:space-between;
	padding:0 5px;
}

.relationships-face-item {
	display:flex;
	flex-direction:column;
	align-items:center;
	text-align:center;
	position:relative;
	font-size:12px;
	animation:orbit 12s linear infinite;
	animation-delay:var(--delay,0s);
	transform-origin:center center;
}

.relationships-face-item img {
	border-radius:50%;
	width:50px;
	aspect-ratio:1 / 1;
	object-fit:cover;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:var(--backdrop-filter);
	-webkit-backdrop-filter:var(--backdrop-filter);
	outline:1px solid rgba(255,255,255,0.8);
	padding:5px;
	transition:transform 0.4s;
}

.relationships-face {
	position:relative;
	display:flex;
	flex-wrap:wrap;
	justify-content:center;
	align-items:center;
	gap:20px;
	perspective:1000px;
}

.relationships-face-item:hover img {
	transform:scale(1.15) rotate(10deg);
}

/* Đường nối với hiệu ứng chảy ánh sáng */

.relationships-face-item:not(:first-child)::before {
	content:'';
	position:absolute;
	top:50%;
	left:-30px;
	width:30px;
	height:10px;
	background:linear-gradient(90deg,transparent,rgba(255,255,255,0.6),transparent);
	background-size:200% 100%;
	animation:flow 3s linear infinite;
	transform:translateY(-50%);
}

.items-grid {
	display:grid;
	grid-template-columns:repeat(3,1fr);
	gap:10px;
	justify-items:center;
	padding:10px;
}

/* Điều chỉnh số cột theo mốc sao */

[data-star="6"] .items-grid {
	grid-template-columns:repeat(4,1fr);
}

[data-star="9"] .items-grid {
	grid-template-columns:repeat(5,1fr);
}

.item-upgrade {
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:5px;
}

.item-upgrade img {
	width:50px;
	aspect-ratio:1 / 1;
	object-fit:cover;
	border-radius:10px;
	background:var(--backdrop-bg);
	box-shadow:var(--shadow-base),inset 0 0 10px rgba(255,255,255,0.5);
	backdrop-filter:var(--backdrop-filter);
	-webkit-backdrop-filter:var(--backdrop-filter);
	outline:1px solid rgba(255,255,255,0.8);
}

.item-upgrade-qt {
	font-weight:600;
	padding:3px 10px;
	border-radius:12px;
	max-width:60px;
	font-size:14px;
}

.item-upgrade span {
	font-size:12px;
	max-width:100px;
}

.radar-canvas-wrapper {
	position:relative;
	display:inline-block;
	width:fit-content;
}

#radarSweepCanvas {
	position:absolute;
	top:50%;
	left:50%;
	width:80%;
	aspect-ratio:1 / 1;
	pointer-events:none;
	transform:translate(-50%,-50%);
	z-index:-1;
}

.radar-info {
	display:flex;
	gap:10px;
	width:100%;
}

.radar-scan {
	width:100%;
	aspect-ratio:1 / 1;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	position:relative;
}

.radar-bg {
	position:absolute;
	inset:0;
	background-size:contain;
	background-position:center;
}

.radar-scan img {
	border:0;
	outline:0;
	background:none;
	box-shadow:none;
	backdrop-filter:none;
	height:auto;
	top:50%;
	left:50%;
	width:100%;
	aspect-ratio:1 / 1;
	pointer-events:none;
	transform:translate(-50%,-50%);
}

.radar-canvas {
	position:absolute;
	top:50%;
	left:50%;
	width:57%;
	aspect-ratio:1 / 1;
	pointer-events:none;
	transform:translate(-50%,-50%);
	z-index:-1;
	border-radius:50%;
	background:radial-gradient(circle,#043b0b30,#021e04);
	border:2px solid rgba(0,255,0,0.5);
	box-shadow:0 0 10px rgba(0,255,0,0.8);
}

@keyframes glow {
	from {
		text-shadow:0 0 8px rgba(255,215,0,0.8);
	}
	to {
		text-shadow:0 0 15px rgba(255,215,0,1);
	}
}

/* Hiệu ứng xoay nhẹ như sao */

@keyframes orbit {
	0% {
		transform:rotate(0deg) translateX(0) rotate(0deg);
	}
	100% {
		transform:rotate(360deg) translateX(0) rotate(-360deg);
	}
}

/* Hiệu ứng dòng chảy trên đường nối */

@keyframes flow {
	0% {
		background-position:200% 0;
	}
	100% {
		background-position:-200% 0;
	}
}

.modal-dialog {
	height:100% !important;
}

.modal-header {
	display:flex;
	justify-content:space-between;
	align-items:center;
	padding:5px;
	gap:5px;
}

.modal-body {
	padding:0;
	overflow:hidden !important;
	position:relative;
}

.swal2-styled:focus,
.swal2-popup .swal2-styled:focus,
.swal2-container button.swal2-styled:focus {
	outline:none !important;
	box-shadow:none !important;
	border:none !important;
}

.swal2-popup,
.modal-content {
	border-radius:var(--border-radius-sm) !important;
	background:radial-gradient(circle at center,#7800ffa3,#000) !important;
	backdrop-filter:var(--backdrop-blur) !important;
	border:1px solid rgba(255,255,255,0.6) !important;
	color:#e5d7ff !important;
}

.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel {
	background:url(/images/arena/battle/vs-button.webp) center / 100% 100% no-repeat !important;
	padding:10px 24px !important;
	font-weight:900 !important;
	text-transform:uppercase !important;
	text-shadow:var(--text-shadow) !important;
	color:var(--orange) !important;
	filter:drop-shadow(0 0 12px #ff6b0066) !important;
}

.swal2-styled.swal2-cancel {
	filter:grayscale(0.7) drop-shadow(0 0 8px #666) !important;
}

.swal2-backdrop-show {
	background:rgba(0,0,0,0.82) !important;
}

.swal2-icon.swal2-error,
.swal2-icon.swal2-warning {
	display:none !important;
}
/* ==========================================================================
   LOADING & COUNTDOWN
   ========================================================================== */
#loading-overlay {
    position: fixed;
    inset: 0;
    background-color: #000;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), url(/images/4k.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
    transition: opacity 0.3s;
}
#image-container {
    width: 300px;
    height: 25px;
    position: relative;
    overflow: hidden;
}
#image-container img {
    width: 50px;
    position: absolute;
    left: 0;
    transition: left 0.3s;
}
#loading-progress {
    width: 300px;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: blur(3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 0 10px rgba(255,255,255,0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--orange);
    transition: width 0.3s;
}
#loading-text {
    max-width: 250px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    font-size: 14px;
}
/* ==========================================================================
   MOBILE OVERLAY (copy y hệt từ card)
   ========================================================================== */
.mobile-detail-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 10px;
    background-image: 
        url(/images/video/card-flip/fantasy_card_back.webp),
        url(/images/arena/battle/arena-choose.webp);
    background-position: center, center;
    background-size: 110% auto, 100% auto;
    background-repeat: no-repeat, no-repeat;
    background-color: rgba(0,0,0,0.7);
    background-blend-mode: overlay;
}
.mobile-detail-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.overlay-close-item {
    padding: 10px;
    font-size: 24px;
    font-weight: 500;
}
.mobile-detail-body {
    height: 100%;
    width: 100%;
    transform: translateY(0) scale(1);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.4s ease;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 5px;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}
/* =============================================
 CƠ BẢN CHO MENU
 ============================================= */
.backpack-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    color: #ccc;
}

.menu-btn {
    position: relative;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    overflow: hidden;
    transition:
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
        height 0.25s ease,
        padding-left 0.25s ease,
        box-shadow 0.25s ease-out,
        opacity 0.25s ease,
        background 0.3s ease;
    height: 40px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    background: rgb(255 255 255 / 20%);
    opacity: 0.7;
    color: #fff;
    will-change: transform, height, padding-left, box-shadow, opacity;
}

.menu-all {
    height: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
}

.menu-all img {
    width: 130%;
}

.menu-btn:hover,
.menu-btn.active {
    color: #ff9e44;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.25);
    height: 50px;
    opacity: 1;
    background: var(--swal2-backdrop);
    padding-left: 15px;
}

.menu-btn .shops-coins {
    display: flex;
    flex-direction: column;
}

.menu-btn.shops img {
    width: 30px;
}

.coin-count {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 20px;
    border-bottom: 1px solid #ccc;
    font-family: monospace;
    line-height: 1;
    padding: 5px 10px;
    margin: 10px;
}

.coin-count::after {
    content: "•";
    position: absolute;
    right: -5px;
    bottom: -13px;
    font-size: 30px;
    line-height: 1;
    color: #ccc;
    pointer-events: none;
}

.backpack-level {
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 20px;
    border-bottom: 1px solid #ccc;
    font-family: monospace;
    line-height: 1;
    padding: 5px 10px;
    margin: 10px;
}

.backpack-level::after {
    content: "•";
    position: absolute;
    left: -5px;
    bottom: -13px;
    font-size: 30px;
    line-height: 1;
    color: #ccc;
    pointer-events: none;
}

.item-count {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-left {
    display: flex;
    align-items: center;
}

.item-left img {
    width: 20px;
}

.item-line {
    height: 1px;
    width: 100%;
    background: #ccc;
    position: relative;
}

.item-line::after {
    content: "•";
    position: absolute;
    left: -5px;
    bottom: -12px;
    font-size: 30px;
    line-height: 1;
    color: #ccc;
    pointer-events: none;
}

.item-right {
    font-family: monospace;
}

.nav-wrapper {
    width: 100%;
    z-index: 1;
    background: #fff;
}

/* =============================================
 MOBILE: dùng icon + text, không dùng bg ảnh nặng
 ============================================= */
@media (max-width: 767px) {
    .overlay-content {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        transform: translateY(100%); /* slide từ dưới lên */
    }

    .mobile-detail-overlay.show .overlay-content {
        transform: translateY(0);
    }
    .mobile-detail-overlay {
        background-size: 110% 100%, 100% auto;
    }
    .backpack-container,
    .mobile-detail-body{
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .backpack-menu {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        width: 100%;
        padding: 0;
        height: 80px;
    }
    .backpack-menu.buy-shops {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        width: 100%;
        padding: 0;
        height: 80px;
    }
    .menu-btn {
        flex-direction: column;
        border-radius: 0;
        background: none;
        height: 100%;
    }
    .buy-shops .menu-btn.active span {
        font-size: 10px;
    
    }
    .menu-all {
        margin: 0;
    }

    .menu-all img {
        padding: 5px;
        width: 80%;
        height: 80%;
    }

    .active .menu-all img {
        width: 100%;
        height: 100%;
    }

    .backpack-info {
        display: none;
    }

    .backpack-list {
        padding: 0 10px 50px 10px;
    }

    .pet-stats-info-progress-bar .progress,
    .progress {
        border: 1px solid #ccc;
    }

    .match-circle small {
        font-size: 14px;
        padding: 0 5px;
        bottom: -5px;
        color: #fff;
    }

    .circle-svg {
        width: 60px;
        height: 60px;
    }

    .menu-btn .shops-coins {
        align-items: center;
    }

    .menu-btn.shops img {
        width: 20px;
    }

    .menu-btn span {
        display: none;
    }

    .menu-btn.active span {
        display: block;
        font-family: monospace;
        font-size: 12px;
        font-weight: bold;
        color: #fff;
        pointer-events: none;
    }

    .active .menu-all {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 50% 80%, 0% 100%, 0 100%);
        border: 1px solid var(--orange);
        background: var(--white);
        margin: 5px 10px 0 10px;
        align-items: flex-start;
    }
    .buy-shops .active .menu-all {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 50% 80%, 0% 100%, 0 100%);
        border: 4px solid var(--orange);
        background: var(--white);
        margin: 3px 10px 0 10px;
        align-items: flex-start;
    }
    .menu-btn.active {
        transform: scale(1.3);
        box-shadow: none;
        background: none;
        padding: 0;
        height: 100%;
    }
}

@media (min-width: 768px) {
    .menu-btn span {
        position: relative;
        z-index: 2;
        text-shadow: 1px 1px 4px #000;
        padding: 0 0 0 10px;
    }
    .card-view {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .item-name {
        max-width: 100px;
    }

    .backpack-pet-info-index img,
    .backpack-radar-info-index img {
        width: 100px;
        height: 100px;
    }
    .backpack-pet-info-index, .backpack-radar-info-index {
        grid-template-columns: 1fr 3fr;
    }
    .backpack-pet-info-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        align-self: flex-start;
    }
    .backpack-pet-info-stats span {
        font-size: 16px;
    }
    .backpack-pet-radar {
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}

@media (min-width: 1024px) {
    .pet-match {
        display: flex;
        align-items: center;
    }
}

@media (min-width: 1280px) {
    .backpack-list-item {
        grid-template-columns: repeat(10, 1fr);
    }
    .card-view {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .view.active {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1920px) {
    .header-wrapper {
        max-width: 70vw;
    }

    .col-xlg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-xlg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .view.active {
        grid-template-columns: repeat(6, 1fr);
    }
}