/* static/css/style.css */

/* Estilos muy básicos para empezar */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f0f0; /* Fondo gris claro */
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Layout Principal --- */
.main-layout {
    display: flex;
    flex-grow: 1;
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1; /* Ocupa el espacio restante */
    padding: 1.5rem;
    background-color: #e9eef1; /* Fondo ligeramente diferente para el contenido */
    overflow-x: hidden; /* Previene scroll horizontal innecesario */
}

/* Estilos para la página de bienvenida */
.welcome-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.welcome-image {
    max-width: 300px; /* Limita tamaño de imagen */
    height: auto;
    display: block;
    margin: 1rem auto; /* Centrar imagen */
}

/* --- ESTILOS PARA LA CUADRÍCULA DE ITEMS --- */

/* Contenedor Principal de la Cuadrícula */
.equipment-grid-container {
    width: 100%;
}

.equipment-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* Por defecto, 1 columna (móviles) */
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Espacio entre tarjetas */
}

/* Media Queries para Múltiples Columnas */
@media (min-width: 600px) {
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    }
}

@media (min-width: 992px) {
    .equipment-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas */
    }
}

@media (min-width: 1200px) {
    .equipment-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en pantallas más grandes */
    }
}


/* Estilo de cada Tarjeta de Equipo */
.equipment-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.equipment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* Enlace que envuelve la tarjeta */
.equipment-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Contenedor de la Imagen */
.card-image-container {
    padding: 1rem 1rem 0.5rem 1rem;
    text-align: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    min-height: 120px; /* Altura mínima para alinear tarjetas */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-item-icon {
    max-width: 100px;
    max-height: 100px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain; /* Asegura que la imagen no se deforme */
}

.card-item-icon-placeholder {
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #adb5bd;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 4px;
}

/* Contenedor del Contenido (Nombre y Stats) */
.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-item-name {
    margin: 0 0 0.5rem 0; /* Reducido el margen inferior */
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #343a40;
}

/* Lista de Stats dentro de la Tarjeta */
.card-stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #495057;
    flex-grow: 1;
}

.card-stat-list li {
    padding: 0.3rem 0;
    border-bottom: 1px dashed #ececec;
}

.card-stat-list li:last-child {
    border-bottom: none;
}

/* --- ESTILO PARA TINTES EN LA TARJETA --- */
.card-dye-info {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}
/* --- FIN DE ESTILO --- */

/* --- FIN ESTILOS DE CUADRÍCULA --- */

/* --- ESTILOS PARA VISUALIZACIÓN DE TINTES (DYE BOX) --- */
.dye-box {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    min-width: 80px; /* Ancho mínimo para cada caja */
    font-family: sans-serif;
    font-weight: bold;
    color: white; /* Color de texto por defecto */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Sombra para legibilidad */
}

.dye-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.dye-number {
    font-size: 1.1em;
}
/* --- FIN DE ESTILOS DE TINTES --- */


/* --- Paginación --- */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}
.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.pagination-list li {
    display: inline;
}
.pagination-list li a,
.pagination-list li span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    margin-left: -1px;
    text-decoration: none;
    color: #007bff;
    background-color: #fff;
}
.pagination-list li a:hover {
    background-color: #eee;
}
.pagination-list li.active span {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    cursor: default;
}
.pagination-list li.disabled span {
    color: #aaa;
    background-color: #f8f8f8;
    cursor: default;
}

/* --- ESTILO PARA STATS --- */
.stat-negative {
    color: #dc3545; /* Rojo */
}

.stat-conditional {
    color: #198754; /* Verde */
}

/* --- BADGES DE ADQUISICIÓN Y EVENTO (ACTUALIZADOS) --- */
.acquisition-badge-wrapper {
    text-align: center;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.acquisition-badge {
    display: inline-block;
    padding: 0.3em 0.65em;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-drop { background-color: #28a745; color: #fff; } /* Verde (Drop) */
.badge-player-craft { background-color: #007bff; color: #fff; } /* Azul (Player Craft) */
.badge-npc-craft { background-color: #6f42c1; color: #fff; } /* Púrpura (NPC Craft) */
.badge-quest { background-color: #ffc107; color: #212529; } /* Amarillo (Quest) */
.badge-event { background-color: #fd7e14; color: #fff; } /* Naranja (Event Reward) */
.badge-other { background-color: #6c757d; color: #fff; } /* Gris (Other/Unknown) */

/* --- NUEVO BADGE ESPECÍFICO PARA "EVENT-LIMITED" --- */
.badge-event-limited {
    background-color: #fd7e14; /* Naranja, igual que el de Event Reward para consistencia */
    color: #fff;
}