.tile {
    perspective: 1000px;
}
body{
    color: #f6d365;
    font-family: 'Poppins', sans-serif;
}
body > h1{
    font-size: 3rem;
}
.stats > h1{
    font-size: 2.5rem;
}

h4, span{
    font-size: 1.5rem;
}

.container{
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin: 10px;
    margin-top: 0px;
    margin-bottom:0px;
}

#misses{
    animation: pulseColor 6s infinite;
    transition: color 3s;
}

.light-red{
    color: #F08080;
}
.dark-red{
    color: #FF2400;
}

@keyframes pulseColor{
    0%  { color: #FF6347; }   
    20% { color: #F08080; }   
    40% {color: #DC143C; }   
    100% { color: #FF6347; } 
}
.footer-style{
    display: flex;
    width: 100%;
}
.footer-style > *{
    flex: 1;
    color: white;
    text-align: center;
}
body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at center, #ffd54f, #9c27b0, #512da8);
    background-size: 150% 150%;
    background-repeat: no-repeat;
    animation: pulseGradient 6s ease-in-out infinite;
}

@keyframes pulseGradient {
  0% {
    background-size: 100% 100%;
    background-position: center;
  }
  50% {
    background-size: 200% 200%;
    background-position: center;
  }
  100% {
    background-size: 100% 100%;
    background-position: center;
  }
}

.card{
    position: relative;
    width: 120px;
    height: 130px;
    transform-style: preserve-3d;
    transition: transform 0.2s;
}

.front, .back{
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
}
.front{
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    transform: rotateY(0deg);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.4),
              0 4px 8px rgba(0, 0, 0, 0.3);
}
.back{
    background: linear-gradient(135deg, #9b30ff, #800080);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateY(180deg);
    font-size: 56px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.action{
    transform: rotateY(180deg);
}

.stats{
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    z-index: 1;
    opacity: 0;
    transform: scale(0.8);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    color: #fff9c4;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 221, 102, 0.3);
    transition: all 0.4s ease-in-out;
    transition: transform 1s;
    transition: opacity 1s;
    font-family: 'Poppins', sans-serif;
}

@keyframes glow {
  0% { box-shadow: 0 0 15px #ffdd66; }
  50% { box-shadow: 0 0 25px #ffdd66; }
  100% { box-shadow: 0 0 15px #ffdd66; }
}

.stats {
  animation: glow 6s infinite;
}
.stats .h2{
    width: 100%;
}

.stats > *{
    margin: 1rem;
}

.button-style{
    display:flex;
    gap: 0.5rem;
    padding: 1rem;
    justify-content: center;
    align-items: center;
    background: none;
    color: #fff9c4;
    border: 1px solid yellow;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
button:active {
      background-color: #f1c40f;
      transform: scale(0.96);
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hide{
    visibility: hidden;
}

.unhide-stats{
    transform: scale(1);
    opacity: 0;
}

.result-container{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 915px){
    .result-container{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    }
    #title{
        font-size: 200%;
    }
    .result-container > *{
        font-size: 125%;
    }
    .container{
        width: 100%;
        height: 65%;
        gap: 1%;
    }
    .tile{
        width: 100%;
        height: 100%;
    }
    .card{
        width:100%;
        height: 100%;
    }
}

@media(min-height: 950px){
    .result-container > *{
        font-size: 250%;
    }
    #title{
        font-size: 400%;
    }
    .stats > *{
        font-size: 200%;
    }
    #button-text{
        font-size: 125%;
    }
    .container{
        height: 70%;
        aspect-ratio: 0.8/1;
    }
    .tile{
        width: 100%;
        height: 100%;
    }
    .card{
        width: 100%;
        height: 100%;
    }
    .card > * {
        font-size: 500%;
    }
    #result-title{
        font-size: 350%;
    }
    .stats{
        height: 40%;
        gap: 10%;
        aspect-ratio: 0./1;
    }
}

@media(max-height: 600px){
    .result-container > *{
        font-size: 200%;
    }
    #title{
        font-size: 300%;
    }
    .stats > *{
        font-size: 200%;
    }
    #button-text{
        font-size: 125%;
    }
    .container{
        height: 70%;
        aspect-ratio: 0.8/1;
    }
    .tile{
        width: 100%;
        height: 100%;
    }
    .card{
        width: 100%;
        height: 100%;
    }
    .card > * {
        font-size: 200%;
    }
}
