
/* ========== ANIMATIONS ========== */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes glow-red {
    from {
        filter: drop-shadow(0 0 2px rgb(255, 0, 0));
    }
    to {
        filter: drop-shadow(0 0 15px rgb(255, 0, 0));
    }
}

@keyframes glow-blue {
    from {
        filter: drop-shadow(0 0 2px rgba(0, 255, 255, 0.6));
    }
    to {
        filter: drop-shadow(0 0 15px rgb(0, 255, 255));
    }
}

@keyframes glow-green {
    from {
        filter: drop-shadow(0 0 2px rgba(0, 255, 0, 0.6));
    }
    to {
        filter: drop-shadow(0 0 15px rgb(0, 255, 0));
    }
}

@keyframes glow-gold {
    from {
        filter: drop-shadow(0 0 2px rgba(255, 217, 0, 0.521));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1));
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        border: 0px solid transparent;
    }
    50% {
        box-shadow: 0 0 0 10px rgb(255, 25, 0);
        border: 10px solid red;
        background-color:rgba(255, 0, 0, 0.308);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        border: 0px solid transparent;
    }
}

@keyframes hurryUpPulse {
    0% { box-shadow: 0 0 20px 10px rgba(255, 0, 0, 0.5); }
    100% { box-shadow: 0 0 40px 20px rgba(255, 0, 0, 0.8); }
}

@keyframes hurryUpShake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-2px, -1px); }
    20%, 40%, 60%, 80% { transform: translate(2px, 1px); }
}

@keyframes pulseEffect {
    0% { 
        opacity: 0.5;
        box-shadow: 0 0 20px 5px rgba(255, 0, 0, 0.3);
    }
    100% { 
        opacity: 0.9;
        box-shadow: 0 0 50px 15px rgba(255, 0, 0, 0.7);
    }
}

@keyframes powerUpPulse {
    0% { background-color: rgba(255, 215, 0, 0.1); }
    50% { background-color: rgba(255, 215, 0, 0.3); }
    100% { background-color: rgba(255, 215, 0, 0.1); }
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
        filter: blur(0px);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
        filter: blur(1px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
        filter: blur(2px);
    }
}

