body {
  font-family: 'Segoe UI', sans-serif;
  background: #f2f2f7;
  margin: 0;
  padding: 0;
  color: #333;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.back-btn {
  font-size: 18px;
  padding: 6px 12px;
  background-color: #eee;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

h1 {
  font-size: 20px;
}

.game-header {
  background: linear-gradient(to right, #1a1a2e, #16213e);
  color: white;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-banner {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #444;
}

.game-info {
  padding: 20px 50px;
  margin: -30px;
}

.input-section {
  background: #ffffff;
  padding: 16px;
  margin: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.input-section {
  position: relative;
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.input-section input[type="text"] {
    width: 93%;
}

.input-section input[type="number"] {
    width: 93%;
}

/* New label row with flexbox */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Rounded ? button */
.info-btn {
  background-color: #f1f1f1;
  border: 1px solid lightgray;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.guide-image {
  width: 90%;
  max-width: 350px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.input-section label {
  display: block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 14px;
}

.input-section input {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.error-text {
    color: red;
}

.diamond-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 12px;
}

.diamond-card {
  position: relative;
  display: flex;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  align-items: center;
  cursor: pointer;
  border: 1.5px solid transparent;
  width: 48%;
  max-width: 180px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: 0.2s ease;
}

.diamond-card {
  flex: 0 0 calc(50% - 10px); /* ✅ Two per row on mobile */
  max-width: calc(50% - 10px);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .diamond-card {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }
}

.diamond-card.selected {
  border-color: red;
  background-color: #f0f8ff;
}

.diamond-card:hover {
  transform: scale(1.01);
}

.discount-label {
  position: absolute;
  top: -6px;
  left: -6px;
  background: red;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 6px;
  z-index: 1;
}

.diamond-img {
  width: 38px;
  height: 38px;
  margin-right: 8px;
}

.diamond-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.diamond-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  line-height: 1.2;
}

.diamond-bonus {
  font-size: 12px;
  color: #555;
  margin: 2px 0;
}

.diamond-prices {
  display: flex;
  gap: 6px;
  align-items: center;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 12px;
}

.new-price {
  color: #007bff;
  font-size: 13px;
  font-weight: bold;
}

.pay-button {
  text-align: center;
  margin: 32px 0;
}

.pay-button {
  text-align: center;
  margin: 32px 0;
}

.pay-button button {
  padding: 14px 40px;
  font-size: 16px;
  background: linear-gradient(to right, #007bff, #00c6ff);
  color: white;
  border: 1px solid lightgray;
  border-radius: 25px;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.confirm-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
  }

  .confirm-popup {
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 14px;
  }

  .confirm-popup h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
  }

  .confirm-popup p {
    margin: 6px 0;
  }

  .popup-buttons {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
  }

  .popup-buttons button {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
  }

  .popup-buttons .cancel {
    background: #ddd;
  }

  .popup-buttons .confirm {
    background: #007bff;
    color: white;
  }

  .confirm-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.confirm-popup {
  background-color: rgba(255, 255, 255, 0.3); /* transparent white */
  backdrop-filter: blur(12px);               /* actual blur effect */
  -webkit-backdrop-filter: blur(12px);       /* Safari support */
  padding: 28px 22px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  width: 85%;
  max-width: 320px;
  min-height: 340px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirm-popup h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #222;
}

.confirm-popup p {
  font-size: 15px;
  margin: 12px 0; /* more Y-axis space */
  color: #444;
  line-height: 1.6;
}

.confirm-popup p strong {
  color: #000;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

.popup-buttons button {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.popup-buttons .cancel {
  background-color: #eee;
  color: #333;
  margin-right: 10px;
}

.popup-buttons .cancel:hover {
  background-color: #ddd;
}

.popup-buttons .confirm {
  background-color: #007bff;
  color: white;
}

.popup-buttons .confirm:hover {
  background-color: #0069d9;
}
