/* Dice Modal Styles */
.dice-modal.modal-dialog {
  margin: 1.75rem auto;
  max-width: 600px;
}

.dice-modal-content {
  background: none;
  border-radius: 12px;
  box-shadow: none;
  border: none;
}

.dice-modal-body {
  padding: 15px;
  color: white;
  font-family: 'Arial', sans-serif;
  border-radius: 5px;
  background: linear-gradient(to top, #540808, #890e0e);
  border: 1px solid #faedd5;
}

/* Header Section */
.dice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dice-instructions {
  display: flex;
  gap: 0;
}

.dice-direction {
  /* flex: 1; */
  text-align: center;
}

.direction-tab {
  display: block;
  text-decoration: none;
  cursor: pointer;
  padding: 10px;
  transition: all 0.3s ease;
}

.direction-tab:hover {
  text-decoration: none;
}

.direction-tab.active .direction-text {
  color: white;
  /* text-decoration: underline; */
  border-bottom: 1px solid #fff;
}

.direction-tab:not(.active) .direction-text {
  color: #a77a7a;
}

.direction-text {
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  color: white;
  display: block;
}

.dice-numbers {
  display: flex;
}

.number-box {
  border: 1px solid #fff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  flex: 1;
}

.prediction-wrap {
  flex: 1;
  align-items: center;
}

.lucky-wrap {
  flex: 1;
  align-items: center;
}

.prediction-box {
  margin-right: -1px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.lucky-box {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;

}

.number-display {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.prediction-box .number-label {
  color: #d21b1b;
}

.lucky-box .number-display {
  color: #f9ecd4;
}

.number-label {
  font-size: 0.8rem;
  color: white;
  text-transform: uppercase;
  font-weight: 500;
}

/* Instructions */
.dice-instructions {
  text-align: center;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  padding: 5px;
  justify-content: center;
}

.dice-instructions p {
  color: white;
  font-size: 12px;
  margin: 0;

}

/* Input Fields */
.dice-inputs {
  margin-bottom: 2rem;
}

.input-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-group {
  flex: 1;
}

.input-label {
  display: block;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.dice-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #8B0000;
  border-radius: 6px;
  background: white;
  color: #8B0000;
  font-size: 1rem;
  text-align: center;
  transition: border-color 0.3s ease;
}

.dice-input:focus {
  outline: none;
  border-color: #D4B89A;
  box-shadow: 0 0 0 2px rgba(212, 184, 154, 0.2);
}

.dice-input[readonly] {
  background: #f8f9fa;
  color: #830d0d;
}

.input-hint {
  font-size: 0.75rem;
  color: rgb(255, 255, 255);
  margin-top: 0.25rem;
  text-align: center;
  width: 100%;
}

/* Action Buttons */
.dice-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.btn-dice-roll {
  background: #D4B89A;
  color: #8B0000;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.btn-dice-roll:hover {
  background: #C4A889;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-dice-roll:active {
  transform: translateY(0);
}

.btn-dice-close {
  background: #B22222;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-dice-close:hover {
  background: #A01E1E;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-dice-close:active {
  transform: translateY(0);
}

.dice-modal-footer {
  border-top: none;
}

.dice-img-display img {
  display: block;
  margin: 0px auto;
}

/* Responsive Design */
@media (max-width: 576px) {
  .dice-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .dice-modal-body {
    padding: 1.5rem;
  }


  .prediction-wrap {
    flex-direction: column-reverse;
    grid-gap: 10px;
  }

  .lucky-wrap {
    flex-direction: column;
    grid-gap: 10px;
  }

  .dice-numbers {
    margin: 0;
    width: 100%;
    justify-content: center;
  }

  .number-box {
    width: 100%;
    padding: 0.75rem;
  }

  .number-display {
    font-size: 2rem;
  }

  .input-row {
    gap: 0.75rem;
  }

  .btn-dice-roll {
    min-width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .dice-modal-body {
    padding: 1rem;
  }

  .number-display {
    font-size: 2.75rem;
  }

  .number-label {
    font-size: 18px;
  }

  .direction-text {
    font-size: 1rem;
  }
}

/* Animation for number changes */
.number-display {
  transition: all 0.3s ease;
}

.number-display.rolling {
  animation: rollAnimation 0.5s ease-in-out;
}

@keyframes rollAnimation {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Focus states for accessibility */
.btn-dice-roll:focus,
.btn-dice-close:focus {
  outline: 2px solid #D4B89A;
  outline-offset: 2px;
}

.dice-input:focus {
  outline: none;
  border-color: #D4B89A;
  box-shadow: 0 0 0 2px rgba(212, 184, 154, 0.2);
}