/* Styling based on the provided images: Dark, Cosmic, Gothic */
body {
    background-color: #0d0b14; /* Deep dark purple-black */
    color: #e0d9f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background: linear-gradient(180deg, #1a152e 0%, #0d0b14 100%);
    padding: 40px 20px;
    text-align: center;
    border-bottom: 2px solid #4a2d8a;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: 5px;
    color: #a388ee;
    text-shadow: 0 0 15px #6e3ddb;
    margin: 0;
}

nav {
    margin-top: 20px;
}

nav a {
    color: #9cdb9c; /* Acid green touch from images */
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}

nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px #9cdb9c;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.game-card {
    display: flex;
    align-items: center;
    background: #161225;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #332a52;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: scale(1.02);
    border-color: #6e3ddb;
}

.image-box {
    flex: 0 0 300px; /* Limits the width of the image area */
    max-height: 200px;
    overflow: hidden;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps image looking good while small */
    filter: saturate(0.8) contrast(1.1);
}

.text-box {
    padding: 20px 30px;
}

.text-box h2 {
    color: #9cdb9c;
    margin-top: 0;
}

.text-box p {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #b0a8c9;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4a2d8a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #6e3ddb;
}

footer {
    text-align: center;
    padding: 40px;
    font-size: 0.8rem;
    color: #554d74;
}

/* Mobile Friendly */
@media (max-width: 768px) {
    .game-card {
        flex-direction: column;
    }
    .image-box {
        flex: none;
        width: 100%;
    }
}
/* Navigation and interactive controls */
nav a[aria-current="page"] {
    color: #fff;
    text-shadow: 0 0 10px #9cdb9c;
}

.image-box {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
}

.image-box img {
    display: block;
    cursor: inherit;
}

.btn {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
}

/* Compact modal windows */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 4, 10, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-panel {
    position: relative;
    width: min(100%, 560px);
    max-height: min(82vh, 720px);
    overflow-y: auto;
    padding: 28px;
    border: 1px solid #6043a0;
    border-radius: 12px;
    background: linear-gradient(145deg, #211a36 0%, #141020 100%);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.65), 0 0 24px rgba(110, 61, 219, 0.18);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.2s ease;
}

.modal.is-open .modal-panel {
    transform: translateY(0) scale(1);
}

.modal-close,
.lightbox-close {
    position: absolute;
    top: 9px;
    right: 13px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 1px solid #51416f;
    border-radius: 50%;
    background: rgba(13, 11, 20, 0.8);
    color: #e0d9f0;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover,
.lightbox-close:hover {
    color: #9cdb9c;
    border-color: #9cdb9c;
}

.game-modal-panel {
    width: min(100%, 590px);
    padding: 25px 28px 27px;
}

.game-modal-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    padding-right: 25px;
    margin-bottom: 17px;
}

.game-modal-heading h2,
.info-modal-panel h2,
.login-panel h2 {
    margin: 0;
    color: #9cdb9c;
    font-size: 1.35rem;
    line-height: 1.3;
}

.modal-thumb {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 1px solid #6043a0;
    border-radius: 8px;
    filter: saturate(0.85) contrast(1.08);
}

.modal-copy p,
.info-modal-panel p {
    margin: 0 0 13px;
    color: #c1b8d5;
    font-size: 0.94rem;
    line-height: 1.65;
}

.modal-copy p:last-child,
.info-modal-panel p:last-of-type {
    margin-bottom: 0;
}

.info-modal-panel {
    width: min(100%, 430px);
    padding: 34px 30px 30px;
    text-align: center;
}

.info-modal-panel h2 {
    margin: 7px 0 15px;
}

.modal-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-bottom: 8px;
    border: 1px solid #6043a0;
    border-radius: 50%;
    color: #9cdb9c;
    font-size: 1.2rem;
    box-shadow: 0 0 18px rgba(110, 61, 219, 0.2);
}

.modal-action {
    margin-top: 20px;
}

/* Full-size view of the original game artwork */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 25px 25px;
    background: rgba(3, 2, 7, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    display: block;
    max-width: min(94vw, 1200px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid #6043a0;
    border-radius: 5px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    font-size: 1.9rem;
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    padding: 55px 20px 75px;
}

.login-panel {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid #332a52;
    border-radius: 12px;
    background: linear-gradient(145deg, #1b162c 0%, #13101e 100%);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.login-panel h2 {
    margin-bottom: 12px;
}

.login-intro,
.login-note {
    color: #b0a8c9;
    font-size: 0.92rem;
    line-height: 1.55;
}

.login-panel form {
    display: flex;
    flex-direction: column;
    margin-top: 24px;
    text-align: left;
}

.login-panel label {
    margin: 0 0 7px;
    color: #9cdb9c;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-panel input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 17px;
    padding: 12px 13px;
    border: 1px solid #51416f;
    border-radius: 6px;
    outline: none;
    background: #0d0b14;
    color: #e0d9f0;
    font: inherit;
}

.login-panel input:focus {
    border-color: #9cdb9c;
    box-shadow: 0 0 0 2px rgba(156, 219, 156, 0.12);
}

.login-panel input::placeholder {
    color: #716985;
}

.login-submit {
    width: 100%;
    margin-top: 3px;
    padding: 12px 20px;
}

.login-note {
    margin: 20px 0 16px;
    font-size: 0.82rem;
}

.back-link {
    color: #9cdb9c;
    font-size: 0.88rem;
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
    text-shadow: 0 0 8px #9cdb9c;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #9cdb9c;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: clamp(1.35rem, 5vw, 2rem);
        letter-spacing: 2px;
    }

    nav a {
        display: inline-block;
        margin: 7px 10px;
        font-size: 0.9rem;
    }

    .image-box {
        max-height: 230px;
    }

    .game-card {
        transform: none;
    }

    .game-card:hover {
        transform: none;
    }

    .text-box {
        padding: 20px;
    }

    .modal {
        padding: 13px;
    }

    .modal-panel,
    .game-modal-panel,
    .info-modal-panel {
        padding: 25px 20px 22px;
    }

    .game-modal-heading {
        gap: 12px;
    }

    .modal-thumb {
        flex-basis: 62px;
        width: 62px;
        height: 62px;
    }

    .game-modal-heading h2,
    .info-modal-panel h2 {
        font-size: 1.15rem;
    }

    .modal-copy p,
    .info-modal-panel p {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .login-container {
        padding: 35px 15px 55px;
    }

    .login-panel {
        padding: 27px 22px;
    }
}
