* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
    image-rendering: pixelated;
}

@font-face {
    font-family: 'PixelFont';
    src: url('fonts/pixel.ttf') format('truetype');
}

body {
    background-color: #0a0a2a;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
}

/* Efecto de nebulosa */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 191, 255, 0.4) 0%, transparent 50%);
    z-index: -1;
    animation: nebula 20s infinite alternate;
}

@keyframes nebula {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.1); }
}

.floating-element {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: float 30s infinite linear;
    z-index: -1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes float {
    0% { transform: translate(-100px, -100px) rotate(0deg); }
    100% { transform: translate(calc(100vw + 100px), calc(100vh + 100px)) rotate(360deg); }
}

/* Pantallas */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

/* Menú principal */
.menu-container {
    max-width: 800px;
    width: 90%;
    text-align: center;
    background-color: rgba(20, 20, 50, 0.8);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 1s ease;
    border: 4px solid rgba(138, 43, 226, 0.3);
    image-rendering: pixelated;
}

.game-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 4px 4px 0px #000;
    letter-spacing: 2px;
}

.pixel-art-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

.pixel-art-primo {
    width: 100%;
    height: 100%;
    background-image: url('character/primo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    animation: float-pixel 3s infinite alternate;
}

@keyframes float-pixel {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.menu-btn {
    display: block;
    width: 200px;
    margin: 1rem auto;
    padding: 1rem;
    background-color: #8a2be2;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    border: 4px solid #fff;
    box-shadow: 4px 4px 0px #000;
    transition: all 0.1s;
}

.menu-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
}

.menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

/* Créditos */
.credits-container {
    max-width: 600px;
    width: 90%;
    text-align: center;
    background-color: rgba(20, 20, 50, 0.8);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 1s ease;
    border: 4px solid rgba(138, 43, 226, 0.3);
}

.credits-container h2 {
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0px #000;
}

.credits-container p {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Juego */
.container {
    max-width: 800px;
    width: 90%;
    text-align: center;
    background-color: rgba(20, 20, 50, 0.8);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 1s ease;
    border: 4px solid rgba(138, 43, 226, 0.3);
}

.container h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 4px 4px 0px #000;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.stat {
    background-color: rgba(30, 30, 60, 0.8);
    padding: 1rem;
    border-radius: 0;
    box-shadow: 4px 4px 0px #000;
    min-width: 150px;
    border: 4px solid #fff;
    font-size: 0.7rem;
}

.players-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.player {
    background-color: rgba(30, 30, 60, 0.8);
    padding: 1rem;
    border-radius: 0;
    box-shadow: 4px 4px 0px #000;
    min-width: 150px;
    border: 4px solid #fff;
    text-align: center;
}

.player-avatar {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.player-name {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.health-text {
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

.boss-container {
    position: relative;
    margin: 2rem 0;
    padding: 2rem;
    background-color: rgba(30, 30, 60, 0.8);
    border-radius: 0;
    box-shadow: 4px 4px 0px #000;
    overflow: hidden;
    border: 4px solid #fff;
}

#boss {
    font-size: 5rem;
    margin: 1rem 0;
    transition: transform 0.2s;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.boss-hit {
    animation: hit 0.3s ease;
}

@keyframes hit {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.health-bar-container {
    height: 20px;
    background-color: rgba(50, 50, 80, 0.8);
    border-radius: 0;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
    border: 2px solid #fff;
}

#health-bar, #levi-health-bar, #adrian-health-bar {
    height: 100%;
    width: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.1s;
    position: relative;
    overflow: hidden;
    color: white;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    box-shadow: 4px 4px 0px #000;
    font-size: 0.7rem;
    border: 2px solid #fff;
}

button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
}

button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

#message {
    margin-top: 2rem;
    font-weight: bold;
    min-height: 3rem;
    padding: 1rem;
    background-color: rgba(30, 30, 60, 0.8);
    border-radius: 0;
    transition: all 0.3s;
    border: 4px solid #fff;
    box-shadow: 4px 4px 0px #000;
    font-size: 0.7rem;
    line-height: 1.5;
}

.boss-critical {
    animation: critical 0.5s ease;
    filter: drop-shadow(0 0 20px rgba(255, 87, 34, 0.8));
}

@keyframes critical {
    0% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-5deg); }
    50% { transform: scale(0.9) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1); }
}

