/* === Global page styles === */
body {
  background: radial-gradient(circle at top, #262637 0, #11111b 40%, #05050a 100%);
  color: #f0f0f8;
  font-family: Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* subtle vignette around edges */
body::before {
  content: "";
  position: fixed;
  background: radial-gradient(circle at center, transparent 0, transparent 45%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: -1;
}

.container {
  text-align: center;
  padding: 40px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
}

/* noir-ish heading & tagline */
h1 {
  font-size: 2.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
}

.container > p:first-of-type {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* section that holds dice + button + message */
.dice-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 28px 40px 36px;
  border-radius: 24px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.04) 0, rgba(6, 6, 16, 0.96) 60%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

/* row of dice */
#dice {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 10px 0 10px;
  perspective: 800px;  /* camera distance for 3D */
  position: relative;
}

/* "table" glow under the dice */
#dice::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 130px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0, transparent 75%);
  filter: blur(8px);
  z-index: -1;
}



.die {
  width: 120px;
  height: 120px;
  margin: 0 20px;
  position: relative;
  
  /* NEW: tilt the whole die for a more natural view */
  transform-style: preserve-3d;
  transform: rotateX(-45deg) rotateY(20deg);
}

/* glow on win */
.die.win .face {
  box-shadow: 0 0 25px #00ff66;
  border-color: #00ff66;
}


.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.4s ease-out;
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  border: 2px solid #000000;
  border-radius: 16px;
  /* inset outline + soft outer shadow (no hard seams) */
  box-shadow:
    inset 0 0 0 3px #000000,
    0 6px 20px rgba(0, 0, 0, 0.25);

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* position each face in 3D
   cube is 120px deep -> half = 60px, add 1px to hide seams */
.front  { transform: translateZ(61px); }
.back   { transform: rotateY(180deg) translateZ(61px); }
.right  { transform: rotateY(-90deg) translateZ(61px); }
.left   { transform: rotateY(90deg) translateZ(61px); }
.top    { transform: rotateX(90deg) translateZ(61px); }
.bottom { transform: rotateX(-90deg) translateZ(61px); }




/* base pip: small black circle */
.pip {
  width: 16px;
  height: 16px;
  background-color: #000000;
  border-radius: 50%;
  position: absolute;
  opacity: 0; /* hidden by default */
}

/* positions (7 spots on the die) */
.pip-1 { top: 20%; left: 20%; }   /* top-left */
.pip-2 { top: 20%; right: 20%; }  /* top-right */
.pip-3 { top: 50%; left: 20%; transform: translateY(-50%); }  /* middle-left */
.pip-4 { top: 50%; left: 50%; transform: translate(-50%, -50%); } /* center */
.pip-5 { top: 50%; right: 20%; transform: translateY(-50%); } /* middle-right */
.pip-6 { bottom: 20%; left: 20%; }  /* bottom-left */
.pip-7 { bottom: 20%; right: 20%; } /* bottom-right */


/* 1: center */
.face-1 .pip-4 { opacity: 1; }

/* 2: top-left, bottom-right */
.face-2 .pip-1,
.face-2 .pip-7 { opacity: 1; }

/* 3: top-left, center, bottom-right */
.face-3 .pip-1,
.face-3 .pip-4,
.face-3 .pip-7 { opacity: 1; }

/* 4: four corners */
.face-4 .pip-1,
.face-4 .pip-2,
.face-4 .pip-6,
.face-4 .pip-7 { opacity: 1; }

/* 5: four corners + center */
.face-5 .pip-1,
.face-5 .pip-2,
.face-5 .pip-4,
.face-5 .pip-6,
.face-5 .pip-7 { opacity: 1; }

/* 6: three left + three right (no center) */
.face-6 .pip-1,
.face-6 .pip-2,
.face-6 .pip-3,
.face-6 .pip-5,
.face-6 .pip-6,
.face-6 .pip-7 { opacity: 1; }



button {
  padding: 14px 30px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  border: none;
  background: linear-gradient(#ffffff, #d9d9d9);
  color: #000;
  cursor: pointer;

  box-shadow: 0 6px 0 #b4b4b4, 0 6px 20px rgba(0,0,0,0.5);
  transition: 0.15s ease-in-out;
  margin-top: 20px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #b4b4b4, 0 12px 25px rgba(0,0,0,0.6);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 0 #b4b4b4, 0 4px 10px rgba(0,0,0,0.5);
}

#message {
  margin-top: 10px;
  font-size: 18px;
}

#enterLink {
  display: inline-block;
  margin-top: 15px;
  padding:8px 16px;
  border: 1px solid #f0f0f8;
  text-decoration: none;
  color: #f0f0f8;
}

