@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Estilo general de fondo y fuente principal */
body {
    font-family: 'Poppins', Arial, sans-serif; /* Uso Poppins como fuente principal */
    background: radial-gradient(ellipse at 50% 20%, #4a441e 0, #19181a 100%);
    min-height: 100vh;
    min-width: 100vw;
    color: #fffbe7;
    box-sizing: border-box;
}

/*  Centra el contenedor del juego */
.center-viewport {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Caja principal donde se arma todo el juego (formulario o tablero) */
.game-container {
    background: #232328;
    border-radius: 32px;
    padding: 40px 35px 32px 35px;
    min-width: 300px;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    /* Glow amarillo de fondo para dar estilo */
    box-shadow: 0 4px 44px 0 #FFD93033, 0 8px 60px 0 #ffd93010, 0 2px 8px #0007;
}

.game-container-juego {
    min-width: 350px;
    max-width: 540px;
    width: 98vw;
    padding: 42px 33px 36px 33px;
}

/* Título */
.game-title {
    font-weight: 700;
    font-size: 2.2em;
    color: #ffffff;
    margin-bottom: 13px;
    text-shadow: 0 2px 16px #ffffff, 0 2px 14px #000000;
    letter-spacing: 0.3px;
    display: flex;
    gap: 11px;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.big-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 14px;
}
.jugador1-nombre, .jugador2-nombre {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    gap: 7px;
    font-weight: 700;
}
.jugador2-nombre i.fa-robot { font-size: 1.17em; }
.jugador1-nombre i.fa-user-astronaut { font-size: 1.1em; }
.vs {
    color: #fffbe7;
    font-size: 0.9em;
    font-weight: 600;
    opacity: 0.66;
    letter-spacing: 1.5px;
    margin: 0 11px;
}

/* Scoreboard de puntajes, organizado en horizontal*/
.scoreboard {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 1em;
    gap: 9px;
    margin-bottom: 4px;
    margin-top: 2px;
    color: #FFD930;
    font-weight: 500;
}
.scoreboard-big {
    font-size: 1.12em;
    gap: 16px;
}
.scoreboard > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 95px;
}
.scoreboard > div > span {
    font-size: 0.99em;
    font-weight: 500;
    color: #FFD930;
    margin-top: 1px;
}
.score-num {
    font-size: 1.35em;
    font-weight: 800;
    color: #fffbe7;
    margin-top: 2px;
}

/* Línea divisoria para separar marcadores y tablero  */
.divider {
    width: 100%;
    height: 1.5px;
    background: linear-gradient(90deg, #FFD93055);
    margin: 13px 0 17px 0;
    border-radius: 2px;
}

/*  El tablero en formato grid 3x3 */
.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(68px, 1fr)); 
    grid-gap: 13px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 24px auto;
    min-width: 210px;
}

/* Cada celda del tablero  */
.cell {
    background: #19181a;
    border: 2.8px solid #FFD93088;
    border-radius: 14px;
    box-shadow: 0 2px 12px #FFD93022;
    font-size: 2.9rem;
    aspect-ratio: 1 / 1;
    min-width: 67px;
    min-height: 67px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    color: #FFD930;
    transition: background .17s, border .15s, color .13s, box-shadow .13s;
}
.cell:hover {
    background: #232328;
    border-color: #FFD930cc;
    color: #fffbe7;
    box-shadow: 0 2px 19px #FFD93044;
}

