@font-face {
    font-family: 'Cabin';
    src: url('fonts/Cabin-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Candy Beans';
    src: url('fonts/Candy Beans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Extra Days';
    src: url('fonts/Extra Days.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg1: linear-gradient(to right, #00f2fe 0%, #4facfe 100%);
    --bg2: linear-gradient(to right, #0fd850 0%, #f9f047 100%);
    --bg3: linear-gradient(to right, #f83600 0%, #f9d423 100%);
    --bg4: linear-gradient(to right, #e52d27 0%, #b31217 100%);
    --bg5: linear-gradient(to right, #00c6fb 0%, #005bea 100%);
}
* {
   cursor: none !important;
   touch-action: manipulation;
}
body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent; /* Elimina el resaltado al tocar en dispositivos móviles */
    -webkit-touch-callout: none; /* Previene el menú contextual en iOS */
    -webkit-user-select: none; /* Previene la selección de texto */
    user-select: none;
}
#score, #timer-container {
    font-family: 'Cabin';
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border: red solid 2px;
    box-shadow: 0 4px rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    padding: 5px 15px;
    color: red;
    font-weight: 900;
    position: absolute;
    top: 10px;
    z-index: 20;
}
#score {
    left: 10px;
}
#timer-container {
    right: 10px;
}
#game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 0px;
    width: 100vw;
    height: 100vh; 
    padding: 0px;
    border-radius: 10px;
    position: relative;
    transform: scale(1);
    z-index: 19;
}
#game-board.fullscreen-mode {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 0px;
    width: 100vw; /* Casi todo el ancho de la ventana */
    height: 100vh; /* Mayor parte del alto de la ventana */
    padding: 0px;
    border-radius: 10px;
    position: relative;
    transform: scale(.9);
}
@media screen and (display-mode: fullscreen) {
    #game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 0px;
    width: 100vw; /* Casi todo el ancho de la ventana */
    height: 100vh; /* Mayor parte del alto de la ventana */
    padding: 0px;
    margin-right: -45px;
    margin-top: 00px;
    border-radius: 10px;
    position: relative;
    transform: scale(.95);
    }
}
.candy {
    height: 180px;
    width: 180px;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    margin: 0;
    padding-left: 0px;
    touch-action: manipulation;
    filter: drop-shadow(-20px 20px 10px rgba(0, 0, 0, 0.74));
}
.candy:hover {
    transform: scale(1.15);
    z-index: 2;
}
/* Ajustamos el contenedor principal */
#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0px;
    box-sizing: border-box;
}
/* Aseguramos que los power-ups también sean del tamaño correcto */
.candy.bomb, .candy.clock {
    background-size: 98% 98%;
}
/* Sistema de Combos */
#combo-display {
    font-family: 'Candy Beans';
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 20;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.combo-active {
    font-family: 'Extra Days';
    animation: pulseCombo 0.5s ease-in-out infinite;
    opacity: 1 !important;
}

/* Animación de puntos ganados */
.points-popup {
    position: absolute;
    font-size: 64px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    animation: pointsFloat 1s ease-out forwards;
    z-index: 1000;
}
.candy.swapping {
    animation: swap 0.3s ease;
}
.candy.disappear {
    animation: disappear-pop 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}
