body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

.mapa-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #1a3a4a 0%, #0f2027 100%);
}

.mapa-fondo {
    /* position: absolute; */
    /* top: 0; */
    /* left: 0; */
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/fondo3.png');
    /* background-repeat: repeat; */
    /* background-size: auto; */
    opacity: 0.8;
    z-index: 1;
}

/* Estilos para las regiones */
.region1 {
    position: absolute;
    width: 200px;
    height: 200px;
    /* border: 3px solid rgba(255, 255, 255, 0.3); */
    /* border-radius: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    /* background: rgba(0, 0, 0, 0.3); */
    /* backdrop-filter: blur(5px); */
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); */
    background-image: url('/assets/images/region1.png');
    background-position: center;
    background-size: cover;
}

.region2 {
    position: absolute;
    width: 200px;
    height: 200px;
    /* border: 3px solid rgba(255, 255, 255, 0.3); */
    /* border-radius: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    /* background: rgba(0, 0, 0, 0.3); */
    /* backdrop-filter: blur(5px); */
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); */
    background-image: url('/assets/images/region2.png');
    background-position: center;
    background-size: cover;
}

.region3 {
    position: absolute;
    width: 200px;
    height: 200px;
    /* border: 3px solid rgba(255, 255, 255, 0.3); */
    /* border-radius: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    /* background: rgba(0, 0, 0, 0.3); */
    /* backdrop-filter: blur(5px); */
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); */
    background-image: url('/assets/images/region3.png');
    background-position: center;
    background-size: cover;
}


.region:hover {
    transform: scale(1.05);
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.region-nombre {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-size: 1.2em;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

/* Posicionamiento de las regiones */
#region-1 { top: 15%; left: 15%; }
#region-2 { top: 15%; right: 15%; }
#region-3 { bottom: 15%; left: 15%; }
#region-4 { bottom: 15%; right: 15%; }

/* Estilo de la torre central */
.torre {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 400px;
    background-image: url('/assets/images/torre.png');
    /* border: 5px solid #5D4037; */
    /* border-radius: 20px; */
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    /* box-shadow: 0 0 50px rgba(0, 0, 0, 0.8); */
    background-position: center;
    background-size: cover;
}

.torre-nombre {
    color: white;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Estilo de los jugadores */
#jugadores-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.player {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border: 3px solid #2E7D32;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 0.5s ease;
    z-index: 6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.player::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(5px);
    z-index: -1;
}

.player.answered {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
    border-color: #1565C0;
    transform: scale(1.1);
}

.player.eliminated {
    animation: explosion 0.5s forwards;
    background: linear-gradient(135deg, #F44336, #E91E63);
}

@keyframes explosion {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Efectos visuales */
#efectos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

/* Barra de tiempo */
.timer-container {
    width: 100%;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #F44336);
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Estilos para el mensaje de error */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.error-message.show {
    opacity: 1;
}

.error-content {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: bold;
    transform: scale(0.5);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.error-message.show .error-content {
    transform: scale(1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Estilos para el mensaje de espera */
.waiting-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.waiting-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.waiting-content {
    background-color: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.waiting-content .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.15em;
}

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

.waiting-content {
    animation: pulse 2s infinite;
}

/* Estilos para el ranking y controles */
#ranking {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
}

/* Barra de desplazamiento personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
