*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    --mainEls: #afe6ff;
    --background: #d3f5ff;
    
}
body{
    background-color: var(--background);
    position: relative;
    z-index: -100;
    height: 100vh;
    background-image: url(./Files/background.png);
    background-position: center; 
    background-repeat: no-repeat;
    background-size: cover;    
    overflow: hidden; 
    min-width:1000px;
}

/* NavBar */
.top-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #00BAF0;
    background: linear-gradient(to left, var(--background), var(--mainEls));
    color: black;
    height: 50px;
    padding: 2em;
}
.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 0;
    padding: 0;
} 
.menu > li {
    margin: 0 1rem;
    font-size: 20px;
    font-family:monospace;
} 
#linkedIn{
    text-decoration: none;
    color: black;
}
h1{
    text-align: center;
    font-family: 'Bangers', cursive;
    font-size: 60px;
    letter-spacing: 1.5px;
}

/* Rules */
#rules{
    display: block;
    cursor: pointer;
}
#rulesBox #overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
    display: none;
}
#rulesBox.active #overlay{
    display: block;
}
#rulesTitle{
    font-size: 40px;
}
#lineBreak::after{
    content: "\a";
    white-space: pre;
}
#rulesBox{
    font-family: monospace;
}
#rulesBox #rulesBoxContent{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0);
    background: #fff;
    width: 450px;
    height: 320px;
    z-index: 3;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(var(--background), var(--mainEls));
    border-radius: 5px;
}
#rulesBox.active #rulesBoxContent{
    transition:all 300ms ease-in-out;
    transform: translate(-50%,-50%) scale(1);
}
#rulesBox #rulesBoxExit{
    position: absolute;
    right: 15px;
    top: 15px;
    width: 30px;
    height: 30px;
    background: #222;
    color: #fff;
    font-size: 25px;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
}
#rulesbody{
    font-size: 15px;
}
#rulesSub{
    font-size: 24px;;
}

/* Audio Buttons */
#audioButton{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    top: 15px;
    left: 7px;
    width: 50px;
    height: 50px;
    border: 2px solid black;
    border-radius: 50%;
    margin-bottom: 5px;
}
#audioImg{
    position: absolute;
    width: 35px;
    height: auto;
}
#audioButton:hover{
    background-color: var(--mainEls);
    cursor: pointer;
}
#audioButtons{
    position: absolute;
}
#sfxButton{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    top: 15px;
    left: 7px;
    width: 50px;
    height: 50px;
    border: 2px solid black;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
}
#sfxButton:hover{
    background-color: var(--mainEls);
    cursor: pointer;
}
#sfxText{
    position: absolute;
}
.line{
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><path d='M1 0 L0 1 L99 100 L100 99' fill='black' /><path d='M0 99 L99 0 L100 1 L1 100' fill='black' /></svg>");
    background-repeat:no-repeat;
    background-position:center center;
    background-size: 300% 300%, auto;
    width: 80%;
    height: 80%;
}
#lineMusic{
    display: none;
}
#lineSfx{
    display: none;
}

/* GameBoards */
#gameBoardTitles{
    display: flex;
    justify-content: space-between;
    width: 70%;
    margin: 30px auto 0 auto;
}
.GBTitle{
    display: block;
    width: 318px;
    text-align: center;
    font-family: 'Bangers', cursive;
    font-size: 30px;
}
#gameBoards{
    display: flex;
    justify-content: space-between;
    width: 70%;
    margin: 5px auto 0 auto;
}
@media(max-width: 500px){
    #gameBoards{
        flex-wrap: wrap;
    }
}
#GBPlayer, #GBCpu{
    display: grid;
    grid-template-columns: repeat(10, 10%);
    grid-template-rows: repeat(10, 10%);
    width: 300px;
    height: 300px;
    gap: 2px;
    margin: 20px 0;
    cursor: crosshair;
}
.GBPLayerEl, .GBCpuEl{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: var(--mainEls); 
    cursor: crosshair!important;
}
#gameInfo{
    display: flex;
    height:100%;
    font-family: monospace;
    font-size: 30px;
    align-items: center;
    justify-content: center;
    margin: 30 auto;
}
.playerShipEl{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: rgb(153, 145, 145);
    border: 1px solid rgb(95, 91, 91);
    cursor: pointer;
}
.cpuShipEl{
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: var(--mainEls);
}