.candy.drop {
    animation: drop 0.1s ease-in;
}
div.clickEffect {
    position: fixed;
    box-sizing: border-box;
    border-style: solid;
    border-color: #FFFFFF;
    border-radius: 50%;
    animation: clickEffect 0.4s ease-out;
    z-index: 99999;
    
}
/* Backgrounds Divs */ 
/* div & image */ 
#start-screen { 
    position: absolute; 
    background: url("imagenes/bgStartGame.png");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    z-index: 20;
    color: white;
    font-family: 'Extra Days';
    font-size: 2.4rem; 

} 
/* div & image */ 
#game-over { 
    position: absolute; 
    background: url("imagenes/bgGameOver.png");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    z-index: 20;
    color: white;
    font-family: 'Extra Days';
    font-size: 2rem; 
} 
/* div & image */ 
.main-bg { 
    position: absolute; 
    background-image: url("imagenes/bg.png");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    padding: 0; 
} 
/* div & image */ 
#hurry-bg { 
    position: absolute; 
    background: url("imagenes/hurry.png");
    background-position: bottom;
    background-size: cover;
    display: none;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    padding: 0; 
} 
/* div & image */ 
#pwrUp-bg { 
    position: absolute;
    background: url("imagenes/powerUps.png");
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    display: none; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    padding: 0; 
} 
/* End Backgrounds Divs*/
#start-button, #retry-button {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 18px;
    
    background: #0074d9;
}
#start-button:hover, #retry-button:hover {
    background-color: #0056b3;
}
.pulse-image {
    animation: candyPulse 2s ease-in-out infinite;
}
/* Estilos para cuando no se usan imágenes */
.candy.red { background-color: #ff4136; }
.candy.blue { background-color: #0074d9; }
.candy.green { background-color: #2ecc40; }
.candy.yellow { background-color: #ffdc00; }
.candy.purple { background-color: #b10dc9; }
.combo-break {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff0000;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: comboBreakAnim 1s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}
/* Estilos para los power-ups */
.candy.bomb {
    animation: candyPulse 1s infinite;
}
.candy.clock {
    animation: candyPulse 1s infinite;
}
.candy.gift {
    animation: candyPulse 1s infinite;
}
.explosion {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ff9900, transparent);
    border-radius: 50%;
    animation: explode 1s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}
.time-bonus {
    position: absolute;
    font-size: 5rem !important;
    font-weight: bold;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}
/* Updated combo level styles */
.combo-legendary {
    font-family: 'Extra Days';
    animation: rainbowLegendary 1s linear infinite, pulseCombo 0.5s ease-in-out infinite;
    font-size: 72px;
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073;
}
.combo-epic {
    font-family: 'Extra Days';
    animation: rainbowEpic 1.5s linear infinite, pulseCombo 0.5s ease-in-out infinite;
    font-size: 64px;
    text-shadow: 0 0 10px #ff00ff;
}
.combo-rare {
    font-family: 'Extra Days';
    color: #00ffff;
    font-size: 56px;
    text-shadow: 0 0 8px #00ffff;
}
.combo-common {
    font-family: 'Extra Days';
    color: #ffff00;
    font-size: 48px;
}
.sphere-particle {
    border-radius: 50%;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.2),
                inset 2px 2px 4px rgba(255, 255, 255, 0.2);
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(0, 0, 0, 0.2) 100%);
}
/* Estilos para el panel de licencia*/
.license-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    background: rgb(20, 20, 25);
    z-index: 9999; /* Mayor prioridad */
    overflow-y: auto; /* Scroll para contenido largo */
    -webkit-overflow-scrolling: touch;
    display: flex; /* Añadido para activar flexbox */
    justify-content: center;
    transition: opacity 0.3s ease-in-out;
    align-items: center;
}
.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-content h1 {
    font-size: 3rem;
    font-family: 'Extra Days';
}
#licenseInput {
    padding: 12px;
    margin: 20px auto;
    width: 80%;
    max-width: 500px;
    display: block;
    border-radius: 8px;
    border: 2px solid #444;
    background-color: #333;
    
    font-size: 16px;
}
#validateLicenseButton {
    padding: 12px 24px;
    background-color: #4caf50;
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 15px auto;
    display: block;
}
#validateLicenseButton:hover {
    background-color: #45a049;
}
.license-notification {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 12px;
    margin: 0 auto 30px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    max-width: 600px;
}
.license-notification h2 {
    color: #ff4d4d;
    font-size: 24px;
    margin-bottom: 10px;
}
.license-notification p {
    color: #dcdcdc;
    font-size: 16px;
    margin-top: 5px;
}

