/* ===== Main Container ===== */
#main-container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 0;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center !important;
}

/* ===== Scoreboard Layout ===== */
.scoreboard {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: nowrap; /* row me force */
}

/* ===== Score Cards + Timer ===== */
.score-card,
.timer-card {
  flex: 1;
  height: 80px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  padding: 8px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Current Score */
.score-card.current {
  background: linear-gradient(180deg, #1e90ff, #0073e6); /* Blue */
}

/* Best Score */
.score-card.best {
  background: linear-gradient(180deg, #0a2342, #001f3f); /* Dark Navy */
}

/* Timer */
.timer-card {
  background: linear-gradient(180deg, #34c759, #28a745); /* Green */
}

/* Label + Value */
.score-card .label,
.timer-card .label {
  font-size: 14px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.score-card .value,
.timer-card .value {
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-zone {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-card img {
  width: 18px;
  height: 18px;
}

/* ===== Spinner ===== */
#spinner {
  width: 300px;
  height: 300px;
  margin: 0 auto;
  border-radius: 50%;
  background: url("../img/fidget-spinner.png") no-repeat center center;
  background-size: contain;
  cursor: grab;
  transition: transform 0.5s ease-out;

  /* Extra Styling */
  box-shadow: 0 10px 25px rgba(0,0,0,0.35), inset 0 4px 10px rgba(255,255,255,0.3);
  background-color: #f8f8f8;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;   
}

#spinner:hover {
  transform: scale(1.05);
}

#spinner:active {
  cursor: grabbing;
}

/* drag ke dauran globally selection/scroll off */
body.dragging {
  user-select: none !important;
  -webkit-user-select: none !important;
  overflow: hidden !important;
}

/* ===== Popup Overlay ===== */
.spinner-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 99999999;
}

.spinner-popup.active {
  display: flex;
}

/* ===== Popup Box ===== */
.spinner-popup-content {
  background: #fff;
  color: #333;
  padding: 30px 20px;
  border-radius: 16px;
  width: 320px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  animation: popIn 0.3s ease-out;
}

.spinner-popup-content h2 {
  margin: 0 0 20px;
  font-size: 38px;
  font-weight: bold;
  color: #222;
  width: 100% !important;
}

.spinner-popup-content p {
  margin: 8px 0;
  font-size: 16px;
  color: #555;
}

.spinner-popup-content button {
  margin-top: 18px;
  padding: 10px 38px;
  font-size: 20px;
  border: none;
  border-radius: 8px;
  background: #28a745;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

.spinner-popup-content button:hover {
  background: #07cb17;
}

/* ===== Animation for Smooth Entry ===== */
@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* info box  */
.footer-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #d0e6f0;
  color: #2c3e50;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  max-width: 600px;
  margin: 32px auto 0px auto;
  box-sizing: border-box;
}

.footer-info-box .icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background-color: #a9cce3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1b4f72;
  font-size: 18px;
}

.footer-info-box .text {
  flex: 1;
  line-height: 1.4;
}
.footer-info-box .text h3{
  margin-bottom: 5px !important;
}


/* ===== Responsive Design ===== */

/* Tablet large */
@media (max-width: 992px) {
  .score-card, .timer-card {
    height: 70px;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
  }
  .score-card .label, .timer-card .label {
    font-size: 13px;
  }
  .score-card .value, .timer-card .value {
    font-size: 18px;
  }
  #spinner {
    width: 260px;
    height: 260px;
  }
}

/* Tablet medium */
@media (max-width: 768px) {
  .hero-section{
    margin: 0 !important;
  }
  .scoreboard {
    gap: 12px;
  }
  .score-card, .timer-card {
    height: 65px;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }
  .score-card .label, .timer-card .label {
    font-size: 12px;
  }
  .score-card .value, .timer-card .value {
    font-size: 16px;
  }
  #spinner {
    width: 240px;
    height: 240px;
  }
}

/* Mobile medium */
@media (max-width: 600px) {
  .scoreboard {
    gap: 10px;
  }
  .score-card, .timer-card {
    height: 60px;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
  }
  .score-card .label, .timer-card .label {
    font-size: 11px;
  }
  .score-card .value, .timer-card .value {
    font-size: 15px;
  }
  #spinner {
    width: 220px;
    height: 220px;
  }
}

/* Mobile small */
@media (max-width: 480px) {
  .scoreboard {
    gap: 8px;
  }
  .score-card, .timer-card {
    height: 55px;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }
  .score-card .label, .timer-card .label {
    font-size: 10px;
  }
  .score-card .value, .timer-card .value {
    font-size: 14px;
  }
  #spinner {
    width: 200px;
    height: 200px;
  }
}

/* Extra small 350px */
@media (max-width: 350px) {
  .scoreboard {
    gap: 6px;
  }
  .score-card, .timer-card {
    height: 50px;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    padding: 6px;
  }
  .score-card .label, .timer-card .label {
    font-size: 10px;
  }
  .score-card .value, .timer-card .value {
    font-size: 13px;
  }
  #spinner {
    width: 180px;
    height: 180px;
  }
}

/* Very small 320px */
@media (max-width: 320px) {
  .scoreboard {
    gap: 5px;
  }
  .score-card, .timer-card {
    height: 48px;
    width: 85px;
    min-width: 85px;
    max-width: 85px;
    padding: 5px;
  }
  .score-card .label, .timer-card .label {
    font-size: 9px;
  }
  .score-card .value, .timer-card .value {
    font-size: 12px;
  }
  #spinner {
    width: 160px;
    height: 160px;
  }
}
