/* ===================================================
   3D Çift Zar CSS Animasyonları ve Perspektif
   =================================================== */

.dice-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  perspective: 1000px;
  margin: 10px 0;
}

.dice-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dice-label {
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 3D Küp Sahnesi */
.dice-scene {
  width: 90px;
  height: 90px;
  perspective: 600px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.2, 0.85, 0.3, 1.15);
}

.cube-face {
  position: absolute;
  width: 90px;
  height: 90px;
  background: #FFFFFF;
  border: 4px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  user-select: none;
  overflow: hidden;
  box-sizing: border-box;
}

/* 3D Küp Yüz Pozisyonları (Küp Boyutu: 90px -> Yarıçap: 45px) */
.cube-face.front  { transform: rotateY(0deg) translateZ(45px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(45px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(45px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(45px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(45px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(45px); }

/* --- Zar 1 (Anlatım Türü) Yüz Stilleri --- */
.face-act {
  background: #F0FFF4;
  border-color: #38A169;
  color: #22543D;
}
.face-act .icon { font-size: 30px; }
.face-act .text { font-size: 11px; font-weight: 800; text-transform: uppercase; margin-top: 2px; }

.face-draw {
  background: #FFFAF0;
  border-color: #ED8936;
  color: #7B341E;
}
.face-draw .icon { font-size: 30px; }
.face-draw .text { font-size: 11px; font-weight: 800; text-transform: uppercase; margin-top: 2px; }

.face-describe {
  background: #FAF5FF;
  border-color: #805AD5;
  color: #44337A;
}
.face-describe .icon { font-size: 30px; }
.face-describe .text { font-size: 11px; font-weight: 800; text-transform: uppercase; margin-top: 2px; }

/* --- Zar 2 (Adım Sayısı) Yüz Stilleri ve Noktalar (Pips) --- */
.dice2-face {
  display: grid;
  padding: 10px;
}
.dice2-face.pips-1 {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #38A169;
}
.dice2-face.pips-1 .pip {
  width: 22px;
  height: 22px;
  background: #38A169;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
}

.dice2-face.pips-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-color: #ED8936;
}
.dice2-face.pips-2 .pip:nth-child(1) { grid-area: 1 / 1; justify-self: start; align-self: start; }
.dice2-face.pips-2 .pip:nth-child(2) { grid-area: 2 / 2; justify-self: end; align-self: end; }

.dice2-face.pips-3 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  border-color: #805AD5;
}
.dice2-face.pips-3 .pip:nth-child(1) { grid-area: 1 / 1; }
.dice2-face.pips-3 .pip:nth-child(2) { grid-area: 2 / 2; }
.dice2-face.pips-3 .pip:nth-child(3) { grid-area: 3 / 3; }

.dice2-face.pips-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-color: #38A169;
}
.dice2-face.pips-4 .pip:nth-child(1) { grid-area: 1 / 1; }
.dice2-face.pips-4 .pip:nth-child(2) { grid-area: 1 / 2; justify-self: end; }
.dice2-face.pips-4 .pip:nth-child(3) { grid-area: 2 / 1; align-self: end; }
.dice2-face.pips-4 .pip:nth-child(4) { grid-area: 2 / 2; justify-self: end; align-self: end; }

.dice2-face.pips-5 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  border-color: #ED8936;
}
.dice2-face.pips-5 .pip:nth-child(1) { grid-area: 1 / 1; }
.dice2-face.pips-5 .pip:nth-child(2) { grid-area: 1 / 3; }
.dice2-face.pips-5 .pip:nth-child(3) { grid-area: 2 / 2; }
.dice2-face.pips-5 .pip:nth-child(4) { grid-area: 3 / 1; }
.dice2-face.pips-5 .pip:nth-child(5) { grid-area: 3 / 3; }

.dice2-face.pips-6 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  border-color: #805AD5;
}
.dice2-face.pips-6 .pip:nth-child(1) { grid-area: 1 / 1; }
.dice2-face.pips-6 .pip:nth-child(2) { grid-area: 1 / 2; justify-self: end; }
.dice2-face.pips-6 .pip:nth-child(3) { grid-area: 2 / 1; align-self: center; }
.dice2-face.pips-6 .pip:nth-child(4) { grid-area: 2 / 2; justify-self: end; align-self: center; }
.dice2-face.pips-6 .pip:nth-child(5) { grid-area: 3 / 1; align-self: end; }
.dice2-face.pips-6 .pip:nth-child(6) { grid-area: 3 / 2; justify-self: end; align-self: end; }

.dice2-face .pip {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.3);
}

.pips-2 .pip, .pips-5 .pip { color: #DD6B20; }
.pips-3 .pip, .pips-6 .pip { color: #6B46C1; }
.pips-4 .pip { color: #2F855A; }

/* Yuvarlanma Titreme ve Zemin Gölgesi */
.dice-shadow {
  width: 75px;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  margin-top: 4px;
  transition: transform 1.2s cubic-bezier(0.2, 0.85, 0.3, 1.15), opacity 0.3s;
}

.rolling .dice-shadow {
  transform: scale(0.6);
  opacity: 0.25;
}