/* Sistema de notificaciones */
.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);
    padding: 15px 20px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    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: cover;
    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;
}
.shake {
    animation: shakeEffect infinite linear;
}
.power-up-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}
.power-up-effect.bomb-effect {
    background-image: url('imagenes/powerUps.png');
    background-size: cover;
    animation: fadeInOut 1s ease;
}
.power-up-effect.clock-effect {
    background-image: url('imagenes/powerUps.png');
    background-size: cover;
    animation: fadeInOut 1s ease;
}
.power-up-effect.gift-effect {
    background-image: url('imagenes/powerUps.png');
    background-size: cover;
    animation: fadeInOut 1s ease;
}
.effectHurryUp { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    pointer-events: none;
    background-image: url('imagenes/hurry.png');
    background-size: cover;
    background-position: center;
    z-index: 18; 
    border: 5px solid transparent; 
    display: none; 
    transition: opacity 1s ease; 
} 
.effectHurryUp.active { 
    opacity: 1; 
    background: transparent; 
    border-color: rgba(255, 0, 0, 0.8); 
    box-shadow: 0 0 20px 10px rgba(255, 0, 0, 0.5);
    animation: borderPulse 1s infinite; 
}
.main-bg, #start-screen, #game-over, #pwrUp-bg, #hurry-bg {
    transition: opacity 0.3s ease;
}
#pwrUp-bg.active, #hurry-bg.active {
    opacity: 1;
    animation: fadeInEffect 300ms ease-in-out;
}
/* Estilos para el botón de configuración */
.config-button {
    position: absolute;
    top: 10px;
    right: 100px; /* Posicionado a la derecha del timer */
    background: rgba(255, 255, 255, 0.9);
    border: red solid 2px;
    box-shadow: 0 4px rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    padding: 5px 15px;
    color: red;
    font-weight: 900;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
}
.config-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}
/* =========================
   ESTILOS PARA settingsPanel
   ========================= */
/* Panel de configuración general */
#settingsPanel.overlay {
    background: rgba(0, 0, 0, 0.85);
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(8px);
    font-family: 'Cabin';
}
/* Contenido central del panel */
#settingsPanel .overlay-content {
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.95), rgba(25, 25, 30, 0.98));
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    width: 100%;
    /* max-width: 1200px; */
    height: 100%;
    min-width: 320px;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}
