* {
    font-family: 'Roboto', Helvetica, sans-serif;
    user-select: none;
    margin: 0;
    padding: 0;
}

body {
        background-image: url(bg.jpg);
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@keyframes bg {
    0% {
        background: red;
    }
    25% {
        background: blue;
    }
    50% {
        background: green;
    }
    75% {
        background: violet;
    }
    100% {
        background: black;
    }
}

.animate {
    animation: bg 0.1s;
}

.card {
    width: 100px;
    height: 140px;
    margin: 2px;
    text-align: left;
    padding: 6px 6px 6px 12px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid white;
    font-size: 18px;
    background-color: #2c3e50;
}

.card[data-data='2'] {
    background-color: #1abc9c;
}

.card[data-data='4'] {
    background-color: #e74c3c;
}

.card[data-data='8'] {
    background-color: #3498db;
}

.card[data-data='16'] {
    background-color: #f39c12;
}

.card[data-data='32'] {
    background-color: #9b59b6;
}

.card[data-data='64'] {
    background-color: #fd79a8;
}

.slot {
    background: #c0c0c0;
    color: white;
    text-align: center;
    font-size: 20px;
    position: relative;
    padding: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.slot-inner {
    width: 90%;
    height: 90%;
    border-radius: 5px;
    border: 3px solid #eee;
    text-align: center;
}

.slot-inner .hand {
    margin-top: 25px;
    margin-left: 4px;
}

.card-in-slot {
    margin: 0;
    user-select: none;
    position: absolute;
    box-sizing: border-box;
}

.shadow:before,
.shadow:after {
    border-radius: 2px;
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    background: linear-gradient(45deg, #fb0094, #0000ff, #00ff00, #ffff00, #ff0000, #fb0094, #0000ff, #00ff00, #ffff00, #ff0000);
    background-size: 400%;
    z-index: -1;
    animation: animate 20s linear infinite;
}

@keyframes animate {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 300% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.shadow:after {
    filter: blur(20px);
}

#card-src-container, #card-dest-container {
    display: flex;
    width: 452px;
    margin: auto;
    position: relative;
}

#card-src-container {
    min-height: 100px;
    background: #fff;
    border-radius: 0 0 5px 5px;
    margin-top: -5px;
    padding: 15px 30px;
    box-sizing: border-box;
    border-top: 2px dashed black;
    flex-wrap: wrap;
}

#card-dest-container {
    background: #ffffff;
    border-radius: 5px;
    min-height: 100px;
    height: 490px;
    margin-top: 10px;
}

.fake-node {
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.dummy {
    transform: rotate(0deg);
    transition: all 500ms ease-in-out;
}

#reload:hover .dummy {
    transform: rotate(270deg);
}

#card-src-container .card:first-child {
    -webkit-box-shadow: -8px 0px 0px -1px rgba(3, 3, 3, 0.7), -14px 0px 0px -1px rgba(3, 3, 3, 0.3);
    -moz-box-shadow: -8px 0px 0px -1px rgba(3, 3, 3, 0.7), -14px 0px 0px -1px rgba(3, 3, 3, 0.3);
    box-shadow: -8px 0px 0px -1px rgba(3, 3, 3, 0.7), -14px 0px 0px -1px rgba(3, 3, 3, 0.3);
}

#card-src-container .card:nth-child(2) {
    position: relative;
    left: -50px;
}

/* Hand CSS */

.hand-art {
    width: 52px;
    height: 52px;
}

.hand-art:after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: transparent;
    box-shadow: 16px 12px #eeeeee, 20px 12px #eeeeee, 16px 16px #eeeeee, 20px 16px #eeeeee, 20px 20px #eeeeee, 16px 20px #eeeeee, 16px 24px #eeeeee, 20px 24px #eeeeee, 16px 28px #eeeeee, 20px 28px #eeeeee, 16px 32px #eeeeee, 20px 32px #eeeeee, 16px 36px #eeeeee, 20px 36px #eeeeee, 16px 40px #eeeeee, 20px 40px #eeeeee, 12px 40px #eeeeee, 8px 36px #eeeeee, 4px 32px #eeeeee, 24px 40px #eeeeee, 24px 36px #eeeeee, 24px 32px #eeeeee, 24px 28px #eeeeee, 24px 24px #eeeeee, 28px 28px #eeeeee, 28px 32px #eeeeee, 28px 36px #eeeeee, 28px 40px #eeeeee, 32px 32px #eeeeee, 32px 36px #eeeeee, 32px 40px #eeeeee, 8px 32px #eeeeee, 4px 36px #eeeeee, 8px 40px #eeeeee, 12px 44px #eeeeee, 16px 44px #eeeeee, 20px 44px #eeeeee, 24px 44px #eeeeee, 28px 44px #eeeeee, 32px 44px #eeeeee, 12px 36px #eeeeee, 16px 8px #eeeeee, 20px 8px #eeeeee, 24px 20px #eeeeee, 28px 24px #eeeeee, 32px 28px #eeeeee;
}

