h1, h2, h3, h4 {
    font-family: 'Raleway', sans-serif;
}

p {
    font-family: 'Lora', serif;
}

body {
    max-width: 1500px;
    margin: 10px auto;
    padding: 0 20px;
}

header {
    font-size: 110%;
    background-color: rgb(205, 205, 205);
    padding: 0.5px;
    text-align: center;
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.character-card {
    display: flex;
    flex-grow: 1;
    max-width: 300px;
    height: 175px;
    margin: 20px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    border: 3px solid black;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-text {
    font-size: 85%;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.character-card img {
    height: 175px;
    width: 175px;
    object-fit: contain;
    border-radius: 4px;
}

.show-info {
    text-align: center;
    display: inline-block;
    width: 100px;
    margin-top: 10px;
    font-weight: bold;
    cursor: pointer;
}

.popup {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.popup.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    max-width: 75%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 48px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.character-info-container {
    background-color: rgb(205, 205, 205);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 3px;
    font-size: 120%;
}

.character-info-container img {
    width: 25%;
    height: 25%;
}