@keyframes pulse2 {
    0% { transform: scale(1); filter: brightness(1); }
    25% { transform: scale(1.02); filter: brightness(1.2); }
    50% { transform: scale(1.01); filter: brightness(1.1); }
    75% { transform: scale(1.03); filter: brightness(1.3); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes borderPulse {
    0% { border-width: 0px; opacity: 0; }
    50% { border-width: 8px; opacity: 1; }
    100% { border-width: 5px; opacity: 1; }
}

/* Totem active states for power-up effects */
body.totem-1-active .power-up-border.active {
    border-color: rgba(255, 0, 0, 0.7);
    background: rgba(196, 0, 0, 0.1);
    box-shadow: inset 0 0 30px 10px rgba(255, 0, 0, 0.4), 0 0 20px 5px rgba(255, 0, 0, 0.4);
    animation: borderPulse 1.5s infinite alternate;
}

body.totem-2-active .power-up-border.active {
    border-color: rgba(0, 255, 255, 0.7);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: inset 0 0 30px 10px rgba(0, 255, 255, 0.4), 0 0 20px 5px rgba(0, 255, 255, 0.4);
    animation: borderPulse 1.5s infinite alternate;
}

body.totem-3-active .power-up-border.active {
    border-color: rgba(0, 255, 0, 0.7);
    background: rgba(0, 255, 0, 0.1);
    box-shadow: inset 0 0 30px 10px rgba(0, 255, 0, 0.4), 0 0 20px 5px rgba(0, 255, 0, 0.4);
    animation: borderPulse 1.5s infinite alternate;
}

body.totem-4-active .power-up-border.active {
    border-color: rgba(255, 215, 0, 0.7);
    background: rgba(255, 217, 0, 0.1);
    box-shadow: inset 0 0 30px 10px rgba(255, 217, 0, 0.233), 0 0 20px 5px rgba(255, 215, 0, 0.4);
    animation: borderPulse 1.5s infinite alternate;
}

/* Particle colors for each totem */
.totem-1-active .particle {
    background-color: rgba(255, 0, 0, 0.8);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

.totem-2-active .particle {
    background-color: rgba(0, 255, 255, 0.8);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.totem-3-active .particle {
    background-color: rgba(0, 255, 0, 0.8);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

.totem-4-active .particle {
    background-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

/* ========== SPECIAL EFFECTS ========== */
.tikiMan {
    position: absolute;
    bottom: 70px;
    right: 290px;
    height: 600px;
    z-index: 1;
    animation: fadeInScale 0.3s ease-out;
}

.hurry-up-effect {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9998;
    background: rgba(255, 0, 0, 0.1);
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease-in-out;
}

.hurry-up-effect.active {
    display: block;
    opacity: 0.7;
    animation: hurryUpPulse 1s infinite alternate;
}

.hurry-up-shake {
    animation: hurryUpShake 0.5s infinite linear;
}

.effectHurryUp {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    border: 5px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.effectHurryUp.active {
    opacity: 1;
    border-color: rgba(255, 0, 0, 0.8);
    animation: pulse 1s infinite;
}

/* Power-up effects */
.power-up-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.336);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 9997;
}

.power-up-flash.active {
    opacity: 1;
    animation: powerUpPulse 2s;
}

.power-up-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.8;
    animation: fadeOut 1.5s forwards;
}

/* Power-up border */
.power-up-border {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9995;
    border: 15px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: none;
}

.power-up-border.active {
    opacity: 1;
    display: block;
    animation: borderPulse 1.5s ease-in-out infinite;
}

/* ========== TOTEM STYLES ========== */
/* Totem specific styles */
img#totem[src="assets/elements/totems/totem-1.png"] {
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.6));
    height: 700px;
    left: 10px;
    animation: float 3s ease-in-out infinite, glow-red 2s alternate infinite;
}

img#totem[src="assets/elements/totems/totem-2.png"] {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.6));
    left: 7px;
    height: 700px;
    animation: float 3.2s ease-in-out infinite, glow-blue 2s alternate infinite;
}

img#totem[src="assets/elements/totems/totem-3.png"] {
    filter: drop-shadow(0 0 15px rgba(0, 255, 0, 0.6));
    left: 10px;
    height: 700px;
    animation: float 3.4s ease-in-out infinite, glow-green 2s alternate infinite;
}

img#totem[src="assets/elements/totems/totem-4.png"] {
    height: 700px;
    left: 23px;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
    animation: float 3.6s ease-in-out infinite, glow-gold 2s alternate infinite;
}

/* Totem sections */
.totems-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.totems-container {
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
    justify-content: center;
    margin-top: 60px;
    width: 100%;
}

.totem-item {
    border: 5px solid transparent;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
    background-color: rgba(51, 51, 51, 0.5);
}

.totem-item:hover {
    transform: scale(1.08);
    background-color: rgba(255, 255, 255, 0.15);
}

