@font-face {
    font-family: 'Lora';
    src: url('fonts/lora.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.page-header {
    position: relative;
    text-align: center;
    background-color: #410303;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header h1 {
    margin: 0;
    font-size: 40px;
    color: #fff;
    white-space: nowrap;
}

.home-btn {
    position: absolute;
    left: 20px;
    background-color: #8d0000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s;
}

.home-btn:hover {
    background-color: #cc0000;
}

body {
    font-family: 'Lora', Arial, sans-serif;
    background-color: #660d0d;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

h1 span {
    display: inline-block;
    animation: wave 1s infinite ease-in-out;
    position: relative;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    flex: 1;
    box-sizing: border-box;
}

.game,
.external-link {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #2a2a2a;
    flex: 0 0 auto;
    height: auto;
    max-height: 450px;
    box-sizing: border-box;
}

.game:hover,
.external-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.thumbnail,
.external-img {
    width: 100%;
    border-radius: 10px;
    position: relative;
}

.name,
.external-name {
    font-size: 30px;
    font-weight: bold;
    margin: 5px 0;
}

.creator {
    font-style: italic;
    color: #ffffff;
    font-size: 24px;
    margin: 5px 0;
}

.description {
    font-size: 18px;
    color: #ddd;
    margin: 5px 0;
}

.download-btn,
.external-btn {
    padding: 8px 12px;
    font-size: 20px;
    color: #fff;
    background-color: #8d0000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.download-btn:hover,
.external-btn:hover {
    background-color: #cc0000;
}

footer {
    background-color: #410303;
    color: #f0f0f0;
    text-align: center;
    padding: 10px;
    font-size: 20px;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.modal .close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
}

.separator {
    width: 100%;
    height: 2px;
    background-color: #565656;
    margin: 20px 0;
}

.external-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 650px;
    margin-bottom: 20px;
}

.source {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.source.recommended {
    border: 3px solid #ffa200;
}

.source:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.source-thumbnail {
    width: 100%;
    border-radius: 10px;
    position: relative;
}

.source-name {
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}

.source-description {
    font-size: 20px;
    color: #ffffff;
    margin: 5px 0;
}

.source-btn {
    padding: 8px 12px;
    font-size: 16px;
    color: #fff;
    background-color: #000000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.source-btn:hover {
    background-color: #565656;
}

.recommended-capsule {
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffa200;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

.game .thumbnail {
    opacity: 1;
    transition: none;
}

.game {
    position: relative;
}
