/* Fonts */
@import url('https://fonts.googleapis.com/css?family=Open+Sans');

/* Body */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #1B1A1A;
}

/* Grid */
#main {
    display: grid;
    min-height: 350vh; /*After everything is done change this to auto*/
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    grid-row-gap: 6px;
    grid-template-rows: 100px 500px 1fr;
    grid-template-areas: "header"
                         "intro"
                         "content";
    opacity: 0.98;
    background-color: #1B1A1A;
    color: whitesmoke;
    font-weight: bolder;
}

@media only screen and (max-width:600px) { /* For phones */
    #main {
        min-height: 380vh;
        grid-template-rows: 65px 0.15fr 1.1fr 60px;
        grid-row-gap: 2px;
    }
}

/* Grid positions */

/* Header */
.header {
    grid-area: header;
    position: relative;
}

.header > div {
    border-bottom: 1px solid #28282a;
    background-color: rgba(27,26,26,0.9);
}

    .top-bar {
        height: 100%;
        display: grid;
        width: 99.8%;
        grid-template-columns: 1.5fr 1.5fr 4fr 0.5fr;
        grid-template-rows: 1fr;
        grid-template-areas: "game-title search-bar buttons .";
    }

    
    @media only screen and (max-width:800px) { /* For tablets and small screens */
        .top-bar {
            grid-template-columns: 1.5fr 1.5fr 6fr;
            grid-template-rows: 1fr;
            grid-template-areas: "game-title search-bar buttons";
        }
    }
    
    @media only screen and (max-width:600px) { /* For phones */
        .top-bar {
            grid-column-gap: 4px;
            grid-template-columns: 1.5fr 1.5fr 0.5fr;
            grid-template-rows: 1fr;
            grid-template-areas: "game-title search-bar buttons";
        }
    }
        .game-title {
            grid-area: game-title;
            font-size: 12px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .game-title > a > img {
            max-height: 75px;
        }

        .search-bar {
            grid-area: search-bar;
            text-align: center;
            position: relative;
        }

        form {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
        }

        .search {
            box-sizing: border-box;
            border: 2px solid #28282a;
            border-radius: 4px;
            background-color: #28282a;
            background-image: url('../img/searchicon.png');
            background-size: 40px 40px;
            background-repeat: no-repeat;
            padding: 12px 20px 12px 40px;
            -webkit-transition: width 0.4s ease-in-out;
            transition: width 0.4s ease-in-out;
            font-size: 16px;
            font-weight: bold;
            color: #a9a9a9;
            width: 100%;
            position: relative;
            opacity: 0.8;
        }

        .buttons {
            grid-area: buttons;
            text-align: center;
        }

        .buttons > div {
            height: 100%;
            width: 100%;
        }

        .buttons > div > a > img {
            height: 40%;
            width: 50%;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }
        
        .dropdown-content {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background-color: #161618;
            width: 100vw;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
            z-index: 1;
        }
        
        .dropdown-content a {
            color: white;
            padding: 12px 16px;
            text-decoration: none;
            display: inline-block;
        }

        .dropdown-content > .active {
            color: #f1c40f;
            text-shadow: 0px 0px 4px #f1c40f;
        }
        
        .dropdown-content a:hover {
            background-color: #1B1A1A;
        }
        
        /* .dropdown:hover .dropdown-content {
            display: block;
        } */

        .buttons > a > div {
            display: none
        }

        @media only screen and (min-width:600px) { /* For normal screens */
            .buttons {
                    grid-area: buttons;
                    display: grid;
                    grid-template-columns: repeat(6, 1fr);
                    grid-template-rows: 1fr;
                    grid-template-areas: "button-home button-news button-league button-contact button-discord button-forum"
            }

            .buttons > a {
                text-decoration: none;
                position: relative;
            }

            .buttons > a > div {
                margin: 0;
                padding: 0;
                color: #a9a9a9;
                font-size: 8px;
                text-align: center;
                height: 100%;
            }

            .buttons > a > div > h1 {
                position: absolute;
                left: 50%;
                top: 38%;
                transform: translateY(-50%) translateX(-50%);
                font-weight: bold;
            }

            .buttons > a:hover > div > h1 {
                color: white;
            }
            
            .buttons > a:hover:not(.active):not(#button-login):after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 20%;
                border-bottom:2px solid silver;
                box-shadow: 0px 0px 10px #fff;
            }

            .buttons > .active:after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 20%;
                border-bottom:3px solid #f1c40f;
                box-shadow: 0px 0px 10px #f1c40f;
            }

            .buttons > .active > div > h1 {
                color: whitesmoke
            }

            #button6 {
                grid-area: button-home;
            }
            #button7 {
                grid-area: button-news;
            }
            #button8 {
                grid-area: button-league;
            }
            #button9 {
                grid-area: button-forum;
            }
            #button10 {
                grid-area: button-contact;
            }
            #button11 {
                grid-area: button-discord;
            }
            .login {
                border: 1px solid #f1c40f;
                border-radius: 4px;
                background-color: #f1c40f;
                color: black;
                font-weight: bold;
                width: 80%;
                padding: 8px;
                text-shadow: 1px 0 black;
                letter-spacing: 1px;
            }

            .buttons > div {
                display: none;
            }

            .buttons > a > div {
                display: initial;
            }
        }

    @media only screen and (min-width:600px) { /* For screens more than 600px of height */
        .intro {
            grid-area: intro;
            height: 100%;
            width: 99.8%;
            display: grid;
            grid-template-columns: 40% 60%;
            grid-template-rows: 0.6fr 0.5fr 0.3fr 0.5fr;
            grid-template-areas: "gameprice video"
                                "description video"
                                "download video"
                                "socialnetworks video";
            position: relative;
        }
    }

    @media only screen and (max-height:600px) { /* For screens less than 600px of height */
        .socialnetworks > .images {
            margin-top: 3%;
        }
    }

    @media only screen and (max-width:1000px) { /* For phones */
        .intro {
            grid-area: intro;
            height: 100%;
            width: 100%;
            display: grid;
            grid-template-columns: 1fr;
            grid-template-rows: 0.3fr 1fr 0.3fr 0.5fr 1fr;
            grid-template-areas: "gameprice"
                                "description"
                                "download"
                                "socialnetworks"
                                "video";
            position: relative;
        }



        .socialnetworks > .images {
            margin-top: 3%;
        }
    }


    .reddit {
        filter: grayscale(100%);
    }
    

            .gameprice {
                grid-area: gameprice;
                position: relative;
                text-align: center;
                display: flex;
                height: 100%;
            }

            .gameprice > p {
                margin-left: 30%;
                align-self: flex-end;
                display: flex;
                letter-spacing: 4px;
                font-size: 13px;
                position: relative;
                text-shadow: 0px 0px 2px whitesmoke;
            }

            .gameprice > p > span:before {
                content: "";
                position: absolute;
                width: 40px;
                height: 2px;
                border: 1px solid #f1c40f;
                background: #f1c40f;
                box-shadow: 0px 0px 10px #f1c40f;
                border-radius: 15px;
                right: 100%;
                margin-right: 10%;
                margin-top: 5%;
            }

            .description {
                grid-area: description;
            }

            .description > p {
                padding: 0;
                margin-left: 18.5%;
                font-size: x-large;
                letter-spacing: 1.3px;
            }



            .download {
                grid-area: download;
            }

            .download > a {
                line-height: 1.5em;
                margin-left: 22.5%;
                padding: 12px;
                width: 140px;
                background: white;
                border-color: white;
                border: 0px solid #1B1A1A;
                font-weight: bold;
                color: #666666;
                font-size: 12px;
                letter-spacing: 1.5px;
                cursor: pointer;
                box-shadow: 0px 0 3px whitesmoke;
                text-decoration: none;
            }

            .download > a::after {
                content: "  ➜";
                font-size: 16px;
                font-weight: bold;
                color: #f1c40f;
                
            }

            .socialnetworks {
                grid-area: socialnetworks;
            }

            .socialnetworks > .images {
                margin-left: 22.5%;
                width: 50%;
            }

            .socialnetworks > .images > a > img {
                height: 25px;
                width: 25px;
                margin-right: 3%;
                margin-top: 0%;
                opacity: 0.2;
            }

            .images > a > img:hover {
                opacity: 0.9;
            }

            .video {
                opacity: initial;
                grid-area: video;
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
            }

                .video-container {
                    position: relative;
                    width: 711px;
                    height: 400px;
                }

            @media (max-width: 1000px) {
                .video-container {
                    position: relative;
                    width: 444px;
                    height: 250px;
                }
            }

            @media (max-width: 600px) {
                .video-container {
                    position: relative;
                    width: 355px;
                    height: 200px;
                }
            }

            .video-container > iframe {
                border: none;
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
            }
            
            .background {
                background-image: url(../img/screenshot-1.jpg);
                position: absolute;
                top: 0;
                left: 0;
                bottom: 0;
                right: 0;
                z-index: -1;
                filter: blur(3px);
            }
    .intro > div {
        background-color: rgba(44, 36, 36, 0.9);
    }