.totem-item.selected {
    border-color: #ffcc00;
    background-color: rgba(255, 204, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

.totem-preview {
    width: 300px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.totem-preview img {
    max-width: 100%;
    max-height: 100%;
}

.totem-name {
    font-weight: bold;
    text-align: center;
    font-size: 28px;
    color: white;
    font-family: "Tiki", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    overflow: hidden;
    background: url("assets/BG/BG1.png") no-repeat center;
    background-size: cover;
    background-position: bottom;
    filter: drop-shadow(1px 10px 10px);
    background-color: black;
    font-family: "Cabin", sans-serif;
}

label {
    pointer-events: none;
}

/* ========== FONTS ========== */
@font-face {
    font-family: "SuperCartoon";
    src: url("assets/font/SuperCartoon.ttf") format("truetype");
}

@font-face {
    font-family: "Tiki";
    src: url("assets/font/Tiki.ttf") format("truetype");
}

@font-face {
    font-family: "Cabin";
    src: url("assets/font/Cabin-Regular.ttf") format("truetype");
}

/* ========== GAME CONTAINER & ELEMENTS ========== */
.game-container {
    width: 1920px;
    height: 1080px;
    background: url("assets/BG/BG2.png") no-repeat center;
    background-size: cover;
    display: flex;
    position: relative;
    overflow: hidden;
}

.game-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-origin: 0 0;
}

.game-element {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: auto;
    transform-origin: center;
    will-change: transform;
    z-index: 15;
}

/* ========== PLAYER SECTIONS ========== */
#sectionPlayer1 {
    width: 703px;
    height: 1076px;
    position: absolute;
    top: 0px;
    z-index: 2;
    left: 119.5px;
}

#sectionPlayer2 {
    height: 1076px;
    position: absolute;
    top: 0px;
    border: 1px solid transparent;
    z-index: 2;
    right: 110px;
    width: 712px;
}

#sectionPlayer2 .elements-area {
    position: absolute;
    right: 70px;
}

.elements-area {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.change-element-btn {
    /* Estilos base */
    display: inline-block;
    padding: 8px 16px;
    margin-top: 10px;
    border: none;
    border-radius: 20px;
    background-color: #2c3e50;
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    
    /* Efecto hover */
    &:hover {
        background-color: #34495e;
        transform: translateY(-2px);
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Efecto active */
    &:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* Efecto de brillo al pasar el mouse */
    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        transition: 0.5s;
    }
    
    &:hover::after {
        left: 100%;
    }
}

.reset-element-btn {
    /* Estilos base */
    display: inline-block;
    padding: 8px 16px;
    margin-top: 10px;
    border: none;
    border-radius: 20px;
    background-color: #06b91e;
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    
    /* Efecto hover */
    &:hover {
        background-color: #037a13;
        transform: translateY(-2px);
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Efecto active */
    &:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* Efecto de brillo al pasar el mouse */
    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        transition: 0.5s;
    }
    
    &:hover::after {
        left: 100%;
    }
}

.player-header {
    width: 960px;
    height: 95px;
    color: white;
    font-family: "SuperCartoon", sans-serif;
    text-align: center;
    line-height: 95px;
    font-size: 2.6em;
    position: relative;
    z-index: 11;
    margin-top: 30px;
}

#player1Section #txtPlayer1 {
    animation: float 3s ease-in-out infinite;
}

#player2Section #txtPlayer2 {
    animation: float 4s ease-in-out infinite;
}

.game-area {
    position: relative;
    width: 100%;
    height: calc(1076px - 95px - 147px);
    overflow: visible;
    z-index: 5;
}

/* ========== SCORE SECTIONS ========== */
#scorePlayer1 {
    width: 816px;
    height: 147px;
    position: absolute;
    left: 6.5px;
    bottom: 2.5px;
    display: flex;
    font-family: "SuperCartoon", sans-serif;
    align-items: center;
}

#scorePlayer2 {
    width: 822.5px;
    height: 147px;
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    font-family: "SuperCartoon", sans-serif;
    align-items: center;
}

#scoreValueTxtP1 {
    width: 160px;
    height: 147px;
    margin-left: 243.5px;
    z-index: 11;
    text-align: center;
    line-height: 147px;
    font-size: 3.2em;
    color: white;
}

#scoreValueTxtP2 {
    width: 160px;
    height: 147px;
    margin-left: 414.5px;
    text-align: center;
    z-index: 11;
    line-height: 147px;
    font-size: 3.2em;
    color: white;
}

.coin-sprite {
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    z-index: 11;
    position: relative;
}

.moving-coin {
    position: fixed;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 101;
    pointer-events: none;
}