/* Navegación de pestañas */
.tabs-container {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
}
.tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 0;
    background: rgb(20, 20, 25);
    width: 250px;
    height: 100%;
    overflow-y: auto;
    z-index: 11;
}
.tab-button {
    background: rgba(40, 40, 45, 0.6);
    color: #ccc;
    border: none;
    border-radius: 0;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    text-align: left;
    margin: 0;
    border-left: 4px solid transparent;
}
.tab-button.active,
.tab-button:hover {
    background: linear-gradient(90deg, #0074d9, rgba(0, 116, 217, 0.2));
    color: #fff;
    border-left: 4px solid #0074d9;
    box-shadow: none;
    transform: none;
}
/* Contenido de cada pestaña */
.tab-content-container{
    width: 85%;
}
.tab-content {
    display: none;
    background: rgba(35, 35, 40, 0.7);
    padding: 25px 20px;
    animation: fadeInTab 0.4s ease;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
    overflow-y: auto;
    flex: 1;
    height: 100%;
    width: 100%;
    max-height: 100%;
}
.tab-content.active {
    display: block;
}
/* Estilos para tabs de backgrounds */
.bg-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 116, 217, 0.3);
    padding-bottom: 10px;
}
.bg-tab-button {
    background: rgba(40, 40, 45, 0.6);
    color: #ccc;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
}
.bg-tab-button.active,
.bg-tab-button:hover {
    background: linear-gradient(90deg, #0074d9, rgba(0, 116, 217, 0.2));
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
.bg-tab-content {
    display: none;
    animation: fadeInTab 0.4s ease;
}
.bg-tab-content.active {
    display: block;
}
/* Secciones internas */
.generalConfig-section, .game-config-section, .backgrounds-section, .elements-section, .audio-section, .caution-section, .credits-section {
    margin-bottom: 30px;
    font-family: 'Cabin';
}
.generalConfig-section h2, .game-config-section h2, .backgrounds-section h2, .elements-section h2, .audio-section h2, .caution-section h2, .credits-section h2 {
    color: #fff;
    font-size: 1.8rem;
    font-family: 'Cabin';
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 116, 217, 0.5);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.game-config-content-section label,
.backgrounds-content-section label
{
    font-weight: 600;
    color: #eee;
    margin-bottom: 10px;
    display: block;
    font-size: 1.05rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.backgrounds-section h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.audio-controls label {
    color: white;
    font-size: 1rem;
}
.game-config-content-section input[type="number"] {
    width: 80px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #444;
    background: rgba(30, 30, 35, 0.8);
    color: #fff;
    margin-left: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.game-config-content-section input[type="number"]:focus {
    border-color: #0074d9;
    box-shadow: 0 0 0 2px rgba(0, 116, 217, 0.3), inset 0 2px 5px rgba(0,0,0,0.2);
    outline: none;
}
/* Switch personalizado */
.toggle-switch {
    display: inline-block;
    position: relative;
    width: 56px;
    height: 28px;
    margin-left: 15px;
    margin-bottom: 20px;
    vertical-align: middle;
}
.toggle-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #555;
    border-radius: 28px;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.toggle-switch-input:checked + .toggle-slider {
    background: linear-gradient(to right, #0074d9, #38a1f8);
}
.toggle-slider:before {
    content: "";
    position: absolute;
    left: 4px; top: 4px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.35, 1.15);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.toggle-switch-input:checked + .toggle-slider:before {
    transform: translateX(28px);
}
/* Estilos para el contenedor de fondos */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}
/* Estilos para previsualizaciones deshabilitadas */
.disabled-preview {
    position: relative;
}
.disabled-preview::after {
    content: "Imagen deshabilitada";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
/* Previsualización de fondos */
.background-preview {
    margin: 15px 0 25px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid #444;
    width: 350px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.background-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.background-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
}
/* Estilos para los controles de color y gradiente */
select {
    background: rgba(40, 40, 45, 0.8);
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    padding: 8px 12px;
    margin: 0 10px;
}
.apply-btn {
    background: linear-gradient(135deg, #0074d9, #0056b3);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    margin-left: 10px;
}
.apply-btn:hover {
    background: linear-gradient(135deg, #0088ff, #0065d0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 116, 217, 0.4);
}
/* Inputs de archivo */
input[type="file"] {
    margin-top: 10px;
    margin-bottom: 15px;
    color: #ddd;
    background: rgba(30, 30, 35, 0.6);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.95rem;
    width: 90%;
    max-width: 450px;
    transition: all 0.3s ease;
}
input[type="file"]:hover {
    background: rgba(40, 40, 45, 0.8);
    border-color: #0074d9;
}
/* Elementos del juego (caramelos) */
.elements-config {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}
.elements-config .element-item {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 250px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}
.elements-config .element-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-color: rgba(0, 116, 217, 0.5);
}
.elements-config .element-item img {
    width: 150px;
    height: 150px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}
.elements-config .element-item:hover img {
    transform: scale(1.1);
}

.element-item h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-family: 'Cabin';
}

.element-item label {
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Cabin';
    margin-bottom: 10px;
    text-align: center;
    margin-bottom: 10px;
}
/* Audio */
.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.audio-item {
    background: linear-gradient(145deg, #2a2a2a, #222);
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}
.audio-item:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transform: translateY(-2px);
    border-color: rgba(0, 116, 217, 0.3);
}
.audio-item label {
    min-width: 200px;
}
.audio-upload {
    margin-left: 15px;
}
/* Botones de acción */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: rgba(20, 20, 25, 0.8);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}
#saveSettingsButton, #closeSettingsButton, .danger-button, .action-button, .reset-element-btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.action-button {
    position: absolute;
    top: 25px;
    right: 20px;
    background: linear-gradient(135deg, #0074d9, #0056b3);
    color: #fff;
}
.action-button:hover {
    background: linear-gradient(135deg, #0088ff, #0065d0);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 116, 217, 0.4);
}
#saveSettingsButton {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}
#saveSettingsButton:hover {
    background: linear-gradient(135deg, #3ee485, #2cc36b);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.4);
}
#closeSettingsButton {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}
#closeSettingsButton:hover {
    background: linear-gradient(135deg, #ff5e4c, #d44637);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
}
.danger-button {
    background: linear-gradient(135deg, #ff4136, #c23321);
    color: #fff;
}
.danger-button:hover {
    background: linear-gradient(135deg, #ff5146, #d73c2c);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(255, 65, 54, 0.4);
}
.bg-start-screen {
    color: #fff;
    height: 80%;
    padding: 0 40px;
    position: relative;
    width: 80%;
    background: url(imagenes/bgUI_1.png) ;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
    transition: transform .8s ease-in-out;
    animation: floatUI 2s infinite alternate;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    }
    .bg-start-screen .text{
        position: relative;
        top: -120px;
    }
    .logoBG {
        color: #fff;
        height: 300px;
        padding: 0 40px;
        position: relative;
        top: -150px;
        width: 700px;
        background: url(imagenes/logoBG_1.png) ;
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-weight: 900;
        transition: transform .8s ease-in-out;
        animation: floatLogo 2s infinite alternate;
        filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    }
    .logoBG img {
        max-width: 35%;
        height: auto;
    }
    .bg-game-over {
        color: #fff;
        height: 80%;
        padding: 0 40px;
        position: relative;
        width: 80%;
        background: url(imagenes/bgGameOverUI_1.png) ;
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-weight: 900;
        transition: transform .8s ease-in-out;
        animation: floatUI-GameOver 2s infinite alternate;
        filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    }
    .bg-game-over h1 {
       margin-bottom: 15px;
       margin-top: 20px;
    }
    .game-over-timeOver {
        margin-bottom: 5px;
    }
    .game-over-restartText {
        margin-top: 5px;
    }
    /* Estilos para la configuración del logo */
.logo-config {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
.logo-config h3 {
    margin-top: 0;
    color: white;
    font-size: 1.2rem;
}
/* Ajustes para las previsualizaciones de fondos adicionales */
#bgStartScreenPreview img,
#bgGameOverScreenPreview img,
#logoBGPreview img,
#logoImgPreview img {
    max-width: 100%;
    max-height: auto;
    object-fit: contain;
    border-radius: 8px;
}
#logoImgPreview {
   background: white;
   border: 2px solid black;
   border-style: dashed;
   padding: 20px;
   width: 300px;
}
/* Advertencia de precaución */
.caution-section {
    background: rgba(30, 30, 35, 0.7);
    border-radius: 15px;
    max-width: auto;
    height: 85%;
    padding: 22px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    border-left: 2px solid #f31818;
    font-family: 'Cabin';
}
.caution-warning {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}
.warning-icon {
    font-size: 2.8rem;
    color: #ffdc00;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}
.warning-text h3 {
    color: #f8f8f8;
    margin: 15px 0 50px 0;
    font-size: 2rem;
}
.warning-text p, .warning-text ul {
    color: #eee;
    margin: 0 0 20px 0;
    line-height: 1.6rem;
    font-size: 1.1rem;
}
.warning-text ul {
    padding-left: 10px;
}
.warning-text li {
    margin-bottom: 10px;
}
/* Créditos */
.credits-section {
    max-width: 100%;
    margin-top: -20px;
    border-radius: 15px;
    padding: 20px;
    color: #fff;
    padding: 20px;
}

.credits-content {
    background: rgba(30, 30, 35, 0.7);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    margin: 0 auto;
}
.credits-content h3 {
    color: #f8f8f8;
    font-size: 1.5rem;
    text-align: left;
    margin: 15px 0 50px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(0, 116, 217, 0.5);
    padding-bottom: 15px;
}
.credits-content h4 {
    color: #38a1f8;
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    border-left: 4px solid #0074d9;
    padding-left: 15px;
}
.credits-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #ddd;
}
.credits-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}
.credits-content li {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #ddd;
}
.credits-content strong {
    color: #ff9900;
    font-weight: 700;
}
.credits-content a {
    color: #38a1f8;
    text-decoration: none;
    transition: color 0.3s ease;
}
.credits-content a:hover {
    color: #0074d9;
    text-decoration: underline;
}
/* Estilo para la última actualización */
.credits-content p:last-child {
    margin-top: 30px;
    padding-bottom: 30px;
    text-align: right;
    font-style: italic;
    color: #999;
    font-size: 0.9rem;
}
/* Fin de estilos para settingsPanel */

/* Animaciones */

@keyframes borderPulse {
    0% {
        border-width: 0px;
        border-color: rgba(255, 0, 0, 0.6);
        box-shadow: inset 0 0 0 0 rgba(255, 0, 0, 0), 0 0 0 0 rgba(255, 0, 0, 0);
    }
   
    50% {
        border-width: 6px;
        border-color: rgba(255, 0, 0, 1);
        box-shadow: inset 0 0 30px 10px rgba(255, 0, 0, 0.808), 0 0 20px 5px rgb(255, 0, 0);
    }
    
    100% {
        border-width: 0px;
        border-color: rgba(255, 0, 0, 0.6);
        box-shadow: inset 0 0 0 0 rgba(255, 0, 0, 0), 0 0 0 0 rgba(255, 0, 0, 0);
    }
}
@keyframes shakeEffect {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-2px, 1px);
    }
    50% {
        transform: translate(0, -1px);
    }
    75% {
        transform: translate(2px, 1px);
    }
    100% {
        transform: translate(0, 0);
    }
}
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
@keyframes rainbowLegendary {
    0% { color: #ff0000; }
    16.666% { color: #ff9900; }
    33.333% { color: #ffff00; }
    50% { color: #33ff00; }
    66.666% { color: #0099ff; }
    83.333% { color: #ff00ff; }
    100% { color: #ff0000; }
}
@keyframes rainbowEpic {
    0% { color: #ff00ff; }
    50% { color: #ff0099; }
    100% { color: #ff00ff; }
}
@keyframes pulseCombo {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}
@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}
@keyframes floatLogo {
    0% {
        transform: translateY(0) scale(0.7) rotate(0deg);
    }
    100% {
        transform: translateY(-10px) scale(0.71) rotate(1deg);
    }
}
@keyframes floatUI {
    0% {
        transform: translateY(0) scale(0.85) rotate(0deg);
    }
    100% {
        transform: translateY(10px) scale(0.86) rotate(-1deg);
    }
}
@keyframes floatUI-GameOver{
    0% {
        transform: translateY(-10px) scale(0.85) rotate(0deg);
    }
    100% {
        transform: translateY(10px) scale(0.86) rotate(-1deg);
    }
}
@keyframes comboBreakAnim {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}
@keyframes pointsFloat {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}
@keyframes clickEffect {
    0% {
        opacity: 1;
        width: 0.5em;
        height: 0.5em;
        margin: -0.25em;
        border-width: 0.5em;
    }
    100% {
        opacity: 0.2;
        width: 15em;
        height: 15em;
        margin: -7.5em;
        border-width: 0.03em;
    }
}
@keyframes swap {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes disappear-pop {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1) blur(0px);
    }
    40% {
        opacity: 1;
        transform: scale(1.2) ;
        filter: brightness(1.5) blur(1px);
    }
    70% {
        opacity: 0.7;
        transform: scale(0.7);
        filter: brightness(2) blur(2px);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
        filter: brightness(3) blur(6px);
    }
}
@keyframes drop {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}
@keyframes candyPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}
@keyframes fadeInEffect {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
/* Fin de animaciones */