/* Botones debajo del tablero  */
.botones {
    margin: 18px 0 13px 0;
    display: flex;
    justify-content: center;
    gap: 22px;
}
/* Botones: reiniciar, finalizar y jugar  */
.reset-btn, .finalizar-btn, .start-btn {
    background: linear-gradient(93deg, #ffe26b 90%, #fff6c4 100%);
    color: #232328;
    border: none;
    border-radius: 13px;
    padding: 10px 22px;
    font-size: 1.08rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, color .17s, box-shadow .17s;
    box-shadow: 0 2px 16px #ffe26b33;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Botón finalizar: rojo  */
.finalizar-btn {
    background: linear-gradient(93deg, #ff4646 80%, #ffd0d0 100%);
    color: #fff;
}
/* Hover para todos los botones */
.reset-btn:hover, .finalizar-btn:hover, .start-btn:hover {
    filter: brightness(1.11);
    box-shadow: 0 2px 17px #ffe26b90;
    transform: translateY(-1px) scale(1.04);
}
.center-btn {
    display: flex;
    justify-content: center;
    width: 100%;
}
/*  Botón de jugar en el formulario */
.start-btn {
    font-size: 1.08em;
    min-width: 130px;
    margin-top: 5px;
    padding: 9px 0;
    justify-content: center;
}

/* Formulario de jugadores  */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 7px;
}
.login-form label {
    text-align: left;
    color: #FFD930;
    font-weight: 600;
    font-size: 1.09em;
    margin-bottom: 2px;
}
.login-form input[type="text"] {
    padding: 9px 13px;
    border-radius: 9px;
    border: 2px solid #FFD93088;
    font-size: 1em;
    background: #19181a;
    color: #FFD930;
    transition: border .15s, box-shadow .12s;
    font-family: inherit;
}
.login-form input[type="text"]:focus {
    border-color: #ffe26b;
    box-shadow: 0 2px 14px #FFD93088;
    background: #232328;
    color: #fffbe7;
}
.hint {
    color: #cfc789;
    font-size: 0.95em;
}

/* Mensajes de turno: victoria, empate */
.message {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #FFD930;
    text-align: center;
}
/* Alerta emergente (gana/empate) */
.alerta, .alerta-oculta {
    margin-top: 19px;
    padding: 13px 0;
    border-radius: 11px;
    font-weight: 600;
    background: #ffe26b;
    color: #18181a;
    box-shadow: 0 2px 8px #ffe26b18;
    opacity: 1;
    transition: opacity 0.4s;
    font-size: 1.12em;
    letter-spacing: .2px;
}
.alerta-oculta {
    opacity: 0;
    pointer-events: none;
}

.msg-ok {
    background: #ffe26b;
    color: #18181a;
    border-radius: 14px;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 19px;
    font-weight: 700;
    box-shadow: 0 0 14px #ffe26b45;
    font-size: 1.12em;
}

/* Responsive: flexible en móviles/tablets  */
@media (max-width: 700px) {
    .game-container,
    .game-container-juego {
        min-width: 96vw;
        max-width: 99vw;
        padding: 5vw 1.5vw;
    }
    .big-title {
        font-size: 1.3em;
        gap: 7px;
    }
    .board {
        max-width: 99vw;
        min-width: 0;
        grid-template-columns: repeat(3, minmax(17vw, 1fr));
        grid-gap: 2vw;
    }
    .cell {
        font-size: 2em;
        min-width: 15vw;
        min-height: 15vw;
        height: 15vw;
        width: 15vw;
    }
    .scoreboard-big > div { min-width: 61px; }
}
@media (max-width: 470px) {
    .game-title, .big-title {
        font-size: 1em;
    }
    .board {
        grid-template-columns: repeat(3, minmax(12vw, 1fr));
        grid-gap: 1vw;
    }
    .cell {
        font-size: 1.3em;
        min-width: 9vw;
        min-height: 9vw;
        height: 9vw;
        width: 9vw;
    }
    .scoreboard-big > div { min-width: 31px; }
}

/* Variables y estilos del footer  */
:root {
  --yellow: #FFD930;
  --footer-bg: #18181a;  
  --footer-text: #dedede;
}
.site-footer {
  width: 100vw;
  padding: 18px 0 14px 0;
  background: var(--footer-bg) !important;
  color: var(--footer-text);
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.01em;
  font-weight: 500;
  box-shadow: none;
  opacity: 0.97;
  z-index: 100;
  flex-shrink: 0;
  margin: 0 auto;
  position: relative;
  font-family: 'Poppins', Arial, sans-serif;
  border: none;
}
.site-footer b {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: inherit;
}
@media (max-width: 600px) {
  .site-footer {
    font-size: 1em;
    padding: 14px 3vw 11px 3vw;
  }
}