/* ========== TIMER SECTION ========== */
.timer-section {
    width: 274px;
    height: 1078px;
    position: absolute;
    left: 823.5px;
    top: -0.5px;
}

.timer-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.timer-display {
    width: 280px;
    height: 94px;
    position: absolute;
    z-index: 11;
    bottom: 10px;
    text-align: center;
    line-height: 94px;
    font-family: "SuperCartoon", sans-serif;
    font-size: 3.2em;
    color: white;
}

/* ========== DECORATIONS ========== */
.torchLeft {
    position: absolute;
    bottom: 120px;
    z-index: 3;
}

.torchRight {
    position: absolute;
    bottom: 120px;
    right: 0px;
    z-index: 3;
}

#spriteflameLeft {
    width: 130px;
    height: 205px;
    position: absolute;
    z-index: 2;
    left: -0.5px;
    top: 289.5px;
    filter: hue-rotate(0deg) drop-shadow(rgb(228, 0, 0) 1px -25px 25px) drop-shadow(0 0 5px rgba(255, 0, 0, 0.7)) !important;
    transition: filter 0.5s ease-in-out;
}

#spriteflameRight {
    width: 130px;
    height: 205px;
    position: absolute;
    z-index: 2;
    right: 10px;
    top: 289.5px;
    filter: hue-rotate(0deg) drop-shadow(rgb(228, 0, 0) 1px -25px 25px) drop-shadow(0 0 5px rgba(255, 0, 0, 0.7)) !important;
    transition: filter 0.5s ease-in-out;
}

/* Flame color variations */
#spriteflameLeft.blue, #spriteflameRight.blue {
    filter: hue-rotate(175deg) drop-shadow(rgb(0, 53, 228) 1px -25px 25px) drop-shadow(0 0 5px rgba(0, 53, 228, 0.7)) !important;
}

#spriteflameLeft.green, #spriteflameRight.green {
    filter: hue-rotate(110deg) drop-shadow(rgb(0, 228, 53) 1px -25px 25px) drop-shadow(0 0 5px rgba(0, 228, 53, 0.7)) !important;
}

#spriteflameLeft.gold, #spriteflameRight.gold {
    filter: hue-rotate(20deg) drop-shadow(rgb(228, 190, 0) 1px -25px 25px) drop-shadow(0 0 5px rgba(228, 190, 0, 0.7)) !important;
}

.floorDeco {
    position: absolute;
    bottom: 100px;
    z-index: 11;
    left: -160px;
    animation: float 6s ease-in-out infinite;
}

.scoreIMGL {
    position: absolute;
    bottom: 30px;
    z-index: 11;
    left: 210px;
    filter: drop-shadow(0 20px 10px rgba(8, 5, 0, 0.747));
}

.nameIMGL {
    position: absolute;
    top: -90px;
    z-index: 11;
    left: 345px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 20px 10px rgba(8, 5, 0, 0.747));
}

.nameIMGR {
    position: absolute;
    top: -90px;
    z-index: 11;
    right: 350px;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 20px 10px rgba(8, 5, 0, 0.747));
}

.scoreIMGR {
    position: absolute;
    bottom: 30px;
    z-index: 11;
    right: 200px;
    filter: drop-shadow(0 20px 10px rgba(8, 5, 0, 0.747));
}

.logoDeco {
    position: absolute;
    top: -75px;
    z-index: 12;
    left: 0px;
}

.logoBG {
    position: absolute;
    top: 25px;
    left: -10px;
    width: 280px;
    z-index: 11;
    transform: scale(1.2);
}

.totem {
    position: absolute;
    bottom: 135px;
    z-index: 11;
    transition: all 0.5s ease;
}

/* ========== FLOOR & COLLISION ========== */
#floor {
    position: absolute;
    left: 120px;
    bottom: 0px;
    width: 1685px;
    height: 151px;
    pointer-events: none;
    z-index: 1000;
}

