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

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

main {
    max-width: 1500px;
    margin: 10px auto;
    padding: 0 20px;
    font-size: 120%;
}

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

footer {
    background-color: #7f7c7c;
    color: white;
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    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: 10px;
    padding: 5px;
    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: 80%;
    display: flex;
    flex-direction: column;
    line-height: 110%;
}

.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;
    width: 80%;
    font-size: 110%;
    height: 80%;
    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;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 10px;
    font-size: 120%;
}

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

.character-bio-container {
    background-color: lightgray;
    padding: 10px;
    overflow: auto;
}

.character-bio-container img {
    height: 50%;
    width: 50%;
    float: right;
    padding: 15px;
    background-color: gray;
    border: 1px solid black;
}

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

.calentry {
    display: inline-block;
    width: 300px;
    max-height: 200px;
    min-height: 50px;
    padding: 5px;
    border-radius: 12px;
    text-align: center;
    border: 3px solid black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: auto;
}

.stat-box {
    width: 100%;
    max-width: 500px;
    border: 1px solid #000;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 20px auto;
}

.stat {
    width: calc(50% - 10px);
}

.stat-bar {
    width: 100%;
    background-color: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.stat-fill {
    height: 20px;
    background-color: #4CAF50;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
}

.gallery-item {
    margin: 0;
    width: 30%;
    min-width: 100px;
    display: flex;
    flex-direction: column;
}

.gallery-item img {
    width: 100%;
    border: 3px solid black;
}