.gameplay-container {
  background: url('../media/imgs/Backgroud_game_play.png') no-repeat center top;
  background-size: cover;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
}
.gameplay-container .container-left {
  align-items: flex-end;
  width: 90vw;
}
.gameplay-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-direction: row-reverse;
  width: 80vw;
}

.gameplay-header .logo {
  width: 70px;
  margin: 4vh 0.5rem;
}

.gameplay-header .header-text {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.gameplay-header .header-text .chapter-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2vw;
}

.gameplay-header .header-text .chapter-title #gameTitle {
  font-family: 'Rift-Regular', sans-serif;
  font-size: clamp(13px, 1.5vw, 160px);
  text-transform: uppercase;
  line-height: 0.8;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0% 100%);
  background: linear-gradient(90deg, #ff004d, #ff5e62);
  padding: 0.3rem 1.4rem;
}
/* .gameplay-header .header-text .chapter-title .nextBtn {
  display: inline-block;
  font-family: 'Rift-Regular', sans-serif;
  font-size: clamp(18px, calc(100vh * 160 / 3400), 160px);
  line-height: 0.8;
  text-transform: uppercase;
  background: #ff2b6d;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0% 100%);
  color: #fff;
  padding: 0.3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  animation: glow 2s infinite;
} */

.btn-wrapper {
  position: relative;
  display: none;
}

.btn-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #72a9c7;
  z-index: 0;
  animation: glow 2s infinite alternate;
}

.nextBtn {
  position: relative;
  z-index: 1;
  font-family: 'Rift-Regular', sans-serif;
  font-size: clamp(13px, 2vw, 160px);
  background: #ff2b6d;
  line-height: 0.8;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0% 100%);
  color: #fff;
  padding: 0.3rem 1.5rem;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
}

@keyframes glow {
  0% {
    filter: blur(10px);
    transform: scale(1);
  }
  100% {
    filter: blur(25px);
    transform: scale(1.2);
  }
}

/* Content Gameplay */
.gameplay-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-grow: 1;
}
.canvas-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 30px 0 20px;
}

.canvas-wrap {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100vw;
}

.canvas-wrap .canvas-content {
  position: relative;
  display: block;
  height: 35vw;
  aspect-ratio: 1 / 1;
}

.canvas-wrap .canvas-content canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

/* .canvas-wrap .canvas-content canvas {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  display: block;
  margin: 0 auto;
} */

.canvas-content .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.canvas-content .circle {
  position: absolute;
  border: 3px solid red;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%); /* căn tâm */
}

