@font-face {
    font-family: 'agdasima';
    src: url('../../fonts/Agdasima-Regular.ttf');
    font-display: swap;
}

/* Set the HTML, body {height: 100%} property to make the page fill the viewport */
html, body {
    font-family: 'agdasima', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

a {
    text-decoration: none;
}

/* Set the position of the fullscreen-image element to absolute */
.fullscreen-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9999;
}

/* Make the img element inside the fullscreen-image element fill the entire viewport */
.fullscreen-image img {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9999;
}

.title {
    margin: auto;
    margin-top: 10px;
    padding: 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.title img {
    width: 30%;
    max-width: 600px;
    min-width: auto;
    height: auto;
    object-fit: contain;
}

.badges {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0 10px;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.badge-prototype {
    background-color: #2f9e44; /* Green */
}

.badge-patreon {
    background-color: #e03131; /* Orange-red */
}

h2 {
    margin: 10px 0;
    padding: 0;
    color: rgb(132, 185, 255);
    font-size: 35px;
    display: block;
}

.ldescription {
    margin-bottom: 20px;
    color: white;
    font-size: 27px;
}

.ldescription img {
    width: 650px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

.ldescription h3 {
    color: rgb(132, 185, 255);
    margin: 25px 0 15px 0;
    font-size: 30px;
}

.ldescription ul, .ldescription ol {
    margin: 15px 0;
    padding-left: 40px;
}

.ldescription li {
    margin-bottom: 8px;
}

.ldescription a {
    color: #4dabf7;
    text-decoration: underline;
}

.ldescription a:hover {
    color: #74c0fc;
}

.trailer {
    margin: auto;
    padding: 0;
    display: block;
    -webkit-box-shadow: 0px 0px 12px 5px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 0px 12px 5px rgba(0,0,0,0.75);
    box-shadow: 0px 0px 12px 5px rgba(0,0,0,0.75);
    width: 720px;
    height: 405px;
}

.stores {
    padding: 0;
    margin: auto;
    margin-top: 40px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.stores a {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.stores a img {
    width: 240px;
    height: auto;
    transition: transform 0.2s ease;
}

.stores a:hover img {
    transform: scale(1.05);
}

/* Class-specific selectors with same properties for when classes are applied */
.stores a.store-link {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.stores a img.store-icon {
    width: 240px;
    height: auto;
}
/* Loading spinner for modal images */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    z-index: 1001;
    will-change: transform;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Performance optimizations */
.screenshot {
    will-change: transform;
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden;
    object-fit: contain; /* Ensure aspect ratio is preserved */
    max-width: 100%;
    height: auto;
}

.modal-content {
    will-change: opacity;
}

/* Improve trailer container */
.trailer-container {
    margin: 20px auto;
    width: 720px;
    height: 405px;
    box-shadow: 0px 0px 12px 5px rgba(0, 0, 0, 0.75);
}

.trailer {
    width: 100%;
    height: 100%;
}
.main-container {
    display: flex;
    justify-content: center;
    max-width: 1020px;
    margin: 30px auto;
    gap: 50px;
    padding: 0 20px;
}

.content-left {
    width: 650px;
    flex: none;
    min-width: 0;
}

.content-right {
    width: 320px;
    flex: none;
}

.images {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.screenshot {
    padding: 0;
    width: 320px;
    height: auto;
    cursor: pointer;
    transition: filter 0.3s;
}
.screenshot:hover {
    filter: brightness(2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

/* Mobile styles */
@media only screen and (max-width: 992px) {
    .trailer-container {
        width: 90%;
        height: 0;
        padding-top: 50.625%; /* Roughly 16:9 for responsive */
        position: relative;
    }

    .trailer {
        position: absolute;
        top: 0;
        left: 0;
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .content-left, .content-right {
        width: 95%;
        max-width: none;
    }

    .content-right {
        width: 95%;
    }

    .screenshot {
        width: 100%;
        max-width: 480px;
    }

    .title img {
        width: 85%;
        max-width: 85%;
        margin: 0 auto;
    }

    .stores {
        margin-top: 30px;
        flex-direction: column;
        align-items: center;
    }

    .stores a img {
        width: 200px;
    }

    h2 {
        text-align: center;
        font-size: 28px;
    }

    .ldescription {
        text-align: justify;
        font-size: 20px;
    }
}

@media only screen and (max-width: 576px) {
    .trailer-container {
        width: 95%;
        margin: 20px auto;
        padding-top: 56.25%;
    }
}
