body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-container {
    text-align: center;
    margin-bottom: 30px;
}

.form-container input {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-transform: uppercase;
}

.form-container button {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.form-container button:hover {
    background-color: #45a049;
}

.error {
    color: #d32f2f;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

.info {
    text-align: center;
    margin: 20px 0;
    color: #666;
}

.tablero-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.tablero-wrapper {
    position: relative;
}

/* Números de filas (izquierda) */
.numeros-izq {
    position: absolute;
    left: -30px;
    top: 0;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.numero {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
}

/* Números de filas (derecha) */
.numeros-der {
    position: absolute;
    right: -30px;
    top: 0;
    height: 400px;
    display: flex;
    flex-direction: column;
}

/* Letras de columnas (arriba) */
.letras-arriba {
    position: absolute;
    top: -30px;
    left: 0;
    width: 400px;
    display: flex;
}

.letra {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
}

/* Letras de columnas (abajo) */
.letras-abajo {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 400px;
    display: flex;
}

.tablero {
    border-collapse: collapse;
    border: 3px solid #333;
}

.casilla {
    width: 50px;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    font-size: 24px;
    position: relative;
}

/* Colores alternados del tablero */
.casilla.blanca {
    background-color: #ffffff;
}

.casilla.negra {
    background-color: #000000;
}

/* Casilla donde está el alfil */
.casilla.alfil {
    background-color: #ff6b6b !important;
    color: white;
    font-weight: bold;
}

/* Casillas donde puede moverse el alfil */
.casilla.movimiento {
    background-color: #51cf66 !important;
    position: relative;
}

/* Punto en el centro de las casillas de movimiento */
.casilla.movimiento::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #2d8f3f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.leyenda {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-muestra {
    width: 20px;
    height: 20px;
    border: 1px solid #333;
}

.color-alfil {
    background-color: #ff6b6b;
}

.color-movimiento {
    background-color: #51cf66;
}

.color-normal-blanca {
    background-color: #ffffff;
}

.color-normal-negra {
    background-color: #000000;
}