/* Content */

.content { 
    grid-area: content;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    grid-row-gap: 15px;
    grid-template-areas: "info";
    margin-top: 50px;
    margin-bottom: 50px;
}

    /*.content > div {
         border: 1px solid yellow; 
    }*/

    .content-introduction {
        grid-area: content-introduction;
    }
    .news {
        grid-area: news;
    }
    .info {
        grid-area: info;
    }
    .screenshots {
        grid-area: screenshots;
    }
    .content-ending {
        grid-area: content-ending;
    }

    .text { /* Text of introduction and ending */
        font-size: 14px;
        opacity: 0.8;
        letter-spacing: 1px;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .title { /* Text of introduction and ending */
        font-size: 25px;
        letter-spacing: 1px;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .title > .colored { /* Text of introduction and ending */
        color: #f1c40f;
    }

    .top {
        position: relative;
        height: 12%;
        width: 80%;
        margin: 0 auto;
    }

    .top > p {
        display: inline-block;
        position: relative;
        margin: 0;
        padding: 0;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 1%;
        letter-spacing: 1px;

    }

    .news_button {
        height: 100%;
        width: 20%;
        float: right;
    }

    .news_button > div {
        border-radius: 50%;
        padding: 4px;
        color: #f1c40f;
        background: #28282a;
        cursor: pointer;
        position: relative;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 5%;
        float: right;
    }

    .news_button > div:hover {
        background-color: #555;
    }

    .boxes {
        height: 85%;
        width: 90%;
        margin: 0 auto;
        margin-top: 0.5%;
    }

    .new, .screenshot {
        height: 95%;
        width: 21%;
        border: 3px solid #161618;
        position: relative;
        top: 50%;
        left: 13.5%;
        transform: translateY(-50%) translateX(-50%);
        float: left;
        margin-left: 2%;
        color: white;
        border-radius: 5px;
    }

    .new:hover, .screenshot:hover {
        opacity: 0.7;
    }

    .new > div > span {
        margin: 0;
        letter-spacing: 1px;
    }

    .new_title {
        width: 90%;
        height: 15%;
        margin-top: 5%;
        margin-left: 5%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .new_body {
        width: 90%;
        height: 60%;
        margin-left: 5%;
        overflow: hidden;
    }

    .new_body > span {
        opacity: 0.75;
        word-wrap: break-word;
    }

    .new_author {
        width: 90%;
        height: 15%;
        margin-left: 5%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .new_author > span::before {
        content: '- ';
    }

    .new > img {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        opacity: 0.2;
    }

    .screenshot > img {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        opacity: 1;
        cursor: pointer;
    }

    .new {
        display: none;
    }

    .screenshot {
        display: none;
    }

    .news > * {
        /* Without this the div gets destroyed somehow */
        border: 1px solid #1B1A1A;
    }

    .info {
        display: flex;
        flex-wrap: wrap;
    }

    .info_left, .info_right {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .info_picture, .info_text {
        border: 1px solid #1B1A1A;
        width: 40%;
    }

    .info_picture > img {
        border-radius: 5px;
        max-width: 100%;
    }

    .info_text > .info_text_header {
        letter-spacing: 1px;
    }

    .info_text_header > span {

    }

    .info_text > .info_text_body {
        font-size: medium;
    }

    .info_text_body > .title {
        display: inline-block;
        margin-top: 10px;
        margin-bottom: 2px;
        text-align: left;
    }

    /* Modal */
    .modal {
        display: none;
        position: fixed; /* Stay in place */
        z-index: 1; /* Sit on top */
        padding-top: 100px; /* Location of the box */
        left: 0;
        top: 0;
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        overflow: auto; /* Enable scroll if needed */
        background-color: rgb(0,0,0); /* Fallback color */
        background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    }

    /* Modal Content (image) */
    .modal-content {
        margin: auto;
        display: block;
        width: 80%;
        max-width: 700px;
    }

    /* Add Animation */
    .modal-content {    
        -webkit-animation-name: zoom;
        -webkit-animation-duration: 0.6s;
        animation-name: zoom;
        animation-duration: 0.6s;
    }

    @-webkit-keyframes zoom {
        from {-webkit-transform:scale(0)} 
        to {-webkit-transform:scale(1)}
    }

    @keyframes zoom {
        from {transform:scale(0)} 
        to {transform:scale(1)}
    }

    /* The Close Button */
    .close {
        position: absolute;
        top: 15px;
        right: 35px;
        color: #f1f1f1;
        font-size: 40px;
        font-weight: bold;
        transition: 0.3s;
    }

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

 
    @media (max-width: 1000px) {
        .info_right .info_picture {
            order: -1;
        }

        .info_picture, .info_text {
            min-width: 500px;
        }
    }

    @media (max-width: 600px) {
        .info_right .info_picture {
            order: -1;
        }

        .info_picture, .info_text {
            min-width: 300px;
        }
    }


/* Footer */
.footer {
    grid-area: footer;
    background-color: #161618;
}

    .footer > h1 {
        color: whitesmoke;
        font-size: small;
        position: relative;
        margin: 0;
        padding: 0;
        margin-left: 5%;
        top: 50%;
        transform: translateY(-50%);
    }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: whitesmoke !important;
}

/* width */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #888; 
}

/* Handle */
::-webkit-scrollbar-thumb {
    border: 2px solid #28282a;
    background: #161618; 
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* Fading animation */
.fade {
    -webkit-animation-name: fade;
    -webkit-animation-duration: 1.5s;
    animation-name: fade;
    animation-duration: 1.5s;
  }
  
  @-webkit-keyframes fade {
    from {opacity: .1} 
    to {opacity: 1}
  }
  
  @keyframes fade {
    from {opacity: .1} 
    to {opacity: 1}
  }