.boss-death {
    animation: death 2s ease;
    opacity: 0;
}

@keyframes death {
    0% { transform: scale(1); opacity: 1; }
    20% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

.floating-text {
    position: absolute;
    font-weight: bold;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 100;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

/* Colores para los diferentes tipos de daño */
.damage-normal {
    color: #2196F3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.7);
}

.damage-strong {
    color: #FF9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.7);
}

.damage-special {
    color: #9C27B0;
    text-shadow: 0 0 10px rgba(156, 39, 176, 0.7);
}

.damage-bleed {
    color: #F44336;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
}

.damage-heal {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
}

button.cooldown {
    background-color: #444;
    cursor: not-allowed;
}

#attack-normal {
    background-color: #2196F3;
    border: 2px solid rgba(33, 150, 243, 0.5);
}

#attack-fuerte {
    background-color: #FF9800;
    border: 2px solid rgba(255, 152, 0, 0.5);
}

#attack-especial {
    background-color: #9C27B0;
    border: 2px solid rgba(156, 39, 176, 0.5);
}

/* Efecto de sangrado */
.bleeding {
    position: relative;
}

.bleeding::before {
    content: '💧';
    position: absolute;
    color: #F44336;
    animation: bleed 2s infinite;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
}

@keyframes bleed {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Sonido visual */
.sound-wave {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: sound-wave 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes sound-wave {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* Animación de fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Objetos consumibles */
.consumable {
    position: absolute;
    font-size: 3rem;
    cursor: pointer;
    animation: consumable-float 3s infinite alternate ease-in-out;
    transition: all 0.2s;
    z-index: 999;
    filter: drop-shadow(5px 5px 0 rgba(0,0,0,0.7));
    user-select: none;
}

.consumable:hover {
    transform: scale(1.4);
    filter: drop-shadow(8px 8px 0 rgba(0,0,0,0.9));
}

.consumable:active {
    transform: scale(0.9);
}

.consumable-collect {
    animation: collect 0.5s forwards;
}

@keyframes consumable-float {
    0% { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes collect {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes float-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-50px); }
}

/* Tooltip para consumibles */
.consumable-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    border: 3px solid white;
    box-shadow: 5px 5px 0 #000;
    white-space: nowrap;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
}

.consumable:hover .consumable-tooltip {
    opacity: 1;
}

/* Notificación de recolección */
.collection-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(20, 20, 50, 0.95);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 1000;
    border: 4px solid white;
    box-shadow: 6px 6px 0 #000;
    animation: notification 3s forwards;
}

@keyframes notification {
    0% { transform: translateX(100px); opacity: 0; }
    10% { transform: translateX(0); opacity: 1; }
    90% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100px); opacity: 0; }
}

/* Estilos para texto flotante de daño o curación */
.floating-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
    animation: float-up 1s forwards;
    z-index: 100;
    text-shadow: 2px 2px 0 #000;
}

@keyframes float-up {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

.damage-heal {
    color: #4CAF50; /* Verde para curación */
}

button.cooldown {
    background-color: #444;
    cursor: not-allowed;
}

#attack-normal {
    background-color: #2196F3;
    border: 2px solid rgba(33, 150, 243, 0.5);
}

#attack-fuerte {
    background-color: #FF9800;
    border: 2px solid rgba(255, 152, 0, 0.5);
}

#attack-especial {
    background-color: #9C27B0;
    border: 2px solid rgba(156, 39, 176, 0.5);
}

/* Efecto de sangrado */
.bleeding {
    position: relative;
}

.bleeding::before {
    content: '💧';
    position: absolute;
    color: #F44336;
    animation: bleed 2s infinite;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
}

