/* style.css */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial, sans-serif;
}

body{
  background:url('assets/bg/bg.webp');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  min-height:100vh;
  overflow-x:hidden;
  position:relative;
}

/* OVERLAY */

.overlay{
  position:fixed;
  inset:0;
  background:rgba(255,192,203,.15);
  backdrop-filter:blur(2px);
  z-index:1;
}

/* CONTAINER */

.container{
  position:relative;
  z-index:2;
  width:100%;
  max-width:1400px;
  margin:auto;
  padding:20px;
}

/* HEADER */

.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:20px;
}

.logo{
  width:420px;
  max-width:100%;
  object-fit:contain;
}

/* BUTTON */

.sound-btn,
.guide-btn,
.pick-btn{
  background:linear-gradient(180deg,#ff7bc0,#ff3d9a);
  border:none;
  padding:14px 24px;
  color:white;
  border-radius:50px;
  font-weight:bold;
  font-size:18px;
  cursor:pointer;
  box-shadow:0 5px 15px rgba(255,0,128,.35);
  transition:.2s;
}

.sound-btn:hover,
.guide-btn:hover,
.pick-btn:hover{
  transform:translateY(-2px);
}

.sound-btn:active,
.guide-btn:active,
.pick-btn:active{
  transform:scale(.96);
}

/* GAME AREA */

.game-area{
  margin-top:10px;
  text-align:center;
}

/* TITLE */

.title-box{
  background:#ff5db1;
  display:inline-block;
  padding:16px 35px;
  border-radius:50px;
  color:white;
  font-size:28px;
  font-weight:bold;
  margin-bottom:30px;
  box-shadow:0 6px 20px rgba(255,0,128,.25);
}

/* CARD GRID */

.card-grid{
  width:100%;
  max-width:900px;
  margin:auto;

  display:grid;

  grid-template-columns:repeat(3,1fr);

  gap:22px;

  justify-items:center;
}

/* CARD */

.card{
  perspective:1000px;
  cursor:pointer;
}

.card:active{
  transform:scale(.96);
}

.card-inner{
  position:relative;
  width:190px;
  height:270px;
  transition:transform .8s;
  transform-style:preserve-3d;
}

.card.flipped .card-inner{
  transform:rotateY(180deg);
}

.card-front,
.card-back{
  position:absolute;
  width:100%;
  height:100%;
  backface-visibility:hidden;
}

.card-front img,
.card-back img{
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:18px;
}

.card-back{
  transform:rotateY(180deg);
}

/* PICK BUTTON */

.pick-btn{
  margin-top:30px;
  min-width:260px;
}

/* RESULT */

.result-box{
  margin-top:30px;
  background:white;
  border-radius:30px;
  padding:30px;
  max-width:700px;
  margin-inline:auto;
  box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.result-box h2{
  font-size:32px;
}

#result{
  margin-top:15px;
  font-size:22px;
  font-weight:bold;
  color:#ff2e8a;
}

/* RARITY BOX */

.rarity-box{
  position:absolute;
  left:0;
  top:180px;
  width:220px;
}

.rarity-item{
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.9);
  margin-bottom:15px;
  padding:10px;
  border-radius:20px;
  box-shadow:0 5px 15px rgba(0,0,0,.08);
}

.rarity-item img{
  width:60px;
  height:60px;
  object-fit:contain;
}

/* CHARACTER */

.char-left{
  position:absolute;
  left:-20px;
  bottom:0;
  width:220px;
}

.char-right{
  position:absolute;
  right:-20px;
  bottom:0;
  width:220px;
}

/* RARITY COLOR */

.sar h3{
  color:gold;
}

.ar h3{
  color:#ff4dff;
}

.rr h3{
  color:#008cff;
}

.r h3{
  color:#00aa3c;
}

.c h3{
  color:#777;
}

/* TABLET */

@media(max-width:1200px){

  .rarity-box{
    display:none;
  }

  .char-left,
  .char-right{
    width:170px;
  }

}

/* MOBILE */

@media(max-width:768px){

  body{
    overflow-x:hidden;
  }

  .container{
    padding:15px;
  }

  .header{
    gap:10px;
  }

  .logo{
    width:180px;
  }

  .sound-btn,
  .guide-btn{
    padding:12px 18px;
    font-size:15px;
  }

  .title-box{
    width:100%;
    font-size:18px;
    line-height:1.4;
    padding:16px;
    border-radius:25px;
  }

  .card-grid{

    width:100%;

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:12px;

    justify-items:center;
  }

  .card-inner{
    width:100px;
    height:145px;
  }

  .pick-btn{
    width:100%;
    min-width:auto;
    margin-top:25px;
    font-size:18px;
    padding:16px;
  }

  .result-box{
    margin-top:25px;
    padding:22px;
    border-radius:25px;
  }

  .result-box h2{
    font-size:22px;
  }

  #result{
    font-size:18px;
  }

  .char-left,
  .char-right,
  .rarity-box{
    display:none;
  }

}

/* SMALL MOBILE */

@media(max-width:420px){

  .card-inner{
    width:92px;
    height:132px;
  }

  .title-box{
    font-size:16px;
  }

}