/* Variables de tema */
@import url('variables.css');

/* Estilos generales */
body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.2;
    margin: 0;
    padding: 5px;
    font-size: 1rem;
}

/* Clases para títulos */
.title-primary {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: var(--accent-color);
}

.title-secondary {
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}
.title-tertiary {
    font-size: 0.7rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    color: var(--secondary-color);
}
.text-primary {
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}
.text-secondary {
    font-size: 0.7rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    color: var(--secondary-color);
}

/* Contenedor principal */
.container {
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
}

/* Contenedor del encabezado */
.header-container {
    width: 5%;
    display: flex
;
}

/* Contenedor principal del contenido */
.main-content {
    display: flex;
    flex-direction: row;
    gap: 8px;
    height: calc(100vh - 70px); /* Ajustar según la altura del header */
    overflow: hidden;
}

/* Contenedor de las tarjetas principales */
.col_recursos {
    width: 31%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

/* Contenedor de la tarjeta de acciones */
.col_usuario {
    width: 31%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

/* Contenedor de la tarjeta de acciones */
.col_ciudad {
    width: 31%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

/* Estilos para el módulo de Próximo Edificio */
.edificio-container {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.edificio-titulo {
    text-align: center;
    margin-bottom: 8px;
}

.edificio-detalle {
    display: flex;
    align-items: flex-start;
}

.edificio-columna {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.edificio-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.edificio-nombre {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 5px;
}

.edificio-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 4px;
    background-color: var(--card-bg-color);
}

.recursos-requeridos {
    text-align: left;
    background-color: var(--card-bg-color);
    border-radius: 8px;
}

.recursos-requeridos h4 {
    font-size: 0.8rem;
    color: var(--text-color);
    text-align: center;
}

.recursos-lista {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.recursos-lista .recurso-item {
    display: flex;
    align-items: center;
    font-size: 0.6rem;
    background-color: var(--bg-color);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.recursos-lista .recurso-item img {
    width: 12px;
    height: 12px;
}

.recursos-lista .cantidad {
    font-weight: bold;
    color: var(--accent-color);
}

.recursos-lista .recurso-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.recursos-lista .cantidad {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Estilos para los iconos de acciones */
.acciones-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 8px;
}

.accion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 1px;
}

.accion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.accion-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 4px;
}
.accion-icon.no-fabricable {
    filter: contrast(100%) grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

.accion-nombre {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
}
.container_logo {
    text-align: center;
    align-items: center;   
}

/* Encabezado */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 1px 1px var(--shadow-color);
    text-align: center;
    align-items: center;   
}


.logo-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.logo {
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Tarjetas */
.card {
    background-color: var(--card-background);
    border-radius: 4px;
    padding: 4px;
    margin-bottom: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 1px var(--shadow-color);
    transition: box-shadow var(--animation-duration) ease;
    max-width: 40vw;
}

.card:hover {
    box-shadow: 0 2px 2px var(--shadow-color);
}

/* Botones de navegación */
nav {
    margin-top: 0.3rem;
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

nav button {
    padding: 0.2rem 0.4rem;
    background-color: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.7rem;
}

nav button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

/* Grid del mapa */
#grid-container {
    width: 100%;
    height: 70vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
}

#grid {
    display: grid;
    background-color: var(--background-color);
}

.casilla {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.15s;
    position: relative;
}

.casilla:hover {
    transform: scale(1.05);
}

/* Tooltip */
.casilla .tooltip {
    visibility: hidden;
    width: 80px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 3px;
    border-radius: 3px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -40px;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 0.7rem;
}

.casilla:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.3rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
}

/* Recursos y productos */
.recursos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    margin-top: 4px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.productos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    margin-top: 4px;
}

.productos.sin-productos {
    grid-template-columns: 1fr;
}
recurso-item{
    display: flex;
}

.recurso-item, .producto-item {
    align-items: center;
    gap: 4px;
    padding: 4px;
    background-color: var(--card-background);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: background-color var(--animation-duration) ease;
    box-sizing: border-box;
    font-size: 0.7rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.producto-item{
    text-align: center; 
}
    
.recurso-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Estilos generales para cantidades */
.cantidad {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9em;
}

/* Cantidad insuficiente en rojo */
.cantidad.insuficiente {
    color: #ff4d4d; /* Rojo para cantidades insuficientes */
    font-weight: bold;
}

/* Estilos específicos para cantidades en el módulo de edificio */
.edificio-container .recurso-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 1px 0;
}

.edificio-container .cantidad {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    margin: 0 3px;
}

/* Estilos para el botón de donar */
.btn-donar {
    background-color: #4CAF50; /* Verde */
    color: white;
    border: none;
    border-radius: 3px;
    width: 12px;
    height: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

.btn-donar:hover {
    background-color: #45a049; /* Verde más oscuro al pasar el ratón */
}

.btn-donar:active {
    transform: scale(0.95);
}

/* Estilos para el botón de donación deshabilitado */
.btn-donar:disabled,
.btn-donar.deshabilitado,
.btn-donar[disabled] {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Efecto hover solo para botones habilitados */
.btn-donar:not(:disabled):not(.deshabilitado):hover {
    background-color: #45a049;
}

/* Estilo para la relación disponible/necesario en edificios */
/* La flecha se ha eliminado según solicitud del usuario */

/* Estilo para el contenedor del ícono de martillo */
.icono-martillo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 2px;
}

/* Asegurar que el ícono de martillo herede el mismo tamaño que los demás iconos */
.icono-martillo .recurso-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
    cursor:pointer;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Estilo para el ícono de martillo cuando el producto no es fabricable */
.icono-martillo .recurso-icon.no-fabricable {
    filter: contrast(100%) grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Niveles en fila - Estilo obsoleto, usar .niveles */

.nivel-item {
    flex-direction: column;
    align-items: center;
    padding: 2px 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
}

.nivel-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profesion-icon {
    font-size: 1rem;
    margin-bottom: 2px;
    color: var(--accent-color);
}

.nivel-numero {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-color);
}

.profesion-icon i {
    font-size: 8px;
    vertical-align: middle;
}

.nivel-bar {
    flex: 1;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin: 0 8px;
}

.nivel-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.15s ease;
}

/* Herramientas */
.tools {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.tool {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: all 0.15s;
}

.tool:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Mercado (mismo tamaño que herramientas) */
.mercancias {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.mercancia-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: left;
}

/* Contenedor de imagen + precio en columna */
.mercancia-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.mercancia-icon {
    width: 50px; /* igual que .tool */
    height: 50px; /* igual que .tool */
    object-fit: contain;
    transition: all 0.15s;
}

.mercancia-icon.habilitada:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
    cursor: pointer;
}

.mercancia-icon.deshabilitada {
    filter: grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

.mercancia-precio {
    font-size: 0.65rem;
    margin-left: 4px;
    color: var(--text-color);
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Íconos de precio y compra en Mercado */
.moneda-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 2px;
}

.comprar-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.15s;
    margin-top: 2px;
}

/* Empujar el botón/imagen de compra a la derecha dentro de la fila */
.mercancia-item form {
    margin-left: auto;
}

.mercancia-item > img.comprar-icon {
    margin-left: auto;
}

.comprar-icon.habilitada:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    cursor: pointer;
}

.moneda-icon.deshabilitada,
.comprar-icon.deshabilitada {
    filter: grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Formularios */
form {
    display: inline;
}

form button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

form button img {
    width: 20px;
    height: 20px;
    transition: all 0.15s;
}

form button:hover img {
    filter: brightness(1.2);
}

/* Animaciones */
.fade-in {
    animation: fadeIn var(--animation-duration) ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Listas */
.info-usuario {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0;
    table-layout: fixed;
}

.info-usuario td {
    padding: 4px;
    border-right: 1px solid var(--border-color);
    font-size: 0.7rem;
    width: 25%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.info-usuario td:last-child {
    border-right: none;
}

.info-usuario .info-cell {
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
}

.info-usuario img {
    width: 24px;
    height: 24px;
    margin-right: 4px;
    flex-shrink: 0;
    margin: 0 auto;
}

.info-usuario span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.info-table .title-secondary {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
}

/* Scrollbar personalizado para el perfil */
.card::-webkit-scrollbar {
    width: 6px;
}

.card::-webkit-scrollbar-track {
    background: var(--background-color);
}

.card::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.card::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Herramientas */
.tools {
    display: flex;
    justify-content: center;
}

/* Estilos para la sección de niveles */
.niveles {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.nivel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 2px;
    transition: all 0.2s ease;
    cursor: help;
    position: relative;
    aspect-ratio: 1/1;
    box-sizing: border-box;
    overflow: hidden;
}

.nivel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.habilidad-imagen {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 4px;
}

.nivel-valor {
    font-size: 0.65rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 2px;
    right: 2px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .niveles {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 6px;
    }
    
    .habilidad-imagen {
        width: 20px;
        height: 20px;
    }
    
    .nivel-valor {
        font-size: 0.6rem;
        width: 16px;
        height: 16px;
    }
}

.tools img {
    object-fit: contain;
    filter: brightness(0) saturate(100%);
    transition: filter 0.3s ease;
}

.tools img.color {
    filter: brightness(100%) saturate(100%);
}

.mejorar-icon {
    width: 40px;
    height: 40px;
    filter: brightness(0) saturate(100%);
    transition: filter 0.3s ease;
}

.mejorar-icon.color {
    filter: brightness(100%) saturate(100%);
}

.mejorar-icon:not(.color):hover {
    filter: brightness(0) saturate(100%);
    cursor: not-allowed;
}

        /* Estilos para el bloque de Última Acción */
        .ultima-accion {
            padding-left: 10px;
            border-radius: 2px;
            padding: 10px;
            background-color: var(--border-color);
            margin: 5px 0;
            animation: fadeIn 0.3s ease-in;
            text-align: center;
        }
                
        .accion-fecha {
            color: #666;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .accion-mensaje {
            background-color: #f5f5f5;
            padding: 8px 10px;
            border-radius: 4px;
            border-right: 3px solid #4CAF50;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .sin-accion {
            grid-template-columns: 1fr;
            padding-left: 10px;
            border-radius: 2px;
            background-color: var(--border-color);
            animation: fadeIn 0.3s ease-in;
            padding: 10px;  
            text-align: center;
        }

        /* Estilos para los mensajes de acción */
        .cargando {
            color: #2196F3; /* Azul */
            text-align: center;
            padding: 10px;
        }
        
        .accion-exitosa {
            color: #4CAF50; /* Verde */
            padding: 10px;
            border-radius: 2px;
            background-color: #e8f5e9; /* Verde claro de fondo */
           
            animation: fadeIn 0.3s ease-in;
        }
        
        .accion-error {
            color: #f44336; /* Rojo */
            padding: 10px;
            border-radius: 2px;
            background-color: #ffebee; /* Rojo claro de fondo */
            margin: 5px 0;
            animation: shake 0.5s ease-in-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-5px); }
            40%, 80% { transform: translateX(5px); }
        }
        
        .ultima-accion i {
            color: #4CAF50;
            width: 16px;
            text-align: center;
        }

/* Estilos para mensajes flash */
.alert {
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}
   /* Estilos para el modal de donación */
   .modal-donacion {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-contenido {
    background-color: var(--background-color);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 80%;
    max-width: 400px;
    color: var(--text-color);
    text-align: center;
}

.cerrar {
    color: var(--card-background);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.cerrar:hover {
    color: #000000;
}

.barra-donacion { 
    width: 100%;
    height: 20px;
    background-color: var(--card-background);
    margin: 0 10px 0 10px;
    border-radius: 10px;
    overflow: hidden;
}

.progreso-donacion {
    height: 100%;
    background-color: #27ae60;
    width: 0%;
    transition: width 0.3s;
}

.boton-donar {
    background-color:var(--card-background);
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.boton-donar:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

.controles-donacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.controles-donacion button {
    background: var(--card-background);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.controles-donacion button:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}

.cantidad-donacion {
    font-size: 18px;
    font-weight: bold;
}

/* Estilos para la página de login */
.login-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}
.login-card {
    background-color: var(--card-background);
    border-radius: 4px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 1px var(--shadow-color);
    text-align: center;
}
.login-logo {
    margin-bottom: 20px;
}
.login-logo img {
    max-width: 150px;
    height: auto;
}
.login-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 15px;
}
.login-description {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.4;
}
.login-twitch-btn {
    background: #9146ff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 20px;
}
.login-twitch-btn:hover {
    background: #772ce8;
    transform: translateY(-1px);
}
.login-twitch-btn i {
    margin-right: 8px;
}
.login-features {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.login-feature-item {
    background-color: var(--bg-color);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--secondary-color);
}

/* Estilos específicos para la página de login */
.login-page body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details i.fab.fa-twitch {
    color: #9146ff;
    font-size: 24px;
}

.username {
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.user-status.online {
    color: #4CAF50;
    font-size: 12px;
    font-weight: 500;
}

.guest-status {
    color: #888;
    font-style: italic;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login {
    background: #9146ff;
    color: white;
    border: 2px solid #9146ff;
}

.btn-login:hover {
    background: #772ce8;
    border-color: #772ce8;
    transform: translateY(-2px);
}

.btn-logout {
    font-size: 0.7rem;
    background: transparent;
    color: var(--accent-color);
}

.btn-logout:hover {
    color: white;
    transform: translateY(-2px);
}

.btn-login i, .btn-logout i {
    font-size: 14px;
}

/* Media queries for larger screens */
@media (min-width: 768px) {
    body {
        font-size: 1.1rem;
    }

    .title-primary {
        font-size: 1.1rem;
    }

    .title-secondary {
        font-size: 0.9rem;
    }

    .text-primary {
        font-size: 0.9rem;
    }

    .text-secondary {
        font-size: 0.8rem;
    }

    .login-container {
        max-width: 600px;
    }

    .login-title {
        font-size: 1.4rem;
    }

    .login-description {
        font-size: 0.9rem;
    }

    .login-twitch-btn {
        font-size: 1rem;
        padding: 14px 35px;
    }

    .main-content {
        height: calc(100vh - 80px);
    }

    .col_recursos, .col_usuario, .col_ciudad {
        width: 32%;
    }

    /* Increase modal sizes */
    .modal-mapa .modal-contenido {
        width: 90vw;
        height: 80vh;
        max-width: 1200px;
        max-height: 800px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .user-actions {
        justify-content: center;
    }

    .username {
        font-size: 16px;
    }
}

/* Estilos para la página del mapa */
.mapa-body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

.mapa-header {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.mapa-header h1 {
    margin: 0;
    font-size: 40px;
}


.mapa-nav button {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.mapa-nav button:hover {
    background-color: #e0e0e0;
}

#mapa-grid-container {
    width: 100%;
    height: 80vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mapa-grid {
    display: grid;
    background-color: #ccc;
}

.mapa-casilla {
    width: 32px;  /* Ajustar según el tamaño real de las imágenes */
    height: 32px; /* Ajustar según el tamaño real de las imágenes */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    background-blend-mode: normal;
}

/* Estilo para el tooltip */
.mapa-casilla .mapa-tooltip {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.mapa-casilla:hover .mapa-tooltip {
    visibility: visible;
    opacity: 1;
}

.mapa-casilla:hover {
    transform: scale(1.05);
}

.mapa-footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
}

#mapa-current-coords {
    font-weight: bold;
}

/* Estilos para la página de info ciudadanos */
.selector-container {
    text-align: center;
    margin: 20px 0;
}

.selector-container select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.ficha-ciudadano {
    padding: 20px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.ficha-ciudadano .info-basica {
    margin: 15px 0;
}

.ficha-ciudadano .seccion-habilidades,
.ficha-ciudadano .seccion-herramientas {
    margin: 15px 0;
}

.ficha-ciudadano .niveles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ficha-ciudadano .tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Para scroll en contenido */
.content {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilo para la imagen del pozo */
.pozo-img{
    width: 50px;
    height: 50px;
    margin-right: 4px;
}

/* Centrar contenido del pozo */
.pozo {
    text-align: center;
}

/* Estilo para la imagen de moneda */
.moneda-pozo {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 10px;
}

/* Estilo para el slider de donación */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}