/* Card hover */

.card {
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* Smooth theme transition */

html {
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* =========================
   Dark Mode Toggle (NUCLEAR)
   ========================= */

/* Kill the native checkbox completely */

#dark-mode {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

/* Switch container */

.switch {
  position: relative !important;
  display: inline-block !important;
  width: 50px !important;
  height: 26px !important;
}

/* Slider background */

.slider {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  cursor: pointer !important;
  background-color: #ccc !important;
  border-radius: 26px !important;
  transition: 0.25s !important;
}

/* Slider knob */

.slider::before {
  content: "" !important;
  position: absolute !important;
  height: 20px !important;
  width: 20px !important;
  left: 3px !important;
  bottom: 3px !important;
  background: white !important;
  border-radius: 50% !important;
  transition: 0.25s !important;
}

/* Checked state */

#dark-mode:checked + .slider {
  background-color: #4caf50 !important;
}

#dark-mode:checked + .slider::before {
  transform: translateX(24px) !important;
}

/* Unauthorized page */
.unauthorized-container {
  max-width: 500px;
  margin: 100px auto;
  text-align: center;
}

.unauthorized-container h1 {
  margin-bottom: 1rem;
}

.unauthorized-container p {
  margin-bottom: 2rem;
}

.btn-primary {
  padding: 10px 20px;
  background: #444;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.dice-container {
  text-align: center;
  padding: 40px;
}

#dice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 16px;
  max-width: 500px;
  margin: auto;
}

.dice-btn {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
  padding: 14px 0;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 #111;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}

.dice-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

.dice-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #111;
}

/* Duality just bigger — not colored */

.duality-btn {
  grid-column: span 2;
  font-weight: 600;
  letter-spacing: .04em;
}

#result {
  font-size: 44px;
  font-weight: 700;
  margin-top: 40px;
  display: none;
}

#details {
  margin-top: 10px;
  font-size: 18px;
  opacity: 0.8;
  display: none;
}

#history {
  margin-top: 40px;
  text-align: center;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  display: none;
}

#history::before {
  content: "Roll History (last 5)";
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: .08em;
  opacity: 0.5;
}

.history-item {
  padding: 10px 0;
  font-size: 14px;
  transition: opacity .2s ease;
}

/* Short centered divider */

.history-item:not(:first-child) {
  border-top: 1px solid #3a3a3a;
  margin: 0 auto;
  width: 60%;
}

/*Shield Icon*/
.clip-shield {
  clip-path: polygon(
    50% 0%,
    90% 20%,
    90% 60%,
    50% 100%,
    10% 60%,
    10% 20%
  );
}