.all-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, 450px);
    gap: 40px;
    align-content: start;
}

.char-details {
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    color: #ff0000;
    border: 4px solid white;
    border-radius: 5px;
    box-shadow: 5px 5px 15px #000;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.character-name {
    font-size: 24pt;
    text-align: center;
    padding: 10px;
    background-color: #d80000;
    color: #fff;
    box-sizing: border-box;
}

.character-name a {
    color: inherit;
    text-decoration: none;
}
.character-name a:hover {
    text-decoration: underline; /* optional, just to hint it's clickable */
}

.character-group {
    width: 100%;
    min-height: 115px;
    box-sizing: border-box;
    background-color: #ff0000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
}

.character-group > a:first-child {
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0;
}

.group-icon {
    width: 150px;
    height: 150px;
    display: block;
    box-sizing: border-box;
    padding: 0;
    object-fit: contain;
    object-position: center;
    margin: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
}

/* GROUP LOGO HOVER */

.group-icon:hover {
    color: #fff;
}

.group-name {
    display: block;
    color: #880000;
    font-size: 18pt;
    text-align: center;
    text-decoration: none;
    margin: 0 auto;
    padding: 2px 5px;
}

/* GROUP NAME HOVER */

.group-name:hover {
    background-color: #ff0000;
    color: #fff;
    font-weight: bold;
}

.character-image-container {
    width: 100%;
    height: 420px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    overflow: hidden;
}

.character-image-container > a {
    width: 300px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    overflow: hidden;
}

.character-image {
    width: 300px;
    height: 400px;
    display: block;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.description {
    padding: 10px;
    color: #000000;
    font-size: 105%;
    line-height: 1.25;
    box-sizing: border-box;
}

.spec-icons {
    display: flex;
    width: 100%;
    gap: 2px;
    padding: 0;
    box-sizing: border-box;
    margin-top: auto;
}

.spec-icon {
    flex: 1 1 50%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    background-color: #d80000;
    border: 1px solid #000;
    border-radius: 0;
    text-decoration: none;
    margin-top: auto;
}

.spec-icon img {
    width: 45px;
    height: 45px;
    display: block;
    object-fit: contain;
    object-position: center;
    margin: 0;
}

.spec-icon:hover {
    border-color: #440000;
    background-color: #FCD495;
}



.tools {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
}

.tools .nav-button {
    text-decoration: none;
}

.no-results-message {
    box-sizing: border-box;
}

@media (max-width: 500px) {

    .all-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .character-name {
        font-size: 20pt;
    }

    .character-group {
        min-height: 110px;
    }

    .group-icon {
        width: 75px;
        height: 75px;
    }

    .character-image-container {
        height: 370px;
    }

    .character-image-container > a {
        width: 270px;
        height: 350px;
    }

    .character-image {
        width: 270px;
        height: 350px;
    }

    .group-name {
        font-size: 16pt;
    }

    .description {
        font-size: 100%;
    }

    .spec-icon {
        height: 70px;
    }

    .spec-icon img {
        width: 40px;
        height: 40px;
    }

    .identity-icon {
        width: 60px;
        height: 60px;
    }

    .identity-icon img {
        width: 40px;
        height: 40px;
    }

    a.title {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 400px;
        overflow: hidden;
    }

    .model-image {
        display: block;
        width: 300px;
        height: 400px;
        object-fit: contain;
        object-position: center;
        margin: 0 auto;
    }
}
