@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/*------------------------
  BASIC RESET & BODY
-------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: url('../images/background.webp') center/cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5em;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/*------------------------
  TYPOGRAPHY
-------------------------*/
h1, h2 {
  font-family: 'Bebas Neue', sans-serif;
  text-align: center;
  font-weight: normal;
  color: black;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 2.5em;
  margin: 0.5em 0;
}

/*------------------------
  GLASS CONTAINERS
-------------------------*/
.glass,
section.glass,
header.glass,
footer.glass {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1em;
  border-radius: 8px;
  width: 100%;
  margin: 20px 0;
  color: rgba(0, 0, 0, 0.87);
}

.full-width {
  width: 100%;
}

/*------------------------
  DICE AND INTERACTIONS
-------------------------*/
.dice-row,
.box-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.die-box {
  width: 80px;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.die-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Buttons for Dice Selection */
.die-button {
  cursor: pointer;
  transition: background 0.3s ease;
}

.die-button.disabled {
  background: rgba(180, 180, 180, 0.6);
  color: #666;
  pointer-events: none;
}

/* Result Display After Rolling */
.result-slot {
  background: rgba(255, 255, 255, 0.6);
  font-size: 2.4rem;
  color: black;
}

.rolled {
  font-size: 2.4rem;
}

.order-slot {
  font-size: 2.4rem;
}

/* Visual Feedback */
.locked {
  opacity: 0.6;
}

.disabled-result {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(100%);
}

/*------------------------
  OVERLAY AND LOSS FEEDBACK
-------------------------*/
.die-stack {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
}

.die-value {
  display: block;
  font-size: 2.4rem;
  text-align: center;
  z-index: 1;
}

.die-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  color: rgba(144, 0, 0, 0.6);
  z-index: 2;
  pointer-events: none;
}

.pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  color: rgba(144, 0, 0, 0.4);
  z-index: 2;
  pointer-events: none;
  display: none;
}

.loss-skull {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  color: rgba(192, 0, 0, 0.25);
  pointer-events: none;
}

/*------------------------
  RETRY BUTTON
-------------------------*/
#retry-btn {
  padding: 10px 20px;
  background-image: linear-gradient(to bottom, #ff8080 0%, #990000 100%);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
}

#retry-btn:hover {
  background-image: linear-gradient(to bottom, #ff9999 0%, #cc0000 100%);
}


.message-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  width: 300px;
  z-index: 999;
  text-align: center;
  padding: 1.5em;
  font-size: 1.2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 10px;
}

/*------------------------
  MESSAGE OVERLAY
-------------------------*/

#message-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  width: 300px;
  z-index: 999;
  text-align: center;
  padding: 1.5em;
  font-size: 1.2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#message-overlay p {
  margin-bottom: .0em;
  font-size: 1.4rem;
  font-family: 'Bebas Neue', sans-serif;
  color: black;
  text-align: center;
}

#message-close {
  padding: 0.5em 1.2em;
  font-size: 1rem;
  background: #990000;
  color: white;
  border: none;
  border-radius: 5px;
  font-family: 'Bebas Neue', sans-serif;
  cursor: pointer;
  margin-top: 0.5em;
}

#message-close:hover {
  background: #cc0000;
}

#message-text {
  font-size: 1.6rem;
  margin-bottom: 1.5em; /* NEW: adds space above OK button */
}

#message-text .subtext {
  display: block;
  font-size: 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  color: #333;
  margin-top: 0.2em;
  margin-bottom: 1.5em; /* Add THIS line */
  line-height: 1.1;
}

#message-text strong {
  font-size: 2.2rem;
  color: #990000;
  font-family: 'Bebas Neue', sans-serif;
  text-transform: uppercase;
  display: block;
  margin: 0.4em 0.05em;
  line-height: 1.1;
  text-align: center;
}

#message-text strong:last-child {
  margin-bottom: 1.5em;
}


/*------------------------
  FOOTER
-------------------------*/
footer {
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
