/* global styles */

* {
    box-sizing: border-box;
}

:root {
    --font-color: #ddd;
    --background-color: rgb(10, 8, 30);
    --tile-bottom-right-color: #eec;
    --tile-top-left-color: #eef;
    --tile-hover-color: #ee7;
    --tile-alert-color: #ff0;
    --tile-border-color: #555;
    --tile-back-color: #888;
    --link-color: orange;
    --button-color: rgb(80, 29, 161);
    --button-hover-color: rgb(113, 29, 161);
    --base-width: 1000px;
    --base-height: 700px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
    font-size: 18px;
    background-color: var(--background-color);
    color: var(--font-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

strong {
    font-weight: 600;
}

/* wrapper */

#wrapper {
    transform-origin: top;
    width: var(--base-width);
}

/* header */

header {
    text-align: center;
    padding: 20px 0px;
    font-size: 28px;
    letter-spacing: 0.5px;
}

/* main */

main {
    position: relative;
}

/* footer */

footer {
    padding-top: 15px;
}

#statusText {
    float: left;
}

#controls {
    float: right;
}

/* buttons */

button {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--font-color);
    background-color: var(--button-color);
    padding: 5px 15px;
    margin-left: 10px;
    transition: background-color 100ms linear;
}

button:hover {
    cursor: pointer;
    background-color: var(--button-hover-color);
}

/* infotext */

#infoText {
    height: 100%;
    display: none;
    position: absolute;
    z-index: 1;
    padding: 0px 150px;
    text-align: justify;
    font-size: 20px;
}

#infoText a {
    color: var(--link-color);
    text-decoration: none;
}

#infoText a:hover {
    color: var(--tile-alert-color);
}

#infoText img {
    width: 52px;
    border-radius: 5px;
    background-image: linear-gradient(
        to left top,
        var(--tile-bottom-right-color),
        var(--tile-top-left-color)
    );
    transition: transform 150ms ease;
    border: 2px solid var(--background-color);
    margin: 0px 5px;
}

#infoText img:hover {
    transform: scale(1.2);
}

/* game */

#game {
    height: var(--base-height);
    background: url("./img/background-small.jpg") no-repeat center;
    position: relative;
    border-radius: 5px;
    opacity: 0;
}

/* tile */

.tile {
    position: absolute;
}

.tileFront {
    position: absolute;
    background-image: linear-gradient(
        to left top,
        var(--tile-bottom-right-color),
        var(--tile-top-left-color)
    );
    border: 1px solid var(--tile-border-color);
}

.tileFront:hover {
    cursor: pointer;
    background-image: linear-gradient(
        to left top,
        var(--tile-hover-color),
        var(--tile-hover-color)
    );
}

.selectedTile {
    background-image: linear-gradient(
        to left top,
        var(--tile-hover-color),
        var(--tile-hover-color)
    );
}

.alertTile {
    background-image: linear-gradient(
        to left top,
        var(--tile-alert-color),
        var(--tile-alert-color)
    );
}

.tileBack {
    position: absolute;
    background-color: var(--tile-back-color);
    border: 1px solid var(--tile-border-color);
}

/* media queries */

@media (max-width: 1010px) {
    .tile {
        transform: translateX(-65px);
    }
    :root {
        --base-width: 865px;
    }
    #infoText {
        padding: 0px 80px;
    }
}

@media (max-width: 875px) {
    #wrapper {
        transform: scale(0.95);
    }
    header {
        padding: 30px 0px;
    }
    footer {
        padding: 20px 0px;
        font-size: 30px;
    }
}

@media (max-width: 830px) {
    #wrapper {
        transform: scale(0.9);
    }
}

@media (max-width: 780px) {
    #wrapper {
        transform: scale(0.85);
    }
}

@media (max-width: 745px) {
    #wrapper {
        transform: scale(0.8);
    }
}

@media (max-width: 700px) {
    #wrapper {
        transform: scale(0.75);
    }
}

@media (max-width: 660px) {
    #wrapper {
        transform: scale(0.7);
    }
}

@media (max-width: 620px) {
    #wrapper {
        transform: scale(0.65);
    }
}

@media (max-width: 570px) {
    #wrapper {
        transform: scale(0.6);
    }
}

@media (max-width: 520px) {
    #wrapper {
        transform: scale(0.55);
    }
}

@media (max-width: 480px) {
    #wrapper {
        transform: scale(0.5);
    }
}

@media (max-width: 435px) {
    #wrapper {
        transform: scale(0.45);
    }
}

@media (max-width: 390px) {
    #wrapper {
        transform: scale(0.4);
    }
}

@media (max-width: 350px) {
    #wrapper {
        transform: scale(0.35);
    }
}