/* ========== OVERLAYS ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.884);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    text-align: center;
    color: white;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
}

.overlay-content h1 {
    margin-top: 270px;
    font-family: "SuperCartoon", sans-serif;
    font-size: 4rem;
    color: white;
}

.overlay-content h2 {
    font-size: 3em;
    margin: 20px 0;
    font-family: "SuperCartoon", sans-serif;
}

/* Start Overlay */
#startOverlay {
    background: url("assets/elements/startOverlayIMG.png") no-repeat center center;
    background-size: cover;
    background-color: rgba(0, 0, 0, 0.884);
}

#startOverlay .overlay-content {
    background: transparent;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* End Overlay */
#endOverlay {
    background: url("assets/elements/endOverlayIMG.png") no-repeat center center;
    background-size: cover;
    background-color: rgba(0, 0, 0, 0.884);
}

#endOverlay .overlay-content {
    width: 1820px;
    background: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#endOverlay .overlay-content h1 {
    margin-top: 170px;
    margin-bottom: 30px;
    font-size: 3em;
}

#finalScore {
    font-size: 3.5em;
    margin: 30px 0;
    color: #ffd700;
    font-family: "SuperCartoon", sans-serif;
}

/* License Overlay */
.license-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.884);
    position: absolute;
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: center;
}

.license-overlay .license-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 250px;
    max-width: 700px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%);
    text-align: center;
}

.license-overlay .license-overlay-content h1 {
    font-family: "Tiki", sans-serif;
    font-size: 3rem;
    color: white;
}

/* License Input & Button */
#licenseInput {
    padding: 12px;
    margin: 20px auto;
    width: 80%;
    max-width: 500px;
    display: block;
    border-radius: 8px;
    border: 2px solid #444;
    background-color: #333;
    color: white;
    font-size: 16px;
}

#validateLicenseButton {
    padding: 12px 24px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 15px auto;
    display: block;
}

#validateLicenseButton:hover {
    background-color: #45a049;
}

/* ========== SETTINGS PANEL ========== */
#settingsPanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 0;
    margin: 0;
}

#settingsPanel .overlay-content {
    background-color: rgb(46, 46, 46);
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#settingsPanel h1 {
    font-size: 3em;
    margin: 10px 0 20px 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: "Tiki", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Tabs */
.tabs-container {
    width: 100%;
    margin-bottom: 20px;
}

.tabs-nav {
    display: flex;
    justify-content: left;
    margin-bottom: 20px;
    border-bottom: 2px solid #444;
}

.tab-button {
    padding: 12px 30px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 18px;
    transition: background-color 0.3s;
    font-family: "Tiki", sans-serif;
    margin: 0 5px;
    border: 1px solid #444;
    border-bottom: none;
}

.tab-button.active {
    background-color: #4caf50;
}

.tab-button:hover:not(.active) {
    background-color: #444;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Config Sections */
.config-sections-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.config-section {
    margin-bottom: 20px;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 10px;
    background-color: #333;
    flex: 1 1 45%;
    min-width: 300px;
}

.config-section h2 {
    color: #f8f8f8;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-family: "Tiki", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.config-section p {
    color: #dcdcdc;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

/* Config Top Section */
.config-top-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.logo-section {
    flex: 1;
    padding: 20px;
    height: auto;
    align-items: center;
    background-color: #333;
    border-radius: 10px;
    border: 1px solid #444;
}

.logo-section h2 {
    color: white;
    font-size: 1.8rem;
}

.game-config-section {
    flex: 1;
    padding: 20px;
    background-color: #333;
    border-radius: 10px;
    border: 1px solid #444;
}

.game-config-section h2 {
    color: white;
    font-size: 1.8rem;
}

/* Elements Config */
.elements-config {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    overflow-y: auto;
    padding-right: 10px;
    padding: 15px;
    background-color: #222;
    border-radius: 10px;
    border: 1px solid #444;
}

.element-item {
    background-color: #222;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.element-preview {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.element-preview img {
    max-width: 80%;
    max-height: 80%;
}

.shape-info {
    color: #dcdcdc;
    margin-top: 8px;
    font-size: 14px;
}

.dimensions-container {
    margin: 10px 0;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
}

/* Settings Controls */
#settingsPanel select,
#settingsPanel input[type="number"],
#settingsPanel input[type="text"] {
    padding: 12px;
    margin: 8px 0 15px 0;
    width: 100%;
    display: block;
    border-radius: 8px;
    border: 2px solid #444;
    background-color: #222;
    color: white;
    font-size: 16px;
}

#settingsPanel input[type="file"] {
    margin: 10px 0;
    width: 100%;
    color: #dcdcdc;
}