.score-container {
    display: flex;
}

.highest-score, .current-score, .reload {
    padding: 10px;
    text-align: center;
    flex: 1;

}

#discard {
    margin: auto;
    width: 100px;
    height: 140px;
  
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 4px;
    cursor: pointer;
    margin-right: 0
}

.slot-1, .slot-2 {
    flex: 2;
    padding: 10px;
    background: #E0E0E0;
    border-radius: 5px;
    font-size: 29px;
    color: black;
    text-align: center;
    transition: all 500ms ease-in-out;
}

.discard-text {
    flex: 1;
    padding: 4px;
    text-align: center;
    font-size: 14px;
}

#reload {
    width: 20%;
    float: right;
    font-weight: bolder;
    padding: 3px;
    text-align: center;
    background: #E0E0E0;
    font-size: 20px;
    color: black;
    border-radius: 4px;
    cursor: pointer;
}

.high-score {
    width: 300px;
    text-align: center;
    position: absolute;
    left: calc(50% - 150px);
    top: -18vh;
    font-size: 50px;
    z-index: 2;
    background: #1DE9B6;
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
    padding: 10px;
}

@keyframes highScoreAnim {
    0% {
        top: -18vh;
    }
    50% {
        top: 40vh;
    }
    100% {
        top: -18vh
    }
}

.high-score-animation {
    animation: highScoreAnim 3s linear infinite;
}

.how-to-play {
    background: #EEEEEE;
    color: black;
    width: 90%;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    font-size: 20px;
    -webkit-box-shadow: 0 2px 8px 3px rgba(208, 208, 208, 1);
    -moz-box-shadow: 0 2px 8px 3px rgba(208, 208, 208, 1);
    box-shadow: 0 2px 8px 3px rgba(208, 208, 208, 1);
    text-align: center;
}

.alert-box {
    background: white;
    color: black;
    width: 60%;
    border: 2px solid #FF1744;
    height: auto;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    font-size: 20px;
    -webkit-box-shadow: 0 2px 8px 3px rgba(208, 208, 208, 1);
    -moz-box-shadow: 0 2px 8px 3px rgba(208, 208, 208, 1);
    box-shadow: 0 2px 8px 2px rgba(208, 208, 208, 1);
    text-align: center;
    position: absolute;
    top: 238px;
    left: calc(50% - 30%);
}
.alert-box-container {
  position: absolute;
  width: 100%;
  z-index: 3;
  height: 702px;
  background: rgba(0,0,0,0.3);
  display: none;
}

.red-cross {
  padding: 5px;
  font-size: 40px;
  margin-bottom: 10px;
  color: #FF1744;
}
.alert-message {

  margin-bottom: 25px;
  font-family: fantasy;
}
.ok-button {
  width: 25%;
  font-size: 12px;
  padding: 6px;
  margin: auto;
  background: #039BE5;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 300ms ease-in-out;
}
.ok-button:hover {
  background: #0277BD;
}
.instruction {
    font-size: 12px;
    width: 100%;
    margin: 10px auto;
    background: #F5F5F5;
    padding: 20px 30px;
    box-sizing: border-box;
    border-radius: 5px;
    text-align: left;
}

.game-title {
    width: 50%;
    margin: auto;
    text-align: center;
    font-weight: bold;
    font-family: cursive;
    font-size: 25px;
}

.instruction-list li {
    margin-bottom: 5px;
}

.button {
    padding: 8px;
    font-size: 14px;
    background: #7E57C2;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 300ms ease-in-out;
    text-align: center;
}

.button:hover {
    background: #311B92;
}

.play-button {
    margin: auto;
    margin-top: 5px;
    padding: 8px 20px;
    display: inline-block;
}

.instruction-toggle {
    margin: auto;
    margin-top: 10px;
}

.button:hover {
    background: #311B92;
}

.how-to-play-container {
    width: 100%;
    height: 702px;
    z-index: 1;
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
}

#score {
    font-size: 28px;
    color: #000;
    font-weight: bold;
    text-shadow: 0px 5px 4px #e0e0e0;
}