@keyframes bleed {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Sonido visual */
.sound-wave {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: sound-wave 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes sound-wave {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* Animación de fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Efecto de resaltado para mensajes */
.message-highlight {
    background-color: rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Controles de música */
.music-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(138, 43, 226, 0.7);
    color: white;
    border: 2px solid white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.2s;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 4px 4px 0 #000;
}

.music-btn:active {
    transform: scale(0.95);
    box-shadow: 2px 2px 0 #000;
}

/* Mejoras para el contador de McFlurrys */
.mcflurry-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B6B;
    text-shadow: 2px 2px 0 #000;
}

.mcflurry-value {
    display: inline-block;
    transition: all 0.3s;
}

.mcflurry-icon {
    font-size: 1.2rem;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mcflurry-increment {
    animation: increment 1s;
}

@keyframes increment {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); color: #FF0000; }
    100% { transform: scale(1); }
}

/* Mejoras para los botones de acción */
#action-normal, #action-fuerte, #action-especial {
    position: relative;
    overflow: hidden;
}

#action-normal::after, #action-fuerte::after, #action-especial::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: all 0.3s;
    opacity: 0;
}

#action-normal:hover::after, #action-fuerte:hover::after, #action-especial:hover::after {
    opacity: 1;
}

/* Mejora para el mensaje */
#message {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    border: 2px solid #fff;
    box-shadow: 3px 3px 0 #000;
    max-width: 80%;
    margin: 20px auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

.primo-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
}

.primo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    animation: primo-float 3s infinite alternate;
}

@keyframes primo-float {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-10px) rotate(2deg); }
}

/* Estilos adicionales para los efectos:
/* Efectos de escudo y poder */
.shielded {
    position: relative;
    overflow: visible;
}

.shielded::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid rgba(93, 156, 236, 0.7);
    border-radius: 8px;
    animation: shield-pulse 2s infinite;
    pointer-events: none;
}

@keyframes shield-pulse {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(1); }
}

.powered {
    position: relative;
    overflow: hidden;
}

.powered::before {
    content: '⚡';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    animation: power-pulse 1s infinite;
}

@keyframes power-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.primo-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
}

.primo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    animation: primo-float 3s infinite alternate;
}

@keyframes primo-float {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-10px) rotate(2deg); }
}

/* Estilos mejorados para los botones del juego */
#action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
    font-family: 'Press Start 2P', cursive;
    padding: 12px 20px;
    margin: 10px;
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

#action-normal:hover, #action-fuerte:hover, #action-especial:hover, #back-to-menu-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

#action-normal:active, #action-fuerte:active, #action-especial:active, #back-to-menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

/* Colores para los textos flotantes */
.damage-normal {
    color: #5D9CEC; /* Azul */
    text-shadow: 2px 2px 0 #000;
}

.damage-strong {
    color: #FFCE54; /* Amarillo */
    text-shadow: 2px 2px 0 #000;
}

.damage-special {
    color: #AC92EC; /* Púrpura */
    text-shadow: 2px 2px 0 #000;
}

/* Mejora para el emoji del primo */
#boss {
    font-size: 5rem;
    filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.5));
    animation: boss-float 2s infinite alternate;
}

@keyframes boss-float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

/* Animación para el personaje */
.pixel-character {
    animation: character-float 3s infinite alternate;
}

@keyframes character-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* Mejora para el emoji del primo */
#boss {
    font-size: 5rem;
    filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.5));
    animation: boss-float 2s infinite alternate;
}

@keyframes boss-float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

/* Efectos de consumibles en los jugadores */
.player-container {
    border: 4px solid white;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.mcflurry-effect {
    border-color: #4CAF50 !important; /* Verde para McFlurry */
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.shield-effect {
    border-color: #5D9CEC !important; /* Azul para escudo */
    box-shadow: 0 0 15px rgba(93, 156, 236, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.power-effect {
    border-color: #FFCE54 !important; /* Amarillo para poder */
    box-shadow: 0 0 15px rgba(255, 206, 84, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.truth-effect {
    border-color: #ED5565 !important; /* Rojo para verdad */
    box-shadow: 0 0 15px rgba(237, 85, 101, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

@keyframes consumable-pulse {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.9); }
}

/* Animación para consumibles aplicados a los jugadores */
.consumable-effect {
    animation: consumable-applied 0.8s ease-out;
}

@keyframes consumable-applied {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.3); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* Efectos específicos para diferentes tipos de consumibles */
.heal-effect {
    animation: heal-applied 0.8s ease-out;
    filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.8));
}

@keyframes heal-applied {
    0% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.5)); }
    50% { transform: scale(1.3); filter: drop-shadow(0 0 15px rgba(76, 175, 80, 1)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.5)); }
}