#settingsPanel label {
    display: block;
    margin: 10px 0 5px 0;
    font-size: 16px;
    color: #dcdcdc;
    text-align: left;
    font-weight: bold;
}

.game-config-section input,
.game-config-section select,
.logo-section input, 
.logo-section select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #f8f8f8;
}

/* Buttons */
.buttons-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c2c2c;
    padding: 10px 0;
    border-top: 1px solid #444;
    display: flex;
    justify-content: center;
    gap: 25px;
    z-index: 1001;
}

#closeSettingsButton,
#saveSettingsButton {
    padding: 12px 30px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    transition: background-color 0.3s;
    font-family: "Tiki", sans-serif;
    min-width: 150px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

#closeSettingsButton {
    background-color: #e74c3c;
}

#saveSettingsButton {
    background-color: #4caf50;
}

#closeSettingsButton:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

#saveSettingsButton:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.change-svg-button {
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.change-svg-button:hover {
    background-color: #357ab8;
}

.element-item select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    background-color: #333;
    color: white;
    border: 1px solid #444;
}

/* Scrollbar */
#settingsPanel .overlay-content::-webkit-scrollbar {
    width: 10px;
}

#settingsPanel .overlay-content::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

#settingsPanel .overlay-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

#settingsPanel .overlay-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* ========== TOGGLE SWITCHES ========== */
.toggle-switch {
    position: relative;
    max-width: 60px;
    height: 34px;
    margin: 10px 0;
    top: 0;
    left: 0;
    width: auto;
}

.toggle-switch label {
    position: absolute;
    width: 70px;
    height: 34px;
    color: #dcdcdc;
    font-size: 16px;
    font-weight: bold;
}

.toggle-switch .toggle-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 70px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch-input:checked + .toggle-slider {
    background-color: #4caf50;
}

.toggle-switch-input:focus + .toggle-slider {
    box-shadow: 0 0 1px #4caf50;
}

.toggle-switch-input:checked + .toggle-slider:before {
    transform: translateX(37px);
}

/* Logo Toggle Switch */
.logo-toggle-switch {
    position: relative;
    max-width: 60px;
    height: 34px;
    margin: 10px 0;
    top: 0;
    left: 0;
    width: auto;
}

.logo-toggle-switch .logo-toggle-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.logo-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 70px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
}

.logo-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.logo-toggle-switch-input:checked + .logo-toggle-slider {
    background-color: #4caf50;
}

.logo-toggle-switch-input:focus + .logo-toggle-slider {
    box-shadow: 0 0 1px #4caf50;
}

.logo-toggle-switch-input:checked + .logo-toggle-slider:before {
    transform: translateX(37px);
}

#spanShowCursor {
    position: absolute;
    top: 7px;
    left: 85px;
}

/* ========== GAME LOGO ========== */
.game-logo {
    width: 100%;
    text-align: center;
    position: absolute;
    top: 30px;
    right: 150;
    z-index: 12;
}

.game-logo img {
    max-width: 200px;
    height: auto;
}

.game-logo.hidden {
    display: none;
}

.logo-preview {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 2px solid #444;
    background-color: #222;
    padding: 14px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}



/* ========== INSTRUCTIONS ========== */
.instructions-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    width: 150px;
    font-size: 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
}