/* Icon Group */
.controls.desktop-only,
.track-point.desktop-only {
  display: none;
}
.controls.mobile-only,
.track-point.mobile-only {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.controls.mobile-only .icon {
  width: 40px;
  height: 40px;
}
.track-point.mobile-only .point-icon {
  width: 30px;
  height: 30px;
}
.controls.mobile-only .sound .sound-off,
.controls.mobile-only .music .music-off {
  display: none;
}

.controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.controls .icon {
  cursor: pointer;
}

/* mặc định bật */
.sound-off,
.music-off {
  pointer-events: none;
  display: none;
}

/* popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: #000;
}
.popup.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  overflow: hidden;
  font-family: 'Quasimoda-Medium', sans-serif;
  line-height: 1.2;
}

.popup-body {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 15px;
}

.popup-body img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.popup-text #popup-title {
  font-size: 18px;
  font-family: 'Quasimoda-Bold', sans-serif;
  margin: 0 0 10px;
}
.popup-text #popup-desc {
  line-height: 1.2;
}
.popup-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popup-text ul li {
  margin-bottom: 5px;
  position: relative;
  padding-left: 18px;
}

.popup-text ul li::before {
  content: '•';
  color: #e91e63;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.next-btn {
  width: 100%;
  background: #ff2b6d;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  padding: 12px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

/* Popup final */
/* Popup nền tối */
.gameplay-popup-end {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #4d0982;
  display: none;
  /* display: flex; */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup-end-content {
  background: url('../media/imgs/Backgroud_popup_mobile_finish.png') no-repeat center center;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 70%;
  aspect-ratio: 639 / 338;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
  padding: 20px;
}

/* Title */
.popup-end-content .popup-title {
  font-size: 16px;
  text-transform: uppercase;
  color: #6c2c8d;
  line-height: 1;
  margin-bottom: 5px;
  font-family: 'Rift-Regular', sans-serif;
}

.popup-end-content .highlight {
  color: #6c2c8d;
  font-weight: bold;
}

/* Section */
.section {
  display: flex;
  align-items: flex-start;
  font-family: 'Quasimoda-Medium', sans-serif;
  padding-left: 2vw;
}

.section .icon {
  flex: 0 0 60px;
  margin-right: 3px;
}

.section .icon img {
  width: 48px;
  height: 48px;
}

.section .text h3 {
  color: #6c2c8d;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  text-transform: uppercase;
  /* margin: 0 0 3px; */
}

.section ul {
  margin: 0;
  padding-left: 12px;
}

.section .text li {
  font-size: clamp(10px, 0.8vw, 12px);
  line-height: 0.9;
  color: #111;
  transform: scale(0.7);
  transform-origin: left center;
}

/* Reference button */
.ref-btn {
  display: flex;
  justify-content: space-between;
  /* margin-top: 10px; */
  align-items: flex-end;
  gap: 70px;
}

/* References */
.ref-btn .references {
  font-size: 5px;
  color: #333;
  margin-top: 5px;
  line-height: 1;
  font-family: 'Quasimoda-Regular', sans-serif;
}

.ref-btn .references strong {
  font-weight: bold;
}

/* Button NEXT */

.ref-btn .btn-next button {
  background: #ff255b;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0% 100%);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 5px 35px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

.ref-btn .btn-next button:hover {
  background: #c4004d;
}

/* Gameplay Footer */
.gameplay-footer {
  display: flex;
  width: 85vw;
  justify-content: space-between;
}

/* mobile small */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .gameplay-header {
    gap: 15vw;
  }
  .canvas-wrap .canvas-content {
    height: 70vh;
  }
}
/* Desktop */
@media screen and (min-width: 1200px) {
  .gameplay-header {
    flex-direction: column;
    width: 70vw;
  }
  .gameplay-container .container-left {
    align-items: center;
    width: 70vw;
  }
  .controls.mobile-only,
  .track-point.mobile-only {
    display: none;
  }
  .controls.desktop-only,
  .track-point.desktop-only {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 0;
  }
  .controls.desktop-only .icon {
    width: 60px;
    height: 60px;
  }
  .track-point.desktop-only .point-icon {
    width: 40px;
    height: 40px;
  }
  .popup-end-content {
    background: url('../media/imgs/Backgroud_popup_finish.png') no-repeat center center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 1024 / 659;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    padding: 60px 20px;
  }
  .popup-end-content .popup-title {
    font-size: 40px;
  }
  .section .icon {
    flex: 0 0 80px;
    margin-right: 20px;
  }
  .section .icon img {
    width: 70px;
    height: 70px;
  }
  .section .text h3 {
    font-size: 30px;
  }
  .section .text li {
    font-size: 25px;
  }
  .ref-btn .references {
    font-size: 10px;
  }
  .ref-btn .btn-next button {
    font-size: 20px;
    padding: 10px 50px;
  }
  .gameplay-popup-end {
    background: rgb(77, 9, 130, 0.65);
  }
  .gameplay-footer {
    width: 70vw;
  }
}
@media (min-width: 1800px) {
  .popup-end-content .popup-title {
    font-size: 45px;
  }
  .section .icon {
    flex: 0 0 80px;
    margin-right: 25px;
  }
  .section .icon img {
    width: 80px;
    height: 80px;
  }
  .section .text h3 {
    font-size: 35px;
  }
  .section .text li {
    font-size: 30px;
  }
  .ref-btn .references {
    font-size: 15px;
  }
  .ref-btn .btn-next button {
    font-size: 25px;
    padding: 10px 50px;
  }
}
