.box-scene-unit-selected-name {
	position: absolute;
	top: 20px;
	left: 100px;
	right: 100px;
	text-align: center;
	color: var(--white);
	font-size: 16px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;

	background: rgba(128, 128, 128, 0.15); 
	padding: 4px 10px;
	border-bottom: 2px solid #a33635;
	backdrop-filter: blur(10px);
	clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
	
	cursor: pointer;
	transition: .2s;
	text-shadow: 2px 2px 0 black;
}

.box-scene-unit-selected-name:hover {
	background: rgba(128, 128, 128, 0.3); 
	color: #ffcc00; 
}

.box-scene-favorite-button {
	position: absolute;
	top: 15px;
	right: 50px;
	width: 34px;
	height: 34px;
	
	display: flex;
	align-items: center;
	justify-content: center;
	
	font-size: 24px;
	color: #ffcc00; 
	filter: grayscale(100%) opacity(0.4);
	
	cursor: pointer;
	transition: all .2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	text-shadow: 0 0 0px transparent;
}

.box-scene-favorite-button:active {
	transform: scale(1.5) rotate(-20deg);
	filter: grayscale(0%) brightness(1.5);
	color: #ffcc00;
	transition: 0.05s;
}

.box-scene-favorite-button.is-favorite {
	filter: grayscale(0%) drop-shadow(0 0 8px rgba(255, 204, 0, 0.6));
	animation: favorite-pop 0.4s ease-out;
}

@keyframes favorite-pop {
	0% { transform: scale(1); }
	50% { 
		transform: scale(1.8);
		text-shadow: 0 0 15px #ffcc00, 0 0 30px #ffcc00;
	}
	100% { transform: scale(1); }
}

.box-scene-favorite-button.is-favorite:hover {
	animation: favorite-pulse 1.5s infinite;
}

@keyframes favorite-pulse {
	0% { filter: drop-shadow(0 0 2px rgba(255, 204, 0, 0.5)); }
	50% { filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.9)); }
	100% { filter: drop-shadow(0 0 2px rgba(255, 204, 0, 0.5)); }
}