.instructions-button:hover {
    transform: scale(1.05);
}

.instructions-icon {
    font-size: 20px;
    font-weight: bold;
    margin-right: 8px;
}

/* Instructions Panel */
#instructionsPanel.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.instructions-popup {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(to bottom, #3a3a3a, #222);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    color: white;
    font-family: "Arial", sans-serif;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    border: 2px solid #4caf50;
    animation: fadeInScale 0.3s ease-out;
}

.instructions-popup h2 {
    color: #4caf50;
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #4caf50;
    padding-bottom: 10px;
}

.instructions-container {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.instructions-container h3 {
    color: #4caf50;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.instructions-container h4 {
    color: #ffc107;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 16px;
}

.instructions-container p,
.instructions-container li {
    color: #ddd;
    line-height: 1.4;
    font-size: 14px;
    margin-bottom: 8px;
}

.keyboard-shortcut {
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 3px 6px;
    font-family: "Courier New", monospace;
    font-weight: bold;
    display: inline-block;
    margin: 2px 0;
    color: #4caf50;
    font-size: 13px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

.form-type {
    margin-left: 10px;
    margin-bottom: 15px;
    background-color: #333;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.form-type h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

.form-type ul {
    margin-top: 8px;
    padding-left: 15px;
    list-style-type: none;
}

.form-type li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 15px;
}

.form-type li:before {
    content: "•";
    color: #4caf50;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    position: absolute;
    left: 0;
}

.important-note {
    background-color: #333;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.important-note h4 {
    color: #ffc107;
    margin-top: 0;
    margin-bottom: 8px;
}

.close-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-weight: bold;
    text-transform: uppercase;
    font-family: "Tiki", sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.close-button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

/* Scrollbar for instructions */
.instructions-popup::-webkit-scrollbar {
    width: 8px;
}

.instructions-popup::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

.instructions-popup::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 5px;
}

.instructions-popup::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Tab1 specific instructions button */
#tab1 .instructions-button {
    position: static;
    display: inline-block;
    margin-top: 15px;
    background-color: #4a90e2;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: "Tiki", sans-serif;
}

#tab1 .instructions-button:hover {
    background-color: #357ab8;
}

/* ========== TOUCH ICON ========== */
.touch-icon {
    width: 400px;
    height: auto;
    margin-top: 30px;
}

/* ========== ANIMATIONS ========== */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ========== NOTIFICATION SYSTEM ========== */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 350px;
}

