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

body {
  font-size: 16px;
  font-family: 'helvetica', 'arial', sans-serif;
  background-color: rgba(0, 100, 0, .8);
  background-image: linear-gradient(to right, rgba(0, 100, 0, .8), rgba(0, 128, 0, .8), rgba(0, 100, 0, .8)), url('../images/web.svg');
  background-size: cover;
  background-attachment: fixed;
}

/* Container of the landing page and the game view*/
.wrapper {
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

section {
  padding: 20px;
}

h1,
h2,
h3 {
  font-family: 'Special Elite', cursive;
  letter-spacing: 2px;
}

h2,
h3 {
  color: #B9E9AD;
}

section h1 {
  font-size: 60px;
  margin: 40px 10px 20px;
  text-align: center;
  color: #f3f3f3;
  line-height: 60px;
  text-transform: uppercase;
}

.landing-page {
  position: relative;
  padding: 50px 0 0 0;
  z-index: 2;
}

.game-page {
  z-index: 1;
  display: none;
}

@keyframes fade {
  to {
    opacity: 0;
  }
}

/* Side Bar */
.side-bar {
  padding: 20px 50px;
  max-width: 1000px;
  margin: 0 auto;
  color: #fff;
}

.back, .menu {
  display: none;
}

h2 {
  display: inline-block;
  line-height: 50px;
  margin-bottom: 20px;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  position: absolute;
  top: 11%;
  left: 110%;
  width: 120px;
  height: 30px;
  background: url('../images/web.svg');
  background-size: contain;
}

/* Rules Section */
.rules {
  margin-bottom: 30px;
}

.rules p {
  letter-spacing: 2px;
  line-height: 25px;
}

.rules li {
  margin-bottom: 10px;
}

.ex {
  color: #008000;
  font-weight: 700;
}

/* Form Container */
.form-container {
  font-size: 20px;
}

h3 {
  font-weight: 300;
  font-size: 20px;
  margin-bottom: 10px;
}

h3:nth-of-type(2) {
  margin-top: 20px;
}

[type='text'] {
  width: 100%;
  margin: 0 0 20px 0;
  margin-bottom: 20px;
  font-size: 18px;
  padding: 5px;
}

[for="diamond"]::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background: url('../images/diamond.png') no-repeat center;
  background-size: contain;
}

[for="heart"]::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background: url('../images/heart.png') no-repeat center;
  background-size: contain;
}

[for="spade"]::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background: url('../images/spade.png') no-repeat center;
  background-size: contain;
}

[for="clover"]::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background: url('../images/clover.png') no-repeat center;
  background-size: contain;
}

label {
  display: inline-block;
  padding: 8px 8px 8px 38px;
}

/* Game Score and timer */
.scoring-status {
  padding: 0 10px 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scoring-status p {
  font-size: 20px;
  color: white;
}

#score {
  padding: 0 20px 0 0;
}

/* Game Buttons */

.game-buttons button {
  display: inline-block;
  margin: 10px;
}

button {
  display: block;
  margin: 0 auto;
  padding: 8px 25px;
  background: linear-gradient(green, darkgreen);
  color: white;
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 30px;
  transition: 1s;
}

button:hover {
  background: linear-gradient(rgba(0, 128, 0, .5), rgba(0, 100, 0, .5));
}

/* Playing Cards Game View */
.top-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  position: relative;
}

.deck .slot {
  position: relative;
}

.finished-deck-slots {
  display: flex;
}

/* Playing Field View */
.playing-field {
  position: relative;
}

.pl-slots {
  display: flex;
  justify-content: flex-end;
}

.slot {
  position: relative;
  width: 90px;
  height: 120px;
  margin: 10px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .5);
}

.pl-slots .slot .card:last-child {
  margin-bottom: 50px;
}

.finished-deck-slots .slot {
  border: 1px solid gray;
}

