* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #1a1a3e, #24243e);
  background-size: 400% 400%;
  animation: gradientFlow 25s ease infinite;
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  25% {
    background-position: 50% 0%;
  }

  50% {
    background-position: 100% 50%;
  }

  75% {
    background-position: 50% 100%;
  }

  100% {
    background-position: 0% 50%;
  }
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.12), rgba(200, 150, 255, 0.06), transparent 70%);
  top: -12%;
  left: -10%;
  animation: blobMove1 26s ease-in-out infinite;
}

body::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(100, 255, 200, 0.10), rgba(255, 200, 100, 0.05), transparent 70%);
  bottom: -16%;
  right: -10%;
  animation: blobMove2 32s ease-in-out infinite;
}

@keyframes blobMove1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(160px, 110px) scale(1.3);
  }
}

@keyframes blobMove2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-130px, -90px) scale(1.2);
  }
}

.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -10%;
  font-size: 1.8em;
  opacity: 0.5;
  filter: drop-shadow(0 0 20px rgba(100, 200, 255, 0.15));
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
    transform: translateY(-10vh) translateX(10px) rotate(10deg) scale(1.1);
  }

  50% {
    transform: translateY(-55vh) translateX(30px) rotate(180deg) scale(1.2);
    opacity: 0.8;
  }

  90% {
    opacity: 0.5;
    transform: translateY(-100vh) translateX(-20px) rotate(350deg) scale(0.9);
  }

  100% {
    transform: translateY(-110vh) translateX(-20px) rotate(360deg) scale(1);
    opacity: 0;
  }
}

.particle.p1 {
  left: 4%;
  font-size: 1.4em;
  animation-duration: 22s;
  animation-delay: 0s;
}

.particle.p2 {
  left: 14%;
  font-size: 2.1em;
  animation-duration: 28s;
  animation-delay: 3s;
}

.particle.p3 {
  left: 24%;
  font-size: 1.6em;
  animation-duration: 19s;
  animation-delay: 6s;
}

.particle.p4 {
  left: 36%;
  font-size: 1.9em;
  animation-duration: 26s;
  animation-delay: 1s;
}

.particle.p5 {
  left: 48%;
  font-size: 1.5em;
  animation-duration: 24s;
  animation-delay: 8s;
}

.particle.p6 {
  left: 58%;
  font-size: 1.7em;
  animation-duration: 20s;
  animation-delay: 4s;
}

.particle.p7 {
  left: 68%;
  font-size: 1.4em;
  animation-duration: 27s;
  animation-delay: 10s;
}

.particle.p8 {
  left: 76%;
  font-size: 2em;
  animation-duration: 23s;
  animation-delay: 2s;
}

.particle.p9 {
  left: 86%;
  font-size: 1.6em;
  animation-duration: 29s;
  animation-delay: 7s;
}

.particle.p10 {
  left: 92%;
  font-size: 1.5em;
  animation-duration: 21s;
  animation-delay: 5s;
}

.particle.p11 {
  left: 10%;
  font-size: 1.3em;
  animation-duration: 25s;
  animation-delay: 12s;
}

.particle.p12 {
  left: 80%;
  font-size: 1.5em;
  animation-duration: 30s;
  animation-delay: 9s;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.08) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
  will-change: transform;
}

.cursor-glow.active {
  opacity: 1;
}

/* Landing page */
.landing-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  font-size: 2.5em;
  opacity: 0.25;
  filter: drop-shadow(0 0 30px rgba(100, 200, 255, 0.08));
  animation: shapeFloat 20s ease-in-out infinite;
}

.shape1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
  font-size: 3em;
}

.shape2 {
  top: 20%;
  right: 8%;
  animation-delay: 3s;
  font-size: 2.8em;
}

.shape3 {
  bottom: 30%;
  left: 3%;
  animation-delay: 6s;
  font-size: 3.2em;
}

.shape4 {
  bottom: 15%;
  right: 5%;
  animation-delay: 9s;
  font-size: 2.6em;
}

.shape5 {
  top: 50%;
  left: 2%;
  animation-delay: 12s;
  font-size: 2.2em;
}

.shape6 {
  top: 5%;
  left: 30%;
  animation-delay: 15s;
  font-size: 2em;
}

.shape7 {
  bottom: 5%;
  left: 25%;
  animation-delay: 18s;
  font-size: 2.4em;
}

.shape8 {
  top: 40%;
  right: 2%;
  animation-delay: 21s;
  font-size: 2.8em;
}

@keyframes shapeFloat {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  25% {
    transform: translate(20px, -30px) rotate(5deg) scale(1.1);
  }

  50% {
    transform: translate(-10px, -50px) rotate(-3deg) scale(0.9);
  }

  75% {
    transform: translate(30px, -20px) rotate(8deg) scale(1.05);
  }
}

.landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(100, 200, 255, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.landing-content {
  text-align: center;
  z-index: 1;
  position: relative;
  max-width: 600px;
  width: 100%;
  animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.music-float-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(20, 25, 50, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.4em;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.music-float-btn:hover {
  transform: scale(1.1) rotate(15deg);
  background: rgba(100, 200, 255, 0.15);
}

.music-float-btn.active {
  background: rgba(100, 255, 200, 0.2);
  color: white;
  border-color: rgba(100, 255, 200, 0.3);
  animation: pulse-green 2s infinite;
}

.credit-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  background: rgba(20, 25, 50, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.credit-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(100, 200, 255, 0.15);
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(100, 255, 200, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(100, 255, 200, 0);
  }
}

.game-title {
  font-size: 3.5em;
  background: linear-gradient(135deg, #8cf0ff, #b8a5ff, #8cf0ff, #ffb8a5, #8cf0ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 5px;
  margin: 20px 0 10px;
  animation: hologramText 4s ease-in-out infinite;
}

@keyframes hologramText {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.game-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2em;
  letter-spacing: 2px;
  margin-bottom: 40px;
  animation: subtitlePulse 4s ease-in-out infinite;
}

@keyframes subtitlePulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.game-description {
  background: rgba(20, 25, 50, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 25px 30px;
  margin: 30px auto;
  max-width: 500px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-align: left;
}

.game-description:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.game-description p {
  color: rgba(255, 255, 255, 0.85);
  margin: 12px 0;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.desc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1em;
  transition: all 0.3s ease;
}

.desc-item:hover {
  transform: translateX(5px);
  color: #8cf0ff;
}

.desc-item .desc-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.desc-item span {
  font-size: 0.95em;
  line-height: 1.4;
}

.game-description p:hover {
  transform: translateX(5px);
  color: #8cf0ff;
}

.landing-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.btn-start {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(200, 150, 255, 0.2));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 50px;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.btn-start .btn-icon {
  font-size: 1.3em;
  transition: transform 0.3s ease;
}

.btn-start:hover .btn-icon {
  transform: translateX(5px);
}

.btn-start::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      transparent 0deg,
      rgba(100, 200, 255, 0.1) 60deg,
      transparent 120deg,
      rgba(200, 150, 255, 0.1) 180deg,
      transparent 240deg,
      rgba(100, 255, 200, 0.1) 300deg,
      transparent 360deg);
  animation: hologramRotate 6s linear infinite;
}

@keyframes hologramRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.btn-start:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 15px 40px rgba(100, 200, 255, 0.15);
}

/* Tutorial */
.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.tutorial-card {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 30px;
  padding: 30px 35px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
}

.tutorial-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.tutorial-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
  position: relative;
  z-index: 1;
}

.tutorial-scroll::-webkit-scrollbar {
  width: 4px;
}

.tutorial-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.tutorial-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 200, 255, 0.3);
  border-radius: 10px;
}

.tutorial-header {
  text-align: center;
  margin-bottom: 15px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.tutorial-emoji {
  font-size: 2.5em;
  display: block;
  animation: bounce 1s ease-in-out infinite;
}

.tutorial-header h2 {
  color: #8cf0ff;
  font-size: 1.3em;
  margin-top: 3px;
}

.tutorial-content {
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.tutorial-step {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  margin: 6px 0;
  background: rgba(20, 25, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  transition: all 0.3s ease;
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.tutorial-step:nth-child(1) {
  animation-delay: 0.1s;
}

.tutorial-step:nth-child(2) {
  animation-delay: 0.2s;
}

.tutorial-step:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tutorial-step:hover {
  transform: translateX(5px);
  background: rgba(100, 200, 255, 0.08);
}

.step-icon {
  font-size: 1.5em;
  flex-shrink: 0;
}

.tutorial-step h4 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95em;
  margin-bottom: 2px;
}

.tutorial-step p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8em;
  margin: 0;
}

.tutorial-tips {
  background: rgba(100, 200, 255, 0.05);
  border-left: 4px solid rgba(100, 200, 255, 0.2);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
}

.tutorial-tips p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8em;
  margin: 3px 0;
}

.btn-start-level {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(200, 150, 255, 0.2));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-start-level::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      transparent 0deg,
      rgba(100, 200, 255, 0.08) 60deg,
      transparent 120deg,
      rgba(200, 150, 255, 0.08) 180deg,
      transparent 240deg,
      rgba(100, 255, 200, 0.08) 300deg,
      transparent 360deg);
  animation: hologramRotate 6s linear infinite;
  pointer-events: none;
}

.btn-start-level:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 200, 255, 0.1);
}

/* Konfirm */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.confirm-card {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 25px;
  padding: 35px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.confirm-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.confirm-icon {
  margin-bottom: 10px;
  animation: bounce 1s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.confirm-icon-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.confirm-card h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3em;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.confirm-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.btn-confirm-yes,
.btn-confirm-no {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95em;
}

.btn-confirm-yes {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(200, 150, 255, 0.2));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-confirm-yes:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(100, 200, 255, 0.1);
}

.btn-confirm-no {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-confirm-no:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.08);
}