.box-scene-button-container {
	position: absolute;
	top: 65px;
	left: 10px;
	right: 10px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.box-scene-button {
	width: 22%;
	height: 24px;

	text-align: center;
	line-height: 24px;
	font-size: 10px;
	font-weight: bold;
	text-transform: uppercase;
	border-radius: 2px;
	
	color: var(--white);
	text-shadow: 1px 1px 0px black;
	outline: 1px solid black;

	box-shadow: 
		inset 1px 1px 0 rgba(255, 255, 255, 0.2), 
		inset -1px -2px 0 rgba(0, 0, 0, 0.3);

	cursor: pointer;
	transition: all 0.1s;
	image-rendering: pixelated;
	position: relative;
	overflow: hidden;
}

.box-scene-button:hover {
	filter: brightness(1.15);
	box-shadow: 
		inset 1px 1px 0 rgba(255, 255, 255, 0.3), 
		inset -1px -2px 0 rgba(0, 0, 0, 0.4),
		0 0 10px rgba(0,0,0,0.3);
}

.box-scene-button:active {
	transform: translateY(1px);
	box-shadow: 
		inset 1px 2px 2px rgba(0, 0, 0, 0.5), 
		inset -1px -1px 0 rgba(255, 255, 255, 0.1);
}

.box-scene-button:nth-child(1) {
	background: url("../assets/images/textures/texture3.png"), linear-gradient(180deg, #70ac4c 0%, #5a8a3d 100%);
}

.box-scene-button:nth-child(2) {
	background: url("../assets/images/textures/texture3.png"), linear-gradient(180deg, #a33635 0%, #822b2a 100%);
}

.box-scene-button:nth-child(3) {
	background: url("../assets/images/textures/texture3.png"), linear-gradient(180deg, #2c70e3 0%, #2359b5 100%);
}

.box-scene-button:nth-child(4) {
	background: url("../assets/images/textures/texture3.png"), linear-gradient(180deg, #616161 0%, #4a4a4a 100%);
}

.box-scene-unit-text {
	position: absolute;
	left: -10%;
	bottom: -2px;
	width: 120%;
	font-size: 5px;
	color: var(--white);
	text-align: center;
	text-transform: uppercase;
}

.box-scene-unit-fav {
	position: absolute;
	top: 0px;
	right: 0px;
	font-size: 10px;
}

.box-scene-unit-shiny {
	position: absolute;
	bottom: 4px;
	left: 0px;
	width: 18px;
	height: 18px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	background-image: url("../assets/images/icons/shiny.png");
	filter: drop-shadow(0 0 1px black);
}

.box-scene-unit-container {
	position: absolute;
	top: 100px;
	bottom: 95px;
	right: 15px;
	left: 15px;
	padding: 12px;

	display: flex;
	flex-wrap: wrap;
	align-content: flex-start; 
	gap: 16px;

	background-color: rgba(40, 40, 40, 1);
	background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 10px 10px;
	
	border-radius: 2px;
	overflow-y: auto;
	overflow-x: hidden;
	outline: 1px solid #000;
	
	box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

.box-scene-unit-container::-webkit-scrollbar { width: 16px; }
.box-scene-unit-container::-webkit-scrollbar-track { 
	outline: 1px solid black;
	background: #222; 
}
.box-scene-unit-container::-webkit-scrollbar-thumb { 
    background: #a33635; 
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.2);
}
.box-scene-unit-container::-webkit-scrollbar-thumb:hover {
    background: var(--red); 
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.box-scene-unit {
	position: relative;
	width: 44px;
	height: 44px;
	background-position: center;
	background-repeat: no-repeat;
	cursor: pointer;

	z-index: 1;
}

.box-scene-unit:hover {
	background-color: rgba(163, 54, 53, 0.2); 
	border-color: #a33635;
	filter: drop-shadow(0 0 4px rgba(163, 54, 53, 0.6));
	transform: scale(1.05);
	z-index: 2;
}

.box-scene-unit.is-selected {
	background-color: rgba(255, 204, 0, 0.15);
	border-color: #ffcc00;
	filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.4));
}

.unit-in-team {
    background-color: rgba(112, 172, 76, 0.15) !important;
    outline: 1px solid #70ac4c !important; 
    border-radius: 0 !important; 
}

.unit-in-team::before {
    content: "";
    position: absolute;
    inset: 0; 
    z-index: -1; 
    
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    
    box-shadow: inset 0 0 8px rgba(112, 172, 76, 0.3);
}

.unit-special {
    background-color: rgba(215, 148, 223, 0.15) !important;
    outline: 1px solid #d794df !important;
}


.unit-special::before {
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    box-shadow: inset 0 0 8px rgba(215, 148, 223, 0.3);
}

.unit-in-team::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 4px;
    height: 4px;
    background: #70ac4c;
    border: 1px solid black;
    z-index: 2;
}

.unit-special::after {
    background: #d794df;
}

.unit-in-team::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 4px;
    height: 4px;
    background: #70ac4c;
    box-shadow: 0 0 4px #70ac4c; 
}

.unit-special::after {
    background: #d794df;
    box-shadow: 0 0 4px #d794df;
}
.box-scene-unit::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 4px;
	border-top: 1px solid rgba(255,255,255,0.2);
	border-left: 1px solid rgba(255,255,255,0.2);
}

.box-scene-sort-container {
	position: absolute;
	bottom: 50px;
	width: 300px;
	right: 50px;
	height: 40px;

	display: flex;
	flex-wrap: wrap;
	color: var(--white);
	font-size: 14px;
	line-height: 44px;
	text-shadow: 1px 1px 1px black;
}

.box-scene-sort-arrow {
	position: relative;
	width: 10%;
	text-align: center;
	transition: .2s;
	font-weight: bold;
	cursor: pointer;
}

.box-scene-sort-arrow:hover {
	color: var(--red);
}

.box-scene-sort-value {
	position: relative;
	width: 80%;
	text-align: center;
}

.box-scene-search {
	position: absolute;
	left: 60px;
	bottom: 59px;
	width: 265px;
	height: 20px;
	background-color: var(--white);
	color: #222;
	text-indent: 4px;
	border-radius: 4px;
	outline: 1px solid black;
	color: #333;
	text-align: center;
}

.box-scene-tab-container {
	position: absolute;
	width: 90%; 
	height: 24px;
	bottom: 20px; 
	left: 5%;
	display: flex;
	justify-content: space-between;
	gap: 4px;
}

.box-scene-tab {
	position: relative;
	width: 19%;
	height: 100%;
	background: #a33635;
	
	color: var(--white);
	font-size: 9px;
	font-weight: bold;
	text-transform: uppercase;
	text-shadow: 1px 1px 0px black;

	border: 1px solid black;
	border-radius: 0; 
	
	text-align: center;
	line-height: 28px;
	cursor: pointer;
	
	box-shadow: 
		inset 1px 1px 0 rgba(255, 255, 255, 0.2), 
		inset -1px -1px 0 rgba(0, 0, 0, 0.3);
	transition: .1s;
}

.box-scene-tab:hover {
	filter: brightness(1.2);
	transform: translateY(-2px); 
}

.box-scene-tab:active {
	transform: translateY(1px);
	box-shadow: 
		inset 1px 2px 2px rgba(0, 0, 0, 0.5), 
		inset -1px -1px 0 rgba(255, 255, 255, 0.1);
}

.box-scene-tab.is-active {
	background: #70ac4c;
	pointer-events: none;
}


.name-change-accept-button {
	position: absolute;
	bottom: 15px;
	width: 170px;
	height: 24px;
	left: 50%;
	transform: translate(-50%);
	text-align: center;
	line-height: 26px;
	background-color: var(--red);
	color: var(--white);
	text-shadow: 1px 1px 1px black;
	border-radius: 4px;
	border: 1px solid black;
	font-size: 12px;
	cursor: pointer;
	transition: .2s;
}

.name-change-accept-button:hover {
	filter: brightness(1.2);
}

.name-change-name {
	position: absolute;
	top: 30px;
	width: 300px;
	left: 50%;
	transform: translate(-50%);
	color: var(--white);
	text-align: center;
	text-transform: uppercase;
	padding-bottom: 2px;
	border-bottom: 3px solid var(--red);
	filter: drop-shadow(1px 1px black);
}


.box-drag-sprite-clone {
    z-index: 100;
    transform: scale(1.05;
    cursor: grabbing;
    filter: drop-shadow(4px 4px 1px #222);
}

.box-scene-unit.is-dragging {
  	background-image: none !important;
  	transform: revert-layer; /* mantiene el transform por item inverter si quieres */
}