/* Cards View */
.card {
  position: absolute;
  width: inherit;
  height: inherit;
  border-radius: inherit;
  border: 1px solid gray;
  top: 0;
  left: 0;
  overflow: hidden;
  background-image: url('../images/spider.png'),
      linear-gradient(white, white);
  background-repeat: no-repeat,
      no-repeat;
  background-position: center,
      left;
      background-size: contain, cover;
}

.card p {
  position: absolute;
  font-size: 12px;
  padding: 3px;
  text-align: center;
  font-weight: 600;
}

.card p:nth-of-type(1) {
  top: 0;
  left: 0;
}

.card p:nth-of-type(2) {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.cover {
  background-image: url('../images/spider.png'),
      linear-gradient(rgb(255, 0, 0), rgb(255, 255, 255));
}

/* Card Symbols */
.diamond::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: url('../images/diamond.png') center no-repeat;
  background-size: contain;
}

.heart::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: url('../images/heart.png') center no-repeat;
  background-size: contain;
}

.clover::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: url('../images/clover.png') center no-repeat;
  background-size: contain;
}

.spade::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: url('../images/spade.png') center no-repeat;
  background-size: contain;
}

/* Selected Cards */
.selected {
  outline: solid blue 2px;
}

.show p {
  pointer-events: none;
}

/* Game Status Container */
.status-container {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, .1);
  z-index: 4;
  display: none;
  padding: 20px;
}

.status-container > div {
  border: 1px solid white;
  border-radius: 5px;
  margin: 200px auto 0;
  max-width: 500px;
  padding: 30px;
  background: rgba(37, 37, 37, .9);
  text-align: center;
  color: #fff;
}

/* Stars */
svg {
  width: 80px;
  height: 87px;
  fill: #fdff00;
  stroke: #605a00;
  stroke-width: 10;
}

.status-container p {
  font-size: 20px;
  line-height: 30px;
  margin: 10px 0;
}

/* Confetti */
.piece {
  position: absolute;
  z-index: 3;
  animation: 3s disappear 1s 1 forwards;
}

@keyframes disappear {
  to {
    opacity: 0;
  }
}

/* Media Queries */
@media (max-width: 1244px) {
  .side-bar-button {
    width: 8%;
    background: rgb(37, 37, 37);
    border-right: 1px solid #fff;
    padding-top: 30px;
  }

  .menu {
    display: block;
  }

  .side-bar-button span {
    display: block;
    color: #FFF;
    text-align: center;
    line-height: 50px;
    font-size: 30px;
    font-family: 'Special Elite', cursive;
  }

  .back {
    display: block;
    position: absolute;
    right: 10px;
    top: 15px;
    cursor: pointer;
    font-family: 'Special Elite', cursive;
    font-size: 22px;
  }
}

@media (max-width: 1000px) {
  .scoring-status {
    flex-direction: column;
  }

  .game-buttons {
    margin-bottom: 10px;
  }
}

@media (max-width: 758px) {
  .slot {
    width: 70px;
    height: 90px;
    margin: 10px 3px;
  }
}

@media (max-width: 745px) {
  section h1 {
    font-size: 45px;
  }
}

@media (max-width: 590px) {
  .slot {
    width: 55px;
    height: 75px;
  }

  .game-page {
    padding: 20px 5px;
  }
}

@media (max-width: 680px) {
  .landing-page {
    padding: 20px 0 0 0;
  }

  .side-bar {
    padding: 30px;
  }
}

@media (max-width: 550px) {
  .game-buttons button {
    margin: 3px;
    padding: 8px;
  }

  svg {
    width: 50px;
    height: 54px;
  }

  .status-container p {
    font-size: 15px;
  }
}

@media (max-width: 452px) {
  .slot {
    width: 35px;
    height: 50px;
  }
}

@media (max-width: 460px) {
  .landing-page {
    padding: 10px 0 0 0;
  }

  .side-bar {
    padding: 20px;
  }
}

@media (max-width: 350px) {
  .game-buttons button {
    font-size: 12px;
  }
}
