387 lines
7.8 KiB
CSS
Executable File
387 lines
7.8 KiB
CSS
Executable File
/* Fuentes */
|
|
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&family=Orbitron:wght@400;600&family=VT323&display=swap');
|
|
|
|
/* Variables base */
|
|
:root {
|
|
--fuente-base: 'Nunito', sans-serif;
|
|
--fuente-titulos: 'Orbitron', sans-serif;
|
|
--fuente-retro: 'VT323', monospace;
|
|
|
|
--color-primario: #2F3A56;
|
|
--color-primario-oscuro: #24314A;
|
|
--color-secundario: #EAF2FA;
|
|
--color-acento: #E8A23A;
|
|
--color-fondo: #FAF7F2;
|
|
--color-texto: #2b2b2b;
|
|
--sombra: rgba(47, 58, 86, 0.15);
|
|
|
|
--borde: 2px solid var(--color-primario);
|
|
--transicion: 0.25s ease;
|
|
}
|
|
|
|
/* Modo oscuro */
|
|
body.dark {
|
|
--color-primario: #0d1117;
|
|
--color-primario-oscuro: #161b22;
|
|
--color-secundario: #c9d1d9;
|
|
--color-fondo: #0d1117;
|
|
--color-texto: #e6edf3;
|
|
--color-acento: #f0c674;
|
|
}
|
|
|
|
/* Reset */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
background: var(--color-fondo);
|
|
font-family: var(--fuente-base);
|
|
color: var(--color-texto);
|
|
padding-bottom: 2rem;
|
|
transition: background-color 0.4s ease, color 0.4s ease;
|
|
}
|
|
|
|
/* Cabecera */
|
|
.cabecera {
|
|
text-align: center;
|
|
padding: 1.5rem;
|
|
color: white;
|
|
background: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
|
|
border-radius: 10px;
|
|
box-shadow: 0 4px 10px var(--sombra);
|
|
transition: background-color 0.4s ease;
|
|
}
|
|
|
|
.cabecera h1 {
|
|
font-family: var(--fuente-titulos);
|
|
font-size: 1.8rem;
|
|
letter-spacing: 6px;
|
|
text-transform: uppercase;
|
|
text-shadow: 2px 2px 4px rgba(255,255,255,0.4);
|
|
}
|
|
|
|
/* Botón de tema */
|
|
#toggle-tema {
|
|
position: absolute;
|
|
top: 1rem;
|
|
left: 1rem;
|
|
background-color: var(--color-primario);
|
|
color: var(--color-secundario);
|
|
border: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-family: var(--fuente-retro);
|
|
transition: background-color var(--transicion);
|
|
}
|
|
|
|
#toggle-tema:hover {
|
|
background-color: var(--color-primario-oscuro);
|
|
}
|
|
|
|
/* Formulario nombre */
|
|
.nombre {
|
|
padding: 1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.campo {
|
|
padding: 0.7rem;
|
|
margin: 0.5rem;
|
|
border-radius: 10px;
|
|
border: var(--borde);
|
|
width: 200px;
|
|
}
|
|
|
|
.boton {
|
|
background-color: var(--color-primario);
|
|
color: var(--color-secundario);
|
|
padding: 0.7rem 1.2rem;
|
|
border: none;
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: background-color var(--transicion);
|
|
}
|
|
|
|
.boton:hover {
|
|
background-color: var(--color-primario-oscuro);
|
|
}
|
|
|
|
/* Contenedor principal */
|
|
.cuerpo {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
/*background: var(--color-secundario);*/
|
|
border: 5px solid var(--color-primario);
|
|
margin: 1rem;
|
|
padding: 1rem;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 20px var(--sombra);
|
|
transition: background-color 0.4s ease;
|
|
}
|
|
|
|
/* Columnas */
|
|
.columna {
|
|
flex: 1 1 300px;
|
|
max-width: 400px;
|
|
text-align: center;
|
|
padding: 1rem;
|
|
transition: background-color 0.4s ease;
|
|
}
|
|
|
|
/* Cabecera jugador */
|
|
.cabecera-jugador {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.game-btn {
|
|
font-size: 2.5rem;
|
|
padding: 10px;
|
|
border: var(--borde); /* Usamos tu variable de borde */
|
|
border-radius: 50%;
|
|
background: var(--color-secundario);
|
|
color: var(--color-texto);
|
|
cursor: pointer;
|
|
transition: transform var(--transicion), background var(--transicion), box-shadow var(--transicion);
|
|
width: 80px;
|
|
height: 80px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0.3rem;
|
|
}
|
|
|
|
.game-btn:hover {
|
|
transform: scale(1.15);
|
|
box-shadow: 0 0 10px var(--color-acento);
|
|
background: var(--color-fondo);
|
|
}
|
|
|
|
/* Clase que añade el JS al hacer click */
|
|
.game-btn.seleccionada {
|
|
box-shadow: 0 0 20px var(--color-acento);
|
|
transform: scale(1.2);
|
|
border-color: var(--color-acento);
|
|
}
|
|
|
|
.game-btn-pc {
|
|
font-size: 2.5rem;
|
|
opacity: 0.3;
|
|
width: 80px;
|
|
height: 80px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
}
|
|
|
|
/* Clase para resaltar la elección del PC */
|
|
.pc-elegido {
|
|
opacity: 1;
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
/* Imágenes */
|
|
.btn-img {
|
|
width: 70px;
|
|
height: 70px;
|
|
border-radius: 50%;
|
|
border: var(--borde);
|
|
padding: 5px;
|
|
margin: 0.3rem;
|
|
cursor: pointer;
|
|
transition: transform var(--transicion), box-shadow var(--transicion);
|
|
}
|
|
|
|
.btn-img:hover {
|
|
transform: scale(1.15);
|
|
box-shadow: 0 0 10px var(--color-acento);
|
|
}
|
|
|
|
.btn-img.seleccionada {
|
|
box-shadow: 0 0 20px var(--color-acento);
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
.btn-img:focus {
|
|
outline: 3px solid var(--color-acento);
|
|
outline-offset: 4px;
|
|
}
|
|
|
|
.central-img {
|
|
width: 80%;
|
|
max-width: 250px;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
/* ── Mapa SVG interactivo ─────────────────────────────────── */
|
|
.mapa-svg {
|
|
width: 90%;
|
|
max-width: 320px;
|
|
margin-top: 1rem;
|
|
overflow: visible;
|
|
}
|
|
|
|
/* Líneas de conexión */
|
|
.conexion {
|
|
stroke: var(--color-primario);
|
|
stroke-width: 1.5;
|
|
opacity: 0.3;
|
|
transition: stroke 0.25s, stroke-width 0.25s, opacity 0.25s;
|
|
}
|
|
|
|
/* Nodos: círculo base */
|
|
.nodo circle {
|
|
fill: var(--color-secundario);
|
|
stroke: var(--color-primario);
|
|
stroke-width: 2;
|
|
transition: fill 0.25s, stroke 0.25s, filter 0.25s, opacity 0.25s;
|
|
}
|
|
|
|
.nodo-emoji {
|
|
font-size: 20px;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.nodo-label {
|
|
font-size: 10px;
|
|
fill: var(--color-texto);
|
|
font-family: var(--fuente-base);
|
|
pointer-events: none;
|
|
transition: opacity 0.25s, fill 0.25s;
|
|
}
|
|
|
|
/* ── Estados al pasar el ratón sobre un botón ─────────────── */
|
|
|
|
/* Atenúa todas las conexiones cuando el mapa está activo */
|
|
.mapa-activo .conexion {
|
|
opacity: 0.1;
|
|
}
|
|
|
|
/* Resalta las conexiones activas (las del botón en hover) */
|
|
.mapa-activo .conexion.conexion-activa {
|
|
stroke: var(--color-acento);
|
|
stroke-width: 2.5;
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Nodo origen (la opción sobre la que se hace hover) */
|
|
.nodo.nodo-origen circle {
|
|
stroke: var(--color-acento);
|
|
stroke-width: 3;
|
|
}
|
|
|
|
/* Nodos vencidos: se iluminan en dorado */
|
|
.nodo.nodo-vencido circle {
|
|
fill: var(--color-acento);
|
|
stroke: var(--color-acento);
|
|
filter: drop-shadow(0 0 7px var(--color-acento));
|
|
}
|
|
|
|
.nodo.nodo-vencido .nodo-label {
|
|
fill: var(--color-acento);
|
|
font-weight: 700;
|
|
opacity: 1;
|
|
}
|
|
|
|
/* El resto de nodos se atenúa */
|
|
.mapa-activo .nodo:not(.nodo-vencido):not(.nodo-origen) circle {
|
|
opacity: 0.35;
|
|
}
|
|
.mapa-activo .nodo:not(.nodo-vencido):not(.nodo-origen) .nodo-label {
|
|
opacity: 0.35;
|
|
}
|
|
|
|
/* Texto de pista debajo del mapa */
|
|
.mapa-hint-texto {
|
|
font-size: 0.8rem;
|
|
color: var(--color-acento);
|
|
font-weight: 600;
|
|
min-height: 1.2rem;
|
|
margin-top: 0.4rem;
|
|
transition: opacity 0.25s;
|
|
}
|
|
|
|
/* Texto */
|
|
.grande {
|
|
font-size: 1.2rem;
|
|
font-weight: bold;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.error {
|
|
color: var(--color-acento);
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Animaciones */
|
|
.victoria {
|
|
animation: winGlow 0.8s ease-out;
|
|
}
|
|
|
|
@keyframes winGlow {
|
|
0% { box-shadow: 0 0 0px var(--color-acento); }
|
|
50% { box-shadow: 0 0 30px var(--color-acento); transform: scale(1.12); }
|
|
100% { box-shadow: 0 0 0px var(--color-acento); transform: scale(1); }
|
|
}
|
|
|
|
.derrota {
|
|
animation: loseShake 0.4s ease-in-out;
|
|
}
|
|
|
|
@keyframes loseShake {
|
|
0% { transform: translateX(0); }
|
|
25% { transform: translateX(-5px); }
|
|
50% { transform: translateX(5px); }
|
|
75% { transform: translateX(-5px); }
|
|
100% { transform: translateX(0); }
|
|
}
|
|
|
|
.empate {
|
|
animation: tiePulse 0.6s ease-in-out;
|
|
}
|
|
|
|
@keyframes tiePulse {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.08); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 600px) {
|
|
body {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.cabecera h1 {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.btn-img {
|
|
width: 55px;
|
|
height: 55px;
|
|
}
|
|
|
|
.columna {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.central-img {
|
|
width: 90%;
|
|
}
|
|
|
|
.campo {
|
|
width: 100%;
|
|
max-width: 250px;
|
|
}
|
|
}
|