.power-effect {
    animation: power-applied 0.8s ease-out;
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.8));
}

@keyframes power-applied {
    0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 5px rgba(255, 152, 0, 0.5)); }
    50% { transform: scale(1.3) rotate(5deg); filter: drop-shadow(0 0 15px rgba(255, 152, 0, 1)); }
    100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 5px rgba(255, 152, 0, 0.5)); }
}

.shield-effect {
    animation: shield-applied 0.8s ease-out;
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.8));
}

@keyframes shield-applied {
    0% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(33, 150, 243, 0.5)); }
    50% { transform: scale(1.3); filter: drop-shadow(0 0 15px rgba(33, 150, 243, 1)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(33, 150, 243, 0.5)); }
}

/* Efectos de consumibles en los jugadores */
.player-container {
    border: 4px solid white;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.mcflurry-effect {
    border-color: #4CAF50 !important; /* Verde para McFlurry */
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.shield-effect {
    border-color: #5D9CEC !important; /* Azul para escudo */
    box-shadow: 0 0 15px rgba(93, 156, 236, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.power-effect {
    border-color: #FFCE54 !important; /* Amarillo para poder */
    box-shadow: 0 0 15px rgba(255, 206, 84, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.truth-effect {
    border-color: #ED5565 !important; /* Rojo para verdad */
    box-shadow: 0 0 15px rgba(237, 85, 101, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

@keyframes consumable-pulse {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.9); }
}

/* Estilos para el minijuego de detector de mentiras */
.lie-detector-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    background-color: rgba(20, 20, 50, 0.95);
    border: 5px solid white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    animation: detector-appear 0.5s ease-out;
}

@keyframes detector-appear {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.lie-detector-title {
    color: #ED5565;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: 2px;
    animation: title-pulse 2s infinite;
}

@keyframes title-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.lie-detector-description {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.lie-detector-messages {
    background-color: rgba(0, 0, 0, 0.5);
    border: 3px solid white;
    border-radius: 10px;
    padding: 15px;
    width: 100%;
    min-height: 200px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lie-detector-messages.lie-revealed {
    background-color: rgba(237, 85, 101, 0.3);
    border-color: #ED5565;
}

.lie-detector-messages.truth-revealed {
    background-color: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

.primo-message {
    color: white;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.5;
    position: relative;
}

.message-lie {
    animation: text-shake 0.1s infinite;
}

@keyframes text-shake {
    0% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
    100% { transform: translateX(-1px); }
}

.message-truth {
    color: #FFCE54;
}

.detector-result {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 15px 0;
    text-align: center;
}

.correct-answer {
    color: #4CAF50;
    animation: correct-answer 0.5s;
}

@keyframes correct-answer {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.wrong-answer {
    color: #ED5565;
    animation: wrong-answer 0.5s;
}

@keyframes wrong-answer {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

.detector-explanation {
    color: #FFCE54;
    font-style: italic;
    margin-top: 10px;
    text-align: center;
}

.final-score {
    font-size: 2rem;
    color: white;
    margin: 20px 0;
    text-align: center;
}

.reward-message {
    font-size: 1.3rem;
    color: #FFCE54;
    margin: 15px 0;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.lie-detector-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.lie-detector-button {
    padding: 12px 25px;
    font-size: 1.2rem;
    border: 3px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 #000;
}

.lie-detector-button:hover {
    transform: translateY(-3px);
    box-shadow: 5px 5px 0 #000;
}

.lie-detector-button:active {
    transform: translateY(2px);
    box-shadow: 1px 1px 0 #000;
}

.truth-button {
    background-color: #4CAF50;
    color: white;
}

.lie-button {
    background-color: #ED5565;
    color: white;
}

.close-button {
    background-color: #5D9CEC;
    color: white;
    margin-top: 20px;
}

/* Estilo para el botón del detector de mentiras */
#lie-detector-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

#lie-detector-btn::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

#lie-detector-btn:hover::before {
    opacity: 1;
    animation: pulse-light 2s infinite;
}

@keyframes pulse-light {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Sonido visual */
.sound-wave {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: sound-wave 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes sound-wave {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* Animación de fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Efecto de resaltado para mensajes */
.message-highlight {
    background-color: rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Controles de música */
.music-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(138, 43, 226, 0.7);
    color: white;
    border: 2px solid white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.2s;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 4px 4px 0 #000;
}

.music-btn:active {
    transform: scale(0.95);
    box-shadow: 2px 2px 0 #000;
}

/* Mejoras para el contador de McFlurrys */
.mcflurry-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B6B;
    text-shadow: 2px 2px 0 #000;
}

.mcflurry-value {
    display: inline-block;
    transition: all 0.3s;
}

.mcflurry-icon {
    font-size: 1.2rem;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mcflurry-increment {
    animation: increment 1s;
}

@keyframes increment {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); color: #FF0000; }
    100% { transform: scale(1); }
}

/* Mejoras para los botones de acción */
#action-normal, #action-fuerte, #action-especial {
    position: relative;
    overflow: hidden;
}

#action-normal::after, #action-fuerte::after, #action-especial::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: all 0.3s;
    opacity: 0;
}

#action-normal:hover::after, #action-fuerte:hover::after, #action-especial:hover::after {
    opacity: 1;
}

/* Mejora para el mensaje */
#message {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    border: 2px solid #fff;
    box-shadow: 3px 3px 0 #000;
    max-width: 80%;
    margin: 20px auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

.primo-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
}

.primo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    animation: primo-float 3s infinite alternate;
}

@keyframes primo-float {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-10px) rotate(2deg); }
}

/* Estilos adicionales para los efectos:
/* Efectos de escudo y poder */
.shielded {
    position: relative;
    overflow: visible;
}

.shielded::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid rgba(93, 156, 236, 0.7);
    border-radius: 8px;
    animation: shield-pulse 2s infinite;
    pointer-events: none;
}

@keyframes shield-pulse {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(1); }
}

.powered {
    position: relative;
    overflow: hidden;
}

.powered::before {
    content: '⚡';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    animation: power-pulse 1s infinite;
}

@keyframes power-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.primo-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
}

.primo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    animation: primo-float 3s infinite alternate;
}

@keyframes primo-float {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-10px) rotate(2deg); }
}

