.model-grid {
    display: grid;
    /* grid-template-columns: repeat(12, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

/* tablets */
@media (max-width: 1200px) {
    .model-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* mobile */
@media (max-width: 600px) {
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.model-name {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.85;
}

.model-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: white;
    min-width: 140px;
}

.model-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #222;
    position: relative;

}

.model-missing-thumb {
    aspect-ratio: 1 / 1;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #222;
    position: relative;
    overflow: hidden;
}

.model-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(193, 0, 80, 0);
    transition: background 0.15s ease;
    pointer-events: none;
}

.model-thumb:active::after {
    background: rgba(193, 0, 80, 0.15);
}

.model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* THIS is the key */
    display: block;
    transform: scale(1.01); /* avoids edge gaps */
}

.model-thumb::selection {
    background: transparent;
}

/* name (bottom left overlay) */
.model-thumb-label {
    position: absolute;
    bottom: 6px;
    left: 6px;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;

    font-size: 12px;
    font-weight: 500;

    padding: 4px 7px;
    border-radius: 6px;

    z-index: 5;
    pointer-events: none;

    backdrop-filter: blur(4px);

    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-initials-thumb {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-transform: uppercase;

    color: #fff; /* 👈 FIX (was too dark) */

    background: linear-gradient(135deg, #1d1d1d, #3a3a3a);
}

.model-initials {
    font-size: 5rem;
    font-weight: 900;
    color:#222;
    line-height: 1;
}

.model-initials-emoji {
    font-size: 1.2rem;
    margin-top: 4px;
    opacity: 0.85;
}

/* rank overlay */
.model-rank-badge {
    position: absolute;
    top: 6px;
    right: 6px;

    background: rgba(0, 0, 0, 0.65);
    color: #fff;

    font-size: 12px;
    font-weight: bold;

    padding: 3px 6px;
    border-radius: 6px;

    z-index: 5;
    pointer-events: none;

    backdrop-filter: blur(4px);
}