.dice-tool {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: white;
}

.dice-container {
  background: white;
  padding: 5vh;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  max-width: 1400px;
  transition: transform 0.3s ease;
}

.dice-title {
  font-size: min(5vw, 48px);
  font-weight: 600;
  margin-bottom: 40px;
  color: var(--color-primary);
}

.dice-options {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.dice-option {
  padding: 12px 24px;
  font-size: min(3vw, 18px);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-background);
  cursor: pointer;
  transition: all 0.2s;
}

.dice-option:hover {
  background: var(--color-background-dark);
  transform: translateY(-2px);
}

.dice-option.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.dice-display {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.dice {
  width: min(20vw, 150px);
  height: min(20vw, 150px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(10vw, 80px);
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  transition: transform 0.5s ease;
}

.dice.rolling {
  animation: roll 0.5s ease-in-out;
}

.dice-dot {
  position: absolute;
  width: 20%;
  height: 20%;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.dice-dot-1 { top: 20%; left: 20%; }
.dice-dot-2 { top: 20%; right: 20%; }
.dice-dot-3 { top: 50%; left: 20%; }
.dice-dot-4 { top: 50%; right: 20%; }
.dice-dot-5 { bottom: 20%; left: 20%; }
.dice-dot-6 { bottom: 20%; right: 20%; }
.dice-dot-7 { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.dice-controls {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.roll-btn {
  padding: min(3vh, 16px) min(4vw, 32px);
  font-size: min(3vw, 20px);
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: min(20vw, 150px);
}

.roll-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.dice-history {
  margin-top: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.history-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--color-text);
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
}

.history-item:last-child {
  border-bottom: none;
}

.history-roll {
  font-weight: 600;
  color: var(--color-primary);
}

@keyframes roll {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  50% { transform: rotateX(180deg) rotateY(180deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

@media (max-width: 768px) {
  .dice-options {
    flex-direction: column;
    align-items: center;
  }
  
  .dice-option {
    width: 100%;
  }
}