/* Estilos mejorados para los botones del juego */
#action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
    font-family: 'Press Start 2P', cursive;
    padding: 12px 20px;
    margin: 10px;
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

#action-normal:hover, #action-fuerte:hover, #action-especial:hover, #back-to-menu-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

#action-normal:active, #action-fuerte:active, #action-especial:active, #back-to-menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

/* Colores para los textos flotantes */
.damage-normal {
    color: #5D9CEC; /* Azul */
    text-shadow: 2px 2px 0 #000;
}

.damage-strong {
    color: #FFCE54; /* Amarillo */
    text-shadow: 2px 2px 0 #000;
}

.damage-special {
    color: #AC92EC; /* Púrpura */
    text-shadow: 2px 2px 0 #000;
}

/* Mejora para el emoji del primo */
#boss {
    font-size: 5rem;
    filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.5));
    animation: boss-float 2s infinite alternate;
}

@keyframes boss-float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

/* Animación para el personaje */
.pixel-character {
    animation: character-float 3s infinite alternate;
}

@keyframes character-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* Mejora para el emoji del primo */
#boss {
    font-size: 5rem;
    filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.5));
    animation: boss-float 2s infinite alternate;
}

@keyframes boss-float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

/* Efectos de consumibles en los jugadores */
.player-container {
    border: 4px solid white;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.mcflurry-effect {
    border-color: #4CAF50 !important; /* Verde para McFlurry */
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.shield-effect {
    border-color: #5D9CEC !important; /* Azul para escudo */
    box-shadow: 0 0 15px rgba(93, 156, 236, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.power-effect {
    border-color: #FFCE54 !important; /* Amarillo para poder */
    box-shadow: 0 0 15px rgba(255, 206, 84, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

.truth-effect {
    border-color: #ED5565 !important; /* Rojo para verdad */
    box-shadow: 0 0 15px rgba(237, 85, 101, 0.8) !important;
    animation: consumable-pulse 1s infinite alternate;
}

@keyframes consumable-pulse {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.9); }
}

/* ===== RESPONSIVE DESIGN ===== */
/* Media queries para diferentes tamaños de pantalla */

/* Tablets y dispositivos medianos */
@media (max-width: 768px) {
    .menu-container, .credits-container, .container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .pixel-art-container {
        width: 150px;
        height: 150px;
    }
    
    .menu-btn {
        width: 180px;
        font-size: 0.8rem;
    }
    
    .players-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .player {
        width: 80%;
        max-width: 250px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button, #action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
        width: 90%;
        max-width: 300px;
        margin: 0.5rem auto;
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    #message {
        font-size: 0.8rem;
        max-width: 95%;
    }
    
    #boss {
        font-size: 4rem;
    }
    
    .consumable {
        font-size: 2.5rem;
    }
    
    .music-controls {
        top: 10px;
        left: 10px;
    }
    
    .music-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Dispositivos móviles */
@media (max-width: 480px) {
    .game-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .pixel-art-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .menu-btn {
        width: 90%;
        max-width: 250px;
        padding: 0.8rem;
        font-size: 0.7rem;
        margin: 0.5rem auto;
    }
    
    .player {
        width: 90%;
    }
    
    .player-avatar {
        font-size: 2.5rem;
    }
    
    .health-text, .stat {
        font-size: 0.6rem;
    }
    
    #boss {
        font-size: 3.5rem;
    }
    
    button, #action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
        padding: 0.8rem;
        font-size: 0.7rem;
    }
    
    .consumable {
        font-size: 2rem;
    }
    
    .consumable-tooltip {
        width: auto;
        max-width: 200px;
        white-space: normal;
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .floating-text {
        font-size: 1.2rem;
    }
}

/* Dispositivos muy pequeños */
@media (max-width: 320px) {
    .game-title {
        font-size: 1rem;
    }
    
    .pixel-art-container {
        width: 100px;
        height: 100px;
    }
    
    .player-avatar {
        font-size: 2rem;
    }
    
    #boss {
        font-size: 3rem;
    }
    
    button, #action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
        padding: 0.7rem;
        font-size: 0.6rem;
    }
}

/* Orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        min-height: 500px;
    }
    
    .container, .menu-container, .credits-container {
        padding: 1rem;
    }
    
    .game-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .players-container {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .player {
        width: 45%;
        max-width: 200px;
    }
    
    .controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    button, #action-normal, #action-fuerte, #action-especial, #back-to-menu-btn {
        width: auto;
        padding: 0.7rem 1rem;
        margin: 0.3rem;
    }
    
    #boss {
        font-size: 3.5rem;
    }
}

/* Optimizaciones táctiles para dispositivos móviles */
@media (hover: none) {
    button:hover, .menu-btn:hover, .consumable:hover {
        transform: none;
        box-shadow: 4px 4px 0 #000;
    }
    
    button:active, .menu-btn:active, .consumable:active {
        transform: scale(0.95);
        box-shadow: 2px 2px 0 #000;
    }
    
    .consumable:hover .consumable-tooltip {
        opacity: 0;
    }
    
    /* Mostrar tooltip al tocar */
    .consumable:active .consumable-tooltip {
        opacity: 1;
    }
    
    /* Aumentar áreas táctiles */
    button, .menu-btn, .consumable, .music-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevenir comportamientos no deseados en táctil */
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mejorar feedback táctil */
.touch-active {
    transform: scale(0.95) !important;
    opacity: 0.9;
}

/* Ajustes para viewport */
@media screen and (max-width: 100vw) {
    body {
        overflow-x: hidden;
    }
    
    .container, .menu-container, .credits-container {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Ajustes para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    * {
        image-rendering: auto;
    }
}