/*
=============== 
Variables
===============
*/

:root {
  /* dark shades of primary color*/
  --clr-primary-1: hsl(205, 86%, 17%);
  --clr-primary-2: hsl(205, 77%, 27%);
  --clr-primary-3: hsl(205, 72%, 37%);
  --clr-primary-4: hsl(205, 63%, 48%);
  /* primary/main color */
  --clr-primary-5: hsl(205, 78%, 60%);
  /* lighter shades of primary color */
  --clr-primary-6: hsl(205, 89%, 70%);
  --clr-primary-7: hsl(205, 90%, 76%);
  --clr-primary-8: hsl(205, 86%, 81%);
  --clr-primary-9: hsl(205, 90%, 88%);
  --clr-primary-10: hsl(205, 100%, 96%);
  /* darkest grey - used for headings */
  --clr-grey-1: hsl(209, 61%, 16%);
  --clr-grey-2: hsl(211, 39%, 23%);
  --clr-grey-3: hsl(209, 34%, 30%);
  --clr-grey-4: hsl(209, 28%, 39%);
  /* grey used for paragraphs */
  --clr-grey-5: hsl(210, 22%, 49%);
  --clr-grey-6: hsl(209, 23%, 60%);
  --clr-grey-7: hsl(211, 27%, 70%);
  --clr-grey-8: hsl(210, 31%, 80%);
  --clr-grey-9: hsl(212, 33%, 89%);
  --clr-grey-10: hsl(210, 36%, 96%);
  --clr-white: #fff;
  --clr-red-dark: hsl(360, 67%, 44%);
  --clr-red-light: hsl(360, 71%, 66%);
  --clr-green-dark: hsl(125, 67%, 44%);
  --clr-green-light: hsl(125, 71%, 66%);
  --clr-black: #222;
  --transition: all 0.3s linear;
  --spacing: 0.1rem;
  --radius: 0.25rem;
  --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  --max-width: 1170px;
  --fixed-width: 450px;
  --clr-orange-1: hsl(12, 83%, 98%);
  --clr-orange-2: hsl(14, 91%, 95%);
  --clr-orange-3: hsl(12, 89%, 89%);
  --clr-orange-4: hsl(13, 87%, 82%);
  --clr-orange-5: hsl(13, 88%, 68%);
  --clr-orange-6: hsl(13, 88%, 55%);
  --clr-orange-7: hsl(13, 74%, 49%);
  --clr-orange-8: hsl(13, 74%, 33%);
  --clr-orange-9: hsl(13, 73%, 25%);
  --clr-orange-10: hsl(13, 73%, 16%);
}
/*
=============== 
Global Styles
===============
*/

*,
::after,
::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: black;
  color: var(--clr-grey-1);
  line-height: 1.5;
  font-size: 0.875rem;
  text-align: center;
}
ul {
  list-style-type: none;
}

li {
    border: solid rgba(158, 171, 241, 0.1);
    border-width: 1px 0; 

}

a {
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  letter-spacing: var(--spacing);
  text-transform: capitalize;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
h1 {
  font-size: 3rem;
}
h2 {
  font-size:2rem;
  margin: 2rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 0.875rem;
}
p {
  margin-bottom: 1.25rem;
  color: var(--clr-grey-5);
}
@media screen and (min-width: 650px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1rem;
  }
  body {
    font-size: 1rem;
  }
  h1,
  h2,
  h3,
  h4 {
    line-height: 1;
  }
}



.btn {
  display: inline-block;
  background: var(--clr-primary-5);
  color: var(--clr-white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  border-color: transparent;
  text-transform: capitalize;
  font-size: 1rem;
  letter-spacing: var(--spacing);
  margin-top: 1rem;
  margin-bottom: 2rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover,
.btn:focus {
    color: var(--clr-white);
}

.btn:active {
  background: blue;
}


/* more css */
h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: aliceblue;
  text-shadow: 0 0 15px #00f2ff, 0 0 25px #005eff;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  padding: 1rem;
  justify-items: center;
  align-items: end;
  width: 100%;
  max-width: 650px;
  margin: 2rem auto 3rem auto;
  pointer-events: none;
  overflow: hidden; 
}


#group-controls button{
  margin-bottom: 2rem;
}

#card-pick {
  margin-top: 5px;
}

.error-message{
  color: red;
 font-weight: 800;
 font-size: 1.4rem;
}


.hidden {
  display: none;
}

/* 3-d anim */
.card {
  width: 100%;
  aspect-ratio: 9 / 13;
  perspective: 800px;
  display: block;
}

.card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
  animation: flipIn 0.6s ease forwards;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-back {
  background: linear-gradient(135deg, #003366, #000);
  transform: rotateY(180deg);
}

.card-inner,
.card-front,
.card-back {
  width: 100%;
  height: 100%;
}

@keyframes flipIn {
  0% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}


.back-pattern {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #0051aa,
    #0051aa 10px,
    #002244 10px,
    #002244 20px
  );
}


.final-reveal {
  justify-content: center;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  position: relative;
  height: 300px;
  width: 100%;
}

.final-reveal img {
  position: absolute;
  width: 150px;
  animation: smoothReveal 0.8s ease-out forwards,
    floatGlow 1.5s ease-in-out infinite alternate,
    floatUp 5s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.6) translateY(60px);
  left: calc(50% - 75px);
  bottom: -110px;
  z-index: -6;
  transform-origin: center center;
  margin: 0;
  box-shadow: 0 0 25px rgba(0, 195, 255, 0.4);
  border-radius: 8px;
}
@keyframes smoothReveal {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes floatGlow {
  0% {
    transform: scale(1) translateY(0);
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.4);
  }
  100% {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.6);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: translateY(-100px) rotate(5deg);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-200px) rotate(-5deg);
    opacity: 0;
  }
}


/* NOTIFICATION */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
  max-width: 300px;
  width: 80%;
  text-align: center;
  z-index: 1000;
  font-family: sans-serif;
  font-size: 1rem;
}

.popup p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
}

.popup-buttons button {
  flex: 1;
  margin: 0 0.25rem;
  padding: 0.6rem;
  border: none;
  border-top: 1px solid #ccc;
  background: transparent;
  font-size: 1rem;
  color: #007aff;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-buttons button:hover {
  background: rgba(0, 122, 255, 0.1);
}

.hidden {
  display: none !important;
}


@media screen and (min-width: 650px) {
 h2{font-size:2.5rem;}
}