/* Ship Bay*/
#shipBay{
    position: relative;
    font-family: 'Bangers', cursive;
    width: 350px;
    height: 300px;
    margin: 40px auto 0 auto;
}
#shipBayLabel{
    display: block;
    width: 100%;
    height: 1em;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 35px;
}
.shipBlock{
    display: inline-block;
}
.destroyer, .submarine, .cruiser, .battleship, .carrier{
    display: grid;
    gap: 2px;
}
#shipDiv{
    width:200px;
    margin: 0 auto;
}
#rotateButton{
    display: block;
    position: absolute;
    font-family: monospace;
    font-size: 20px;
    left: 10%;
    top: 270px;
    margin: -15px auto 0 auto;
    width: 80%;
    height: 2em;
    background-color: #74e1ff;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}
#rotateButton:hover{
    color: white;
    background-color: rgb(14, 96, 248)
}
.hide {
    display: none!important;
    overflow: hidden;
}
.drag-over {
    border: solid 1px red;
}

/* Game Pieces */
.guess{
    width: 30%;
    height: 30%;
    border-radius: 50%;
}
#hit{
    background-color: red;
    width: 8px;
    height: 8px;
}
#miss{
    background-color: white;
    width: 8px;
    height: 8px;
}

/* Replay */
#replayButton{
    display: none;
    margin: 50px auto;
    border: none;
    color: white;
    width: 250px;
    font-size: 20px;
    font-family: monospace;
    height: 50px;
    border-radius: 5px;
    cursor: pointer;
    background-color: rgb(182, 31, 31);
}

/* Title page design */
.LightWaves {
    animation: lightwaves 2s infinite;
    position: relative;
}
@keyframes lightwaves {
    0%,100% { transform: translate(0,0); }
    25%     { transform: translate(5px,5px); transform: scale(1.05); }
    50%     { transform: translate(25px, 5px); }
    75%     { transform: translate(12px,10px); transform: scale(1.05); }
}

.DarkWaves {
animation: darkwaves 3.8s infinite;
}
svg{
    position: absolute;
    bottom: 0px;
    z-index: -1;
}
@keyframes darkwaves {
    0%,100% { transform: translate(0,0); }
    25%     { transform: translate(25px, 5px); transform: scale(1.05); }
    50%     { transform: translate(12px,10px); }
    75%     { transform: translate(5px,5px); }
}

.WhiteWaves {
animation: whitewaves 4s alternate ease infinite;
}
@keyframes whitewaves {
    0% { transform: translate(0,25px); }
    100%     { transform: translate(25px,35px); }
}
#battleshipImg{
    width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
    z-index: -1;
    animation: animate 4s linear infinite;
}
#frontContainer{
    position: relative;
    height: 100vh;
    z-index: -1;
}
#battleshipContainer{
    width: 100%;
    height: 600px;
    position: absolute;
    bottom: -80px;
    z-index: -1;
    overflow: hidden;
}

/* Title */
.title{
    margin: 0 auto;
    font-size: 100px;
    padding: 40vh 0 0 0 ;
    position: relative;
    z-index: 1;
}

/* Clouds */
#allClouds{
    z-index: -1;
}
.cloud{
    display: block;
    background: white;
    background: linear-gradient(top, white 5%, #f1f1f1 100%);
    border-radius: 100px;
    position: absolute;
    box-shadow: 0 8px 5px rgba(0,0,0,0.1);
    height: 120px;
    width: 350px;
    left: 0px;
    z-index: -5;
}
.cloud:after, .cloud:before{
    background: white;
    content: '';
    z-index: -1;
    position: absolute;
}
.cloud:after{
    border-radius: 100px;
    height: 100px;
    left: 50px;
    top: -50px;
    width: 100px;
}
.cloud:before{
    border-radius: 200px;
    height: 180px;
    right: 50px;
    top: -90px;
    width: 180px;
}
#cloud1{
    top: 40vh;
}
#cloud2{
    top: 4vh;
    transform: scale(0.50);
}
#cloud3{
    top: 23vh;
    transform: scale(0.35);
}
#cloudCont1{
    animation: animateCloud 45s linear infinite;   
    transform: scale();
}
#cloudCont2{
    animation: animateCloud 25s linear infinite;
}
#cloudCont3{
    animation: animateCloud 30s linear infinite;
    
}
@keyframes animateCloud {
    0% {
        transform: translate(-600px,0);
      }
    100% {
        transform: translate(2000px,0);
      }
}

@keyframes animate {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(0,15px); }
}

/* Start Game */
#pageLink{
    display: block;
    text-decoration: none;
    text-align: center;
    color: black;
    font-size: 25px;
    background-color: #74e1ff;
    border-radius: 5px;
    width: 150px;
    height: 2em;
    margin: 0 auto;
    line-height: 2em;
    position: relative;
    font-family: monospace;
}
#pageLink:hover{
    background-color: #1E7DEA;
    color: white;
}