/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

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

/* General Styles */

body {
    background-color: rgb(31, 0, 75);
    /* text styles */
    font-family: 'Orbitron', Helvetica, sans-serif;
    text-align: center;
    color: rgb(84, 239, 234);
    margin-top: 30px;
    min-height: 100vh;
}

/* Header / Game Title Styles */
header {
    padding: 5px;
}

h1 {
    font-size: 50px;
    padding: 15px;                    
}

h2 {
    font-size: 35px;
}

h3 {
    font-size: 30px;
    padding: 40px;
    max-width: 615px;
}

footer {
    display: flex;
    justify-content: space-evenly;
    justify-content: center;
}

.text-shadow { /* (Text glow credits from geeksforgeeks.com) */
    text-shadow: 0 0 5px rgba(233, 250, 249, 0.552),
                0 0 10px rgba(233, 250, 249, 0.552),
                0 0 15px rgba(233, 250, 249, 0.552);
}

/* Game Board Styles */
#game-board {
    margin: 40px 0 10px 0;
    text-align: center;
    display: grid;
    justify-content: center;
    justify-items: center;
    align-items: center;
    grid-template-columns: 100px 100px 100px;
    grid-template-rows: 100px 100px 100px;
}

.board-slot {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* slot styles */
    border: 3px solid white;
    height: 100px;
    width: 100px;
    /* X O styles */
    color: 	rgb(236, 52, 153);
    font-size: 80px;
}

/* (Credits: Technique from Web Dev Simplified) */
/* -------- Removes outer-most border */
.board-slot:first-child,
.board-slot:nth-child(2),
.board-slot:nth-child(3) {
    border-top: none;
}

.board-slot:nth-child(3n + 1) {
    border-left: none;
}

.board-slot:nth-child(3n + 3) {
    border-right: none;
}

.board-slot:nth-child(7),
.board-slot:nth-child(8),
.board-slot:last-child {
    border-bottom: none;
}

/* Characters (X's and O's) */
/* (Credits: X and O from Web Dev Simplified) */

/* -------- Creates X */
.board-slot.X::before,
.board-slot.X::after {
    background-color: rgb(187, 255, 0);
    content: ''; /* Allows pseudo elements to render */
    position: absolute;
    width: 15%;
    height: 90%;
}

.board-slot.X::before {
    transform: rotate(45deg);
}

.board-slot.X::after {
    transform: rotate(-45deg);
}

/* -------- Creates O */

.board-slot.O::before,
.board-slot.O::after {
    background-color: rgb(255, 0, 251);
    content: ''; /* Allows pseudo elements to render */
    border-radius: 50%;
    position: absolute;
}

/* -------- O Outer Circle */
.board-slot.O::before {
    width: 90%;
    height: 90%;
}

/* -------- O Inner Circle */
.board-slot.O::after {
    width: 65%; 
    height: 65%;
    background-color: rgb(31, 0, 75);
}

/* Tally Styles */
#tally-container {
    margin: 40px 20px 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.player-tally{
    margin: 20px;
    padding-bottom: 20px;
    border-radius: 5px;
}

#p-x-tally {
    border: 2px solid rgba(225, 255, 141, 0.95);
    box-shadow: rgba(225, 255, 141, 0.95) 0 0 10px 1px; /* (Credits: Box glow from wbshout.com) */
}

#p-o-tally {
    border: 2px solid rgba(250, 189, 249, 0.95);
    box-shadow: rgba(250, 189, 249, 0.95) 0 0 10px 1px;
}

.tally {
    color:	rgb(173, 224, 231);
    text-align: center;
    font-size: 25px;
    font-weight: 450;
    padding: 10px 0 10px 0;
}

section.hidden {
    display: none;
}

/* Hidden Messages */
.hidden-message {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgb(31, 0, 75, 0.93);
    justify-content: center;
    align-items: center;
    align-content: center;
}

#welcome-message {
    padding-top: 60px;
}

#intro-pre,
#have-fun {
    font-size: 22px;
}

.rule {
    margin: 30px 25px 15px 25px;
    font-size: 15px;
    line-height: 25px;
    font-weight: 550;
}

.warning-text {
    padding: 20px 20px 40px 20px;
    font-size: 20px;
}

/* Start!, New game, Next Round, Yes, No buttons */
.pink-button {
    font-size: 20px;
    font-weight: 600;
    padding: 8px;
    line-height: 30px;
    font-family: 'Orbitron', Helvetica, sans-serif;
    background-color: rgb(209, 5, 117);
    color: white;
    border: 2px solid rgba(237, 168, 206, 0.865);
    border-radius: 5px;
    margin-bottom: 30px;
    height: 50px;
    width: 150px;
}

.warning-button {
    margin: 20px;
}

button:hover {
    opacity: 0.7
}

#social-media a {
    color: rgb(255, 255, 255);
    padding-bottom: 10px;
    margin: 30px;
    font-size: 30px;
}

/* Small Tablets and above */
@media screen and (min-width: 590px){

    .hidden-message {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    #tally-container {
        flex-direction: row;
    }
    
    .tally {
        color:	rgb(173, 224, 231);
        text-align: center;
        font-size: 25px;
        font-weight: 450;
        padding: 10px 40px 10px 40px;
    }

    .player {
        padding: 20px;
    }

    .pink-button {
        margin: 10px 45px 40px 50px;
    }
}
    
@media screen and (min-width: 1024px) {
    #intro-pre,
    #have-fun {
        font-size: 30px;
    }

    .rule {
        font-size: 26px;
        line-height: 35px;
        font-weight: 500;
    }
    
    #tally-container {
        display: inline-flex;
        flex-direction: row;
    }

    .player-tally {
        width: 400px;
    }
}

@media screen and (min-width: 1440px) {
    #welcome {
        font-size: 70px;
        padding-bottom: 30px;
    }

    h3 {
        max-width: 800px;
    }
    
    #intro-pre,
    #have-fun {
        font-size: 40px;
    }
    
    .rule {
        margin: 30px 70px 30px 70px;
        font-size: 32px;
        line-height: 60px;
        font-weight: 500;
    }

    .player-tally {
        width: 600px;
    }

    .tally-counters .tally{
        display: flex;
        flex-wrap: wrap;
        float: left;
        flex-direction: row;
        align-items: center;
        margin-left: 55px;
    }

    .tally {
        margin: 20px;
        padding: 0px;
    }

    #new-game-button {
        margin-top: 10px;
    }
}