:root {
    --accent-color-darker: rgba(255, 255, 255, 0.6);
    --accent-color: white;
    --default-box-shadow: 2px 7px 5px rgba(0,0,0,0.3), 0px -4px 10px rgba(0,0,0,0.3);
    --alternative-bg: rgb(20, 20, 20);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

header {
    padding: 1em;
    border-bottom: thick solid var(--accent-color);
    background-color: var(--alternative-bg);
    position: relative;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent-color);
    filter: drop-shadow(0 0 50vh var(--accent-color));
    z-index: -1;
}

header h1 {
    margin-bottom: 0;
}

main {
    padding: 1em;
}

h1, h2 {
    margin-bottom: .4em;
}

li {
    margin-left: 1em;
}

a {
    transition: .2s;
    color: gainsboro;
    text-decoration: none;
}

a:hover {
    color: gray;
}

p {
    margin-bottom: .4em;
}

input {
    border: none;
    border-bottom: medium solid var(--accent-color-darker);
    background-color: transparent;
    color: white;
    transition: .4s;
}

input:focus {
    border-bottom-color: var(--accent-color);
    outline: none;
}

button, .fakeButton {
    font-size: .9em;
    border: medium solid var(--accent-color);
    padding: .6rem;
    background-color: black;
    color: white;
    transition: .2s;
    box-shadow: var(--default-box-shadow);
    height: 100%;
    display: inline-block;
}

.fakeButton {
    /* border-color: var(--accent-color-darker); */
    border-style: dotted;
}

button:hover, button:focus {
    color: black;
    background-color: var(--accent-color);
}

#games {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em;
}

.gameCard {
    width: 8em;
    transition: .4s;
}

.gameCard:hover {
    opacity: .6;
}

.gameCard .gameImage {
    border: thin solid var(--accent-color);
    width: 100%;
    box-shadow: var(--default-box-shadow);
}

.gameCard .gameTitle {
    overflow: hidden;
    text-overflow: ellipsis;
}

.gameCard .versionsList {
    list-style-type: none;
}

/* Game page */

body#gamePage {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body#gamePage header {
    flex-shrink: 0;
}

body#gamePage .gameImage {
    border: medium solid var(--accent-color);
}

body#gamePage main {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

body#gamePage h2 {
    flex-shrink: 0;
    margin-bottom: 1em;
}

body#gamePage .game {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 1em;
}

body#gamePage .gameImageContainer {
    position: relative;
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

body#gamePage .gameImage {
    height: 100%;
    width: auto;
    object-fit: contain;
    z-index: 1;
    box-shadow: var(--default-box-shadow);
}

body#gamePage .gameDisk {
    position: absolute;
    height: 60%;
    width: auto;
    object-fit: contain;
    bottom: 0;
    right: 0;
    transition: .4s;
    pointer-events: none;
    filter: drop-shadow(2px 7px 5px rgba(0,0,0,0.3));
}

body#gamePage .gameInfo {
    flex: 1;
    overflow-y: auto;
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    user-select: text;
}

body#gamePage .gameDownloads {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    overflow: auto;
    text-wrap: wrap;
    transition: opacity 0.3s, visibility 0.3s;
}

body#gamePage .gameImageContainer.showDownloads:hover .gameDisk {
    transform: translateX(60%);
}

body#gamePage .gameImageContainer.showDownloads .gameDownloads {
    opacity: 1;
}

body#gamePage .gameInfo .gameTitle .gameAuthorText {
    font-weight: lighter;
}

body#gamePage .gameInfo .gameDescription {
    padding: .4em;
    background-color: rgb(40, 40, 40);
    box-shadow: var(--default-box-shadow);
    border: medium solid var(--accent-color);
}

body#gamePage .gameInfo .gameDescription p {
    margin-bottom: 0;
}

body#gamePage .gameInfo .gameTitle h2 {
    margin-bottom: 0;
}

/* Login Page */
.loginForm {
    display: flex;
    flex-direction: column;
    gap: .6em;
}

.loginForm input {
    display: block;
}

.loginForm .formGroup {
    display: flex;
    flex-direction: column;
    gap: .4em;
    width: fit-content;
}

.loginForm .formSubmit {
    margin-top: 1em;
}