/* Credit */
.credit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.credit-card {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 30px;
  padding: 40px 45px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.credit-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.close-credit {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2em;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 1;
}

.close-credit:hover {
  transform: rotate(90deg);
  color: #8cf0ff;
}

.credit-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 15px;
  border: 3px solid rgba(100, 200, 255, 0.3);
  box-shadow: 0 8px 30px rgba(100, 200, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.credit-photo:hover {
  transform: scale(1.05) rotate(-5deg);
}

.credit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credit-content h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3em;
  margin-bottom: 2px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.credit-role {
  color: #8cf0ff;
  font-weight: 500;
  font-size: 0.85em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.credit-contact {
  margin: 10px 0;
  position: relative;
  z-index: 1;
}

.credit-contact a {
  color: #8cf0ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85em;
}

.credit-contact a:hover {
  text-decoration: underline;
}

.credit-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.15), transparent);
  margin: 14px 0;
  position: relative;
  z-index: 1;
}

.credit-course p {
  color: rgba(255, 255, 255, 0.6);
  margin: 3px 0;
  font-size: 0.75em;
  position: relative;
  z-index: 1;
}

.credit-course strong {
  color: #8cf0ff;
  font-size: 0.95em;
}

.credit-year {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px !important;
  font-size: 0.9em;
}

.credit-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

.credit-footer p {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7em;
  font-style: italic;
}

/* Chef */
@keyframes chefSway {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  25% {
    transform: translateX(-8px) rotate(-3deg);
  }

  75% {
    transform: translateX(8px) rotate(3deg);
  }
}

.chef-icon-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  animation: chefSway 2s ease-in-out infinite;
}

.tutorial-emoji-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .chef-icon-img {
    width: 35px;
    height: 35px;
  }

  .tutorial-emoji-img {
    width: 60px;
    height: 60px;
  }
}

.level-icon-header {
  width: 65px;
  height: 65px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 12px;
}

@media (max-width: 768px) {
  .level-icon-header {
    width: 28px;
    height: 28px;
    margin-right: 8px;
  }
}

/* Main game */
#mainGame {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.game-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 25px 20px 80px 20px;
  width: 100%;
  overflow-x: clip;
}

/* Header */
.game-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 25, 50, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideDown 0.5s ease;
}

.chef-info {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.chef-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: bold;
  font-size: 1.1em;
}

.chef-stars {
  color: #8cf0ff;
  font-size: 0.8em;
}

.game-stats {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  background: rgba(20, 25, 50, 0.4);
  padding: 5px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
}

.stat:hover {
  transform: scale(1.05);
  background: rgba(100, 200, 255, 0.05);
}

