/* =====================================================
   CSS: KURIR NUSANTARA (Bab Budaya - Seni Tradisional)
   ===================================================== */
#screen-kurir {
  --stage: #0f1626;
  --stage-deep: #080c17;
  --indigo: #3a4f86;
  --sogan: #9c5a2c;
  --mendung: #2a86ad;
  --truntum: #dba53a;
  --sekar: #d0552c;
  --paper: #faf3e2;
  --gold: #e0a72e;
  --danger: #d1483a;
  --ok: #4a8f5c;
  --ink: #f6ecd4;

  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  background: var(--stage-deep);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  width: 100%;
  height: 100%;
  position: relative;
}

#kurir-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--stage-deep);
  background-image: url('../assets/images/backgrounds/bg-peta1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

#kurir-game {
  position: absolute;
  inset: 0;
  display: block;
}

.kurir-rotate-hint {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  background: var(--stage-deep);
  color: var(--ink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 30px;
}

.kurir-rotate-hint .icon {
  font-size: 40px;
  animation: kurirRotHint 1.6s ease-in-out infinite;
}

@keyframes kurirRotHint {

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

  50% {
    transform: rotate(90deg);
  }
}

.kurir-rotate-hint p {
  font-size: 13.5px;
  color: rgba(246, 236, 212, 0.8);
  max-width: 260px;
  margin: 0;
}

@media (orientation: portrait) and (max-width: 820px) {
  .kurir-rotate-hint {
    display: flex;
  }
}

.kurir-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 14px 14px 0;
  z-index: 5;
  pointer-events: none;
  font-weight: 700;
  align-items: flex-start;
}

.kurir-hud-left {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  /* Memastikan tombol quit bisa diklik */
}

.kurir-hud-right {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.kurir-hud .block {
  background: rgba(10, 6, 17, 0.55);
  border: 1px solid rgba(224, 167, 46, 0.35);
  border-radius: 12px;
  padding: 6px 11px;
  backdrop-filter: blur(3px);
  text-align: center;
  min-width: 58px;
}

.kurir-hud .block .n {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  display: block;
  line-height: 1.1;
  color: #FFFDF5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.kurir-hud .block .l {
  font-size: 8.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
  opacity: 0.95;
}

.kurir-timebar {
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--sekar));
  z-index: 6;
  transition: width .2s linear;
}

.kurir-toast {
  position: absolute;
  top: 84px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 6;
  pointer-events: none;
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 20px;
  opacity: 0;
  transform: translateY(-6px) scale(.9);
  transition: opacity .15s ease, transform .15s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.kurir-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.kurir-toast.ok {
  color: var(--ok);
}

.kurir-toast.bad {
  color: var(--danger);
}

.kurir-joy-base {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(244, 223, 161, 0.35);
  background: rgba(244, 223, 161, 0.06);
  z-index: 7;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
}

.kurir-joy-knob {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(244, 223, 161, 0.55);
  z-index: 8;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
}

.kurir-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 6, 17, 0.65);
  backdrop-filter: blur(4px);
}

.kurir-panel.hidden {
  display: none;
}

.kurir-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 36px;
  background: radial-gradient(ellipse at 50% 40%, rgba(45, 28, 20, 0.95), rgba(18, 12, 28, 0.98));
  border: 2px solid rgba(224, 167, 46, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  gap: 12px;
  max-width: 520px;
  width: 90%;
  animation: kurirPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes kurirPopIn {
  0% {
    transform: scale(0.8) translateY(10px);
    opacity: 0;
  }

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

.kurir-eyebrow {
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  opacity: .9;
}

.kurir-popup h1 {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(28px, 9vw, 38px);
  margin: 2px 0 4px;
  color: var(--paper);
  text-shadow: 0 0 30px rgba(224, 167, 46, 0.3);
}

.kurir-popup p {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(246, 236, 212, 0.85);
  max-width: 420px;
  margin: 0;
}

.kurir-stars-wrap {
  display: flex;
  gap: 16px;
  margin: 12px 0;
}

.kurir-star {
  font-size: 54px;
  color: #33261d;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
}

.kurir-star.on {
  color: #fce277;
  text-shadow: 0 0 24px rgba(252, 226, 119, 0.9);
  animation: kurirStarPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes kurirStarPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

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

.kurir-stat-row {
  display: flex;
  gap: 20px;
  margin: 6px 0 2px;
}

.kurir-stat {
  text-align: center;
}

.kurir-stat b {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  color: var(--paper);
}

.kurir-stat span {
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}

button.kurir-cta {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  background: linear-gradient(180deg, var(--gold), #a9781a);
  color: #2a1a05;
  border: none;
  border-radius: 14px;
  padding: 13px 28px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 6px 0 #6d4d10, 0 12px 24px rgba(0, 0, 0, 0.4);
}

button.kurir-cta:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #6d4d10;
}

.kurir-legend-row {
  display: flex;
  gap: 10px;
  margin: 8px 0 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.kurir-legend-row .kurir-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 4px 9px 4px 5px;
}

.kurir-legend-row .kurir-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}