.notification {
    background: linear-gradient(to right, #333, #222);
    color: white;
    padding: 15px 20px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-family: "Arial", sans-serif;
    font-size: 16px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    border-left: 4px solid #4caf50;
    max-width: 100%;
    word-wrap: break-word;
    position: relative;
    animation: fadeInRight 0.3s forwards, fadeOut 0.5s forwards 4.5s;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification.info {
    border-left-color: #3498db;
}

.notification.success {
    border-left-color: #2ecc71;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.notification-title::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
}

.notification.error .notification-title::before {
    background-image: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23e74c3c"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
}

.notification.warning .notification-title::before {
    background-image: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f39c12"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>');
}

.notification.info .notification-title::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233498db"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>');
}

.notification.success .notification-title::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232ecc71"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* ========== CAUTION SECTION ========== */
.caution-section {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    transform: translate(50%, 0);
    max-width: 50vw;
}

.caution-section h2 {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.caution-warning {
    display: flex;
    background-color: #3d3d3d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #e74c3c;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.warning-icon {
    font-size: 48px;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.warning-text {
    flex: 1;
}

.warning-text h3 {
    color: #e74c3c;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.warning-text p {
    color: #ddd;
    margin-bottom: 15px;
    line-height: 1.5;
}

.warning-text ul {
    margin-left: 150px;
    margin-bottom: 15px;
    color: #ddd;
    list-style-type: none;
    text-align: left;
}

.warning-text li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}

.warning-text li::before {
    content: "•";
    color: #e74c3c;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.danger-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 18px;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.danger-button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    animation: pulse 1.5s infinite;
}

.danger-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}



/* ========== CREDITS SECTION ========== */
.credits-section {
    color: white;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    max-height: 85vh;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    text-align: left;
    backdrop-filter: blur(5px);
}

.credits-section h3 {
    color: #4caf50;
    font-size: 2.2rem;
    text-align: left;
    margin-bottom: 25px;
    font-family: "Tiki", sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.credits-section h4 {
    color: #ff9900;
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    border-left: 4px solid #4caf50;
    padding-left: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
}

.credits-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #dcdcdc;
    padding: 0 15px;
}

.credits-section ul {
    margin-left: 35px;
    margin-bottom: 20px;
    list-style-type: square;
}

.credits-section li {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #dcdcdc;
    padding-right: 15px;
}

.credits-section strong {
    color: #ff9900;
    font-weight: 700;
}

.credits-section a {
    color: #4caf50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.credits-section a:hover {
    color: #ff9900;
    text-decoration: underline;
}

.credits-section p:last-child {
    margin-top: 30px;
    text-align: right;
    font-style: italic;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* ========== AUDIO SECTION ========== */
.audio-section {
    padding: 20px;
    color: white;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.audio-item {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    display: grid;
    grid-template-columns: 1fr 2fr 50px 50px;
    grid-template-rows: auto auto;
    gap: 10px;
    align-items: center;
}

.audio-item label {
    grid-column: 1;
    pointer-events: auto;
}

.audio-item input[type="range"] {
    grid-column: 2;
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: #222;
    border-radius: 5px;
    outline: none;
}

.audio-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4caf50;
    cursor: pointer;
}

.audio-item .volume-value {
    grid-column: 3;
    text-align: center;
}

.audio-item .play-audio-btn {
    grid-column: 4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4caf50;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.audio-item label[for$="Upload"] {
    grid-column: 1;
    grid-row: 2;
}

.audio-item .audio-upload {
    grid-column: 2 / span 3;
    grid-row: 2;
    padding: 8px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #f8f8f8;
}

.audio-reset {
    margin-top: 30px;
    text-align: center;
}

.warning-button {
    padding: 12px 24px;
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.warning-button:hover {
    background-color: #e68a00;
}

/* ========== BACKGROUND SELECTOR ========== */
.config-select {
    padding: 8px;
    margin: 10px 0;
    width: 100%;
    border-radius: 8px;
    border: 2px solid #444;
    background-color: #333;
    color: white;
    font-size: 16px;
}

.background-preview {
    width: 100%;
    height: 150px;
    margin: 10px 0;
    border: 2px solid #444;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.background-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Scrollbar for credits section */
.credits-section::-webkit-scrollbar {
    width: 8px;
}

.credits-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.credits-section::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 10px;
}

.credits-section::-webkit-scrollbar-thumb:hover {
    background: #ff9900;
}

/* Estilos para el toggle de activación/desactivación */
.element-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.element-status {
    font-size: 14px;
    color: #fff;
    min-width: 50px;
    font-family: "Cabin", sans-serif;
}

.element-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.element-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 1;
    cursor: pointer;
}

.element-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.element-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.element-switch input:checked + .element-slider {
    background-color: #4CAF50;
}

.element-switch input:checked + .element-slider:before {
    transform: translateX(26px);
}

/* Asegurar que el input sea clickeable */
.element-switch input {
    pointer-events: auto;
}

/* Estilo para controles deshabilitados */
.element-item .config-input:disabled,
.element-item button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-element.powerup {
    filter: drop-shadow(0 0 8px gold) drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
    animation: powerupGlow 1.5s infinite alternate;
}

@keyframes powerupGlow {
    from {
        filter: drop-shadow(0 0 5px gold) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    to {
        filter: drop-shadow(0 0 15px gold) drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
    }
}