.back-home-btn {
  background: rgba(100, 200, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-home-btn:hover {
  background: rgba(100, 200, 255, 0.1);
  transform: scale(1.05);
}

/* Level */
.level-selection-panel {
  background: rgba(20, 25, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 25px;
  padding: 30px 30px 40px 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: fadeIn 0.5s ease;
  overflow: visible;
}

.panel-header {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.panel-header h2 {
  color: #8cf0ff;
  font-size: 1.8em;
}

.panel-header p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 15px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 30px 10px 30px 10px;
  position: relative;
  z-index: 1;
}

.level-grid::-webkit-scrollbar {
  width: 8px;
}

.level-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.level-grid::-webkit-scrollbar-thumb {
  background: rgba(100, 200, 255, 0.2);
  border-radius: 10px;
}

.level-card {
  background: rgba(100, 200, 255, 0.08);
  border-radius: 15px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(100, 200, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: visible;
}

.level-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.level-card:hover::before {
  opacity: 1;
}

.level-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 30px rgba(100, 200, 255, 0.1);
  border-color: rgba(100, 200, 255, 0.25);
  background: rgba(100, 200, 255, 0.12);
  z-index: 10;
}

.level-card.completed {
  border-color: rgba(100, 255, 200, 0.25);
  background: rgba(100, 255, 200, 0.08);
}

.level-card.completed .level-name {
  color: rgba(100, 255, 200, 0.9);
  background: linear-gradient(135deg, #8cf0ff, #7dffb3, #8cf0ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hologramText 3s ease-in-out infinite;
}

.level-card.current {
  border-color: rgba(100, 200, 255, 0.3);
  background: rgba(100, 200, 255, 0.12);
  box-shadow: 0 0 30px rgba(100, 200, 255, 0.08);
}

.level-card.current .level-name {
  color: #8cf0ff;
  background: linear-gradient(135deg, #8cf0ff, #b8a5ff, #8cf0ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hologramText 2s ease-in-out infinite;
}

.level-card .level-image {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  margin: 0 auto 5px;
  transition: all 0.3s ease;
  background: transparent;
}

.level-card:hover .level-image {
  transform: scale(1.1) rotate(-5deg);
}

.level-name {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 0.68em;
  font-weight: 600;
  background: linear-gradient(135deg, #8cf0ff, #b8a5ff, #8cf0ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin: 3px 0;
  line-height: 1.2;
  min-height: 28px;
  max-width: 90px;
  margin-left: auto;
  margin-right: auto;
  word-wrap: break-word;
  animation: hologramText 3s ease-in-out infinite;
}

.level-number {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 1em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
}

.level-stars {
  font-size: 0.6em;
  letter-spacing: 1px;
  margin-top: 2px;
  min-height: 16px;
  color: #ffd700;
}

.game-header,
.level-selection-panel,
.phase-card,
.selection-card,
.cooking-card,
.recipe-display,
.challenge-section,
.selected-tray-section,
.active-level-banner,
.result-card,
.tutorial-card,
.credit-card,
.modal-content,

.confirm-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.game-header {
  position: sticky;
  top: 0;
}

.game-header::before,
.level-selection-panel::before,
.phase-card::before,
.selection-card::before,
.cooking-card::before,
.recipe-display::before,
.challenge-section::before,
.selected-tray-section::before,
.active-level-banner::before,
.result-card::before,
.tutorial-card::before,
.credit-card::before,
.modal-content::before,
.confirm-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.phase-card {
  background: rgba(20, 25, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 25px;
  padding: 25px;
  animation: fadeIn 0.5s ease;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.selection-card {
  background: rgba(20, 25, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.cooking-card {
  background: rgba(20, 25, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.phase-header h2 {
  color: #8cf0ff;
  font-size: 1.3em;
}

.phase-badge {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  padding: 6px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.04);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.timer-box {
  background: rgba(20, 25, 50, 0.4);
  padding: 8px 20px;
  border-radius: 30px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.timer-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #8cf0ff;
  font-family: monospace;
}

.recipe-display {
  background: rgba(20, 25, 50, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.recipe-display::-webkit-scrollbar {
  width: 6px;
}

.recipe-display::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.recipe-display::-webkit-scrollbar-thumb {
  background: rgba(100, 200, 255, 0.15);
  border-radius: 10px;
}

.recipe-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.recipe-header .recipe-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(100, 200, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.recipe-emoji {
  font-size: 3.5em;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.recipe-name {
  font-size: 1.6em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 3px;
}

.recipe-difficulty {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(100, 200, 255, 0.05);
  border: 1px solid rgba(100, 200, 255, 0.05);
  border-radius: 20px;
  color: #8cf0ff;
  margin-top: 5px;
  font-weight: 600;
  font-size: 0.85em;
}

.recipe-section {
  margin: 10px 0;
  position: relative;
  z-index: 1;
}

.recipe-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.recipe-section h3 {
  color: #8cf0ff;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  background: rgba(20, 25, 50, 0.3);
  padding: 5px 12px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8em;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
  background: rgba(100, 200, 255, 0.05);
}

.badge .item-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.steps-list {
  margin-bottom: 0;
  padding-bottom: 0;
}

.steps-list li {
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  margin: 4px 0;
  background: rgba(20, 25, 50, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.steps-list li:hover {
  transform: translateX(5px);
  background: rgba(100, 200, 255, 0.03);
}

.steps-list li:last-child {
  margin-bottom: 0;
}

.step-num {
  width: 26px;
  height: 26px;
  background: rgba(100, 200, 255, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8em;
  color: #8cf0ff;
  flex-shrink: 0;
  border: 1px solid rgba(100, 200, 255, 0.05);
}

.instruction-box {
  background: rgba(100, 200, 255, 0.03);
  border-left: 4px solid rgba(100, 200, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  position: relative;
  z-index: 1;
}

.challenge-instruction {
  background: rgba(100, 200, 255, 0.03);
  border-left: 4px solid rgba(100, 200, 255, 0.08);
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  position: relative;
  z-index: 1;
}

.challenge-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.selection-sections {
  grid-template-columns: repeat(2, 1fr);
}

.cooking-sections {
  grid-template-columns: 1fr;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {

  .challenge-sections,
  .selection-sections {
    grid-template-columns: 1fr;
  }
}

.challenge-section {
  background: rgba(20, 25, 50, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 15px;
  padding: 15px;
  max-height: 300px;
  overflow-y: auto;
  position: relative;
}

.challenge-section h3 {
  position: sticky;
  top: 0;
  z-index: 10;
  color: #8cf0ff;
  margin-bottom: 12px;
  font-size: 1em;
  padding: 8px 0;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-hint {
  position: sticky;
  top: 45px;
  z-index: 9;
  background: rgba(10, 15, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 0 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7em;
}

.step-section {
  max-height: 400px;
}

.challenge-section::-webkit-scrollbar {
  width: 5px;
}

.challenge-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.challenge-section::-webkit-scrollbar-thumb {
  background: rgba(100, 200, 255, 0.1);
  border-radius: 10px;
}

.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item-option {
  background: rgba(20, 25, 50, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 65px;
  max-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-option:hover {
  transform: scale(1.08);
  background: rgba(100, 200, 255, 0.05);
}

.item-option.selected {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  border-color: rgba(100, 200, 255, 0.15);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.item-option.selected .item-name {
  color: rgba(255, 255, 255, 0.9);
}

.item-option .item-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto 3px;
}

.item-emoji {
  font-size: 1.5em;
  display: block;
}

.item-name {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3px;
  max-width: 60px;
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-option {
  background: rgba(20, 25, 50, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8em;
}

.step-option:hover {
  transform: translateX(5px);
  background: rgba(100, 200, 255, 0.03);
}

.step-option.selected {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.step-order-badge {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8em;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.selected-tray {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 15px 0;
  position: relative;
  z-index: 1;
}

.selected-tray-section {
  flex: 1;
  min-width: 220px;
  background: rgba(20, 25, 50, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 15px;
  padding: 12px 15px;
}

.selected-tray-section h4 {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 0;
  border-radius: 6px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85em;
  font-weight: 600;
}

.selected-tray-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.tray-empty {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.tray-chip {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.1), rgba(200, 150, 255, 0.1));
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tray-chip:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(200, 150, 255, 0.2));
}

/* Buttons */
.btn-primary,
.btn-submit {
  width: 100%;
  padding: 12px;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-submit {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-primary::before,
.btn-submit::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      transparent 0deg,
      rgba(100, 200, 255, 0.05) 60deg,
      transparent 120deg,
      rgba(200, 150, 255, 0.05) 180deg,
      transparent 240deg,
      rgba(100, 255, 200, 0.05) 300deg,
      transparent 360deg);
  animation: hologramRotate 6s linear infinite;
  pointer-events: none;
}

.btn-primary:hover,
.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Result */
.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.result-card {
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 24px 28px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.result-card::-webkit-scrollbar {
  width: 2px;
}

.result-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.result-card::-webkit-scrollbar-thumb {
  background: rgba(100, 200, 255, 0.15);
  border-radius: 10px;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.result-emoji {
  font-size: 4em;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.result-emoji .result-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: bounce 1s ease-in-out infinite;
}

.result-card h2 {
  color: #8cf0ff;
  margin-bottom: 8px;
  font-size: 1.1em;
  letter-spacing: 0.5px;
}

.result-details {
  background: rgba(20, 25, 50, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.result-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.8);
  margin: 2px 0;
  font-size: 0.72em;
  padding: 1px 0;
  align-items: center;
}

.result-row .label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.result-row .value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-align: right;
  min-width: 50px;
}

.result-row.total {
  font-size: 0.85em;
  font-weight: bold;
  color: #8cf0ff;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 4px;
}

.result-row.total .value {
  color: #8cf0ff;
}

.result-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.03);
  margin: 4px 0;
}

.result-reward {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.05), rgba(200, 150, 255, 0.05));
  padding: 6px 12px;
  border-radius: 8px;
  margin-top: 6px;
  color: #8cf0ff;
  font-weight: bold;
  font-size: 0.7em;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.stars-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 4px;
  min-height: 40px;
}

.star {
  font-size: 37px;
  display: inline-block;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: rgba(255, 255, 255, 0.15);
  text-shadow: none;
  line-height: 1;
}

.star-1 {
  transition-delay: 0.05s;
}

.star-2 {
  transition-delay: 0.15s;
}

.star-3 {
  transition-delay: 0.25s;
}

@keyframes starPop {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.3) rotate(8deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.star-pop {
  animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.result-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-next,
.btn-retry,
.btn-back {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 70px;
  font-size: 0.65em;
}

.btn-next {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-retry {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-back {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-next:hover,
.btn-retry:hover,
.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

.confetti-circle {
  border-radius: 50%;
}

.confetti-square {
  border-radius: 2px;
}

.confetti-rectangle {
  border-radius: 2px;
  width: 6px;
  height: 12px;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(720deg) scale(0.3);
    opacity: 0;
  }
}

/* Shop */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 20px;
  padding: 30px;
  max-width: 450px;
  width: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
      rgba(100, 200, 255, 0.02) 0deg,
      rgba(200, 150, 255, 0.02) 60deg,
      rgba(100, 255, 200, 0.02) 120deg,
      rgba(255, 200, 100, 0.02) 180deg,
      rgba(200, 100, 255, 0.02) 240deg,
      rgba(100, 255, 200, 0.02) 300deg,
      rgba(100, 200, 255, 0.02) 360deg);
  animation: hologramRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.modal-content h2 {
  color: #8cf0ff;
  position: relative;
  z-index: 1;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5em;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  z-index: 1;
}

.close-modal:hover {
  transform: rotate(90deg);
  color: #8cf0ff;
}

.shop-list {
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin: 8px 0;
  background: rgba(20, 25, 50, 0.3);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.buy-btn {
  background: rgba(100, 200, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 5px 15px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-btn:hover {
  transform: scale(1.05);
  background: rgba(100, 200, 255, 0.15);
}

.timer-warning {
  animation: warningPulse 0.5s ease infinite;
  color: #ff6b35 !important;
}

@keyframes warningPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.music-small-btn {
  background: rgba(20, 25, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-small-btn:hover {
  background: rgba(100, 200, 255, 0.05);
  transform: scale(1.1);
}

.music-small-btn.active {
  background: rgba(100, 255, 200, 0.1);
  color: white;
  border-color: rgba(100, 255, 200, 0.15);
  animation: pulse-green 2s infinite;
}

.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.floating-notification {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  z-index: 2000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notification-content {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(200, 150, 255, 0.15));
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.notification-content span:first-child {
  font-size: 1.3em;
}

.chef-logo {
  width: 350px;
  height: auto;
  margin: 0 auto;
  display: block;
  animation: chefFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

@keyframes chefFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

.active-level-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(20, 25, 50, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  position: sticky;
  top: 130px;
  z-index: 99;
}

.active-level-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(100, 200, 255, 0.03);
  padding: 4px;
}

.active-level-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.active-level-tag {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  color: #8cf0ff;
}

.active-level-name {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.lives-display {
  font-size: 1.4em;
  letter-spacing: 4px;
  white-space: nowrap;
}

.desc-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  display: inline-block;
}

/* Untuk mobile */
@media (max-width: 768px) {
  .desc-icon {
    width: 18px;
    height: 18px;
    margin-right: 5px;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .game-container {
    padding: 15px;
    max-width: 100%;
  }

  .game-header {
    padding: 12px 18px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .chef-icon-img {
    width: 50px;
    height: 50px;
  }

  .game-stats {
    gap: 12px;
  }

  .stat {
    padding: 4px 12px;
    font-size: 0.85em;
  }

  .level-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 12px;
    max-height: 400px;
  }

  .level-card .level-image {
    width: 55px;
    height: 55px;
  }

  .level-name {
    font-size: 0.6em;
    min-height: 20px;
  }

  .phase-card {
    padding: 20px;
  }

  .phase-header h2 {
    font-size: 1.1em;
  }

  .phase-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .recipe-display {
    padding: 18px;
    max-height: 45vh;
  }

  .recipe-name {
    font-size: 1.3em;
  }

  .recipe-header .recipe-image {
    width: 60px;
    height: 60px;
  }

  .challenge-sections {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .challenge-section {
    max-height: 250px;
    padding: 14px;
  }

  .challenge-section h3 {
    font-size: 0.9em;
  }

  .item-option {
    min-width: 55px;
    max-width: 70px;
    padding: 6px 8px;
  }

  .item-option .item-icon {
    width: 32px;
    height: 32px;
  }

  .item-name {
    font-size: 0.55em;
  }

  .steps-container .step-option {
    font-size: 0.75em;
    padding: 6px 10px;
  }

  .selected-tray {
    flex-direction: column;
    gap: 10px;
  }

  .selected-tray-section {
    min-width: unset;
  }

  .result-card {
    padding: 25px;
    max-width: 380px;
  }

  .result-emoji .result-image {
    width: 100px;
    height: 100px;
  }

  .result-details {
    padding: 12px;
  }

  .result-row {
    font-size: 0.85em;
  }

  .result-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .result-buttons button {
    width: 100%;
  }

  .tutorial-card {
    padding: 25px;
    max-width: 420px;
  }

  .tutorial-header h2 {
    font-size: 1.1em;
  }

  .tutorial-step {
    padding: 8px 10px;
  }

  .tutorial-step h4 {
    font-size: 0.85em;
  }

  .tutorial-step p {
    font-size: 0.75em;
  }

  .credit-card {
    padding: 30px 25px;
    max-width: 420px;
  }

  .credit-photo {
    width: 100px;
    height: 100px;
  }

  .credit-content h2 {
    font-size: 1.1em;
    white-space: normal;
  }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
  .game-container {
    padding: 10px;
  }

  .landing-page {
    padding: 20px 15px;
    min-height: 100vh;
  }

  .chef-logo {
    width: 240px;
  }

  .game-title {
    font-size: 2em;
    letter-spacing: 2px;
    margin: 10px 0 5px;
  }

  .game-subtitle {
    font-size: 0.9em;
    margin-bottom: 20px;
  }

  .game-description {
    padding: 15px 20px;
    margin: 15px auto;
  }

  .game-description p {
    font-size: 0.85em;
    margin: 8px 0;
  }

  .star {
    font-size: 24px;
  }

  .stars-container {
    gap: 5px;
    min-height: 28px;
  }

  .btn-start {
    padding: 14px 30px;
    font-size: 1em;
  }

  .music-float-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    top: 12px;
    right: 12px;
  }

  .credit-toggle-btn {
    width: 38px;
    height: 38px;
    font-size: 1em;
    bottom: 12px;
    left: 12px;
  }

  .game-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 10px 14px;
    gap: 8px;
    border-radius: 16px;
  }

  .chef-info {
    justify-content: center;
    gap: 8px;
  }

  .chef-icon-img {
    width: 40px;
    height: 40px;
  }

  .chef-name {
    font-size: 0.9em;
  }

  .chef-stars {
    font-size: 0.7em;
  }

  #gamePlayPanel {
    padding-top: 260px;
    padding-bottom: 20px;
  }

  .game-stats {
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .stat {
    padding: 3px 10px;
    font-size: 0.75em;
  }

  .header-buttons {
    justify-content: center;
    gap: 6px;
  }

  .music-small-btn {
    width: 34px;
    height: 34px;
    font-size: 1em;
  }

  .back-home-btn {
    padding: 6px 14px;
    font-size: 0.75em;
  }

  .level-selection-panel {
    padding: 15px;
    border-radius: 16px;
  }

  .panel-header h2 {
    font-size: 1.3em;
  }

  .panel-header p {
    font-size: 0.85em;
  }

  .level-icon-header {
    width: 35px !important;
    height: 35px !important;
    margin-right: 6px !important;
  }

  .level-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    max-height: none;
    padding: 5px;
  }

  .level-card {
    padding: 8px 4px;
    border-radius: 12px;
  }

  .level-card .level-image {
    width: 40px;
    height: 40px;
  }

  .level-name {
    font-size: 0.5em;
    min-height: 16px;
    max-width: 65px;
  }

  .level-number {
    font-size: 0.7em;
  }

  .level-status {
    font-size: 0.5em;
  }

  .phase-card {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 12px;
  }

  .phase-header {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .phase-header h2 {
    font-size: 0.95em;
  }

  .phase-badge {
    font-size: 0.7em;
    padding: 4px 12px;
  }

  .timer-box {
    padding: 4px 14px;
    font-size: 0.8em;
  }

  .timer-value {
    font-size: 1.1em;
  }

  .recipe-display {
    padding: 12px;
    max-height: 55vh;
    overflow-y: auto;
    border-radius: 14px;
  }

  .recipe-header .recipe-image {
    width: 50px;
    height: 50px;
    border-width: 3px;
  }

  .recipe-emoji {
    font-size: 2.5em;
  }

  .recipe-name {
    font-size: 1.1em;
  }

  .recipe-difficulty {
    font-size: 0.7em;
    padding: 2px 10px;
  }

  .recipe-section {
    margin: 10px 0;
  }

  .recipe-section h3 {
    font-size: 0.85em;
    margin-bottom: 6px;
  }

  .badge {
    font-size: 0.65em;
    padding: 3px 8px;
    gap: 3px;
  }

  .badge .item-icon {
    width: 14px;
    height: 14px;
  }

  .steps-list li {
    font-size: 0.75em;
    padding: 6px 10px;
    margin: 4px 0;
  }

  .step-num {
    width: 20px;
    height: 20px;
    font-size: 0.65em;
  }

  .instruction-box {
    padding: 10px;
    font-size: 0.75em;
    margin: 10px 0;
  }

  .instruction-box p {
    margin: 3px 0;
  }

  .challenge-instruction {
    padding: 8px 12px;
    font-size: 0.8em;
    margin-bottom: 12px;
  }

  .challenge-sections {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .challenge-section {
    max-height: 280px;
    overflow-y: auto;
    height: auto;
    padding: 10px;
    border-radius: 12px;
  }

  .step-section {
    max-height: none !important;
    overflow-y: visible !important;
  }


  .challenge-section h3 {
    font-size: 0.8em;
    margin-bottom: 8px;
  }

  .items-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }

  .item-option {
    min-width: 0;
    max-width: none;
    padding: 4px 4px;
    border-radius: 10px;
  }

  .item-option .item-icon {
    width: 48px;
    height: 48px;
  }

  .item-emoji {
    font-size: 1.2em;
  }

  .item-name {
    font-size: 0.45em;
    max-width: 45px;
  }

  .steps-container {
    gap: 4px;
  }

  .step-option {
    font-size: 0.7em;
    padding: 5px 8px;
    gap: 6px;
    border-radius: 8px;
  }

  .step-order-badge {
    width: 20px;
    height: 20px;
    font-size: 0.7em;
  }

  .sub-hint {
    font-size: 0.6em;
  }

  .selected-tray {
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
  }

  .selected-tray-section {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .selected-tray-section h4 {
    font-size: 0.7em;
    margin-bottom: 4px;
  }

  .tray-chip {
    font-size: 0.6em;
    padding: 2px 8px;
  }

  .tray-empty {
    font-size: 0.65em;
  }

  .active-level-banner {
    padding: 8px 12px;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    justify-content: center;
    position: fixed;
    top: 160px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 100%;
    border-radius: 14px;
    z-index: 99;
  }

  .active-level-image {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 2px;
  }

  .active-level-tag {
    font-size: 0.65em;
  }

  .active-level-name {
    font-size: 0.85em;
  }

  .lives-display {
    font-size: 1em;
    letter-spacing: 2px;
  }

  .btn-primary,
  .btn-submit {
    padding: 10px;
    font-size: 0.85em;
    border-radius: 10px;
    margin-top: 8px;
  }

  .result-card {
    padding: 20px;
    max-width: 340px;
    border-radius: 20px;
  }

  .result-emoji .result-image {
    width: 160px !important;
    height: 160px !important;
  }

  .result-card h2 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .result-details {
    padding: 10px;
    margin: 10px 0;
  }

  .result-row {
    font-size: 0.75em;
    margin: 4px 0;
  }

  .result-row.total {
    font-size: 1em;
  }

  .result-reward {
    font-size: 0.85em;
    padding: 8px 12px;
  }

  .result-buttons {
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }

  .result-buttons button {
    padding: 8px;
    font-size: 0.8em;
    min-width: unset;
  }

  .modal-content {
    padding: 20px;
    max-width: 360px;
    border-radius: 16px;
  }

  .modal-content h2 {
    font-size: 1.1em;
  }

  .shop-item {
    padding: 8px 10px;
    font-size: 0.8em;
  }

  .buy-btn {
    padding: 3px 10px;
    font-size: 0.75em;
  }

  .tutorial-card {
    padding: 18px 20px;
    max-width: 360px;
    border-radius: 20px;
  }

  .tutorial-header .tutorial-emoji-img {
    width: 80px;
    height: 80px;
  }

  .tutorial-header h2 {
    font-size: 1em;
  }

  .tutorial-step {
    gap: 8px;
    padding: 6px 8px;
    margin: 4px 0;
  }

  .step-icon {
    font-size: 1.2em;
  }

  .tutorial-step h4 {
    font-size: 0.8em;
  }

  .tutorial-step p {
    font-size: 0.7em;
  }

  .tutorial-tips {
    padding: 6px 10px;
  }

  .tutorial-tips p {
    font-size: 0.7em;
  }

  .btn-start-level {
    padding: 10px;
    font-size: 0.85em;
  }

  .credit-card {
    padding: 25px 20px;
    max-width: 360px;
    border-radius: 20px;
  }

  .credit-photo {
    width: 80px;
    height: 80px;
  }

  .credit-content h2 {
    font-size: 1em;
  }

  .credit-role {
    font-size: 0.75em;
  }

  .credit-contact a {
    font-size: 0.75em;
  }

  .credit-course p {
    font-size: 0.65em;
  }

  .credit-footer p {
    font-size: 0.6em;
  }

  .close-credit {
    font-size: 1.5em;
    top: 10px;
    right: 15px;
  }

  .confirm-card {
    padding: 25px 20px;
    max-width: 340px;
    border-radius: 20px;
  }

  .confirm-icon-img {
    width: 100px;
    height: 100px;
  }

  .confirm-card h2 {
    font-size: 1.1em;
  }

  .confirm-card p {
    font-size: 0.85em;
  }

  .confirm-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .btn-confirm-yes,
  .btn-confirm-no {
    padding: 10px;
    font-size: 0.85em;
  }
}

@media (max-width: 768px) {
  .game-description {
    padding: 18px 20px;
  }

  .desc-item {
    font-size: 0.85em;
    gap: 10px;
    padding: 6px 0;
  }

  .desc-item .desc-icon {
    width: 20px;
    height: 20px;
  }

  .desc-item span {
    font-size: 0.85em;
  }
}

/* Small mobile (320px - 400px) */
@media (max-width: 420px) {
  .game-container {
    padding: 6px;
  }

  .level-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 5px;
  }

  .level-card .level-image {
    width: 32px;
    height: 32px;
  }

  .level-name {
    font-size: 0.45em;
    max-width: 55px;
  }

  .level-number {
    font-size: 0.6em;
  }

  .phase-card {
    padding: 10px;
  }

  .phase-header h2 {
    font-size: 0.8em;
  }

  .recipe-name {
    font-size: 0.95em;
  }

  .item-option {
    min-width: 40px;
    max-width: 50px;
    padding: 3px 4px;
  }

  .item-option .item-icon {
    width: 22px;
    height: 22px;
  }

  .item-name {
    font-size: 0.4em;
    max-width: 38px;
  }

  .step-option {
    font-size: 0.6em;
    padding: 4px 6px;
  }

  .result-card {
    padding: 15px;
    max-width: 300px;
  }

  .result-emoji .result-image {
    width: 60px;
    height: 60px;
  }

  .tutorial-card {
    padding: 15px;
    max-width: 320px;
  }
}