* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
  box-sizing: border-box;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  padding: 10px;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.subtitle {
  font-size: 1rem;
  color: #7f8c8d;
  max-width: 95%;
  margin: 0 auto;
}

.main-content {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.control-panel {
  flex: 1;
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dice-display {
  flex: 2;
  background: white;
  border-radius: 15px;
  padding: 25px;
  min-height: 400px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.history-panel {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.panel-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f2f3;
}

.control-group {
  margin-bottom: 25px;
}

.container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #34495e;
}

.container input[type="range"] {
  width: 100%;
  margin: 10px 0;
  height: 8px;
  -webkit-appearance: none;
  background: #e0e7ff;
  border-radius: 5px;
  outline: none;
}

.container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: #4a69bd;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.container input[type="range"]::-webkit-slider-thumb:hover {
  background: #3c5aa6;
}

.value-display {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #4a69bd;
  background: #f0f4ff;
  padding: 8px;
  border-radius: 8px;
  margin-top: 5px;
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.roll-btn {
  background: #4a69bd;
  color: white;
}

.roll-btn:hover {
  background: #3c5aa6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.4);
}

.reset-btn {
  background: #e74c3c;
  color: white;
}

.reset-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.dice {
  width: 150px;
  height: 150px;
  background: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3.5rem;
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.dice img {
  width: 100%;
  height: 100%;
}


.dice.rolling {
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(-5px, 5px) rotate(-10deg);
  }

  50% {
    transform: translate(5px, -5px) rotate(10deg);
  }

  75% {
    transform: translate(-5px, 5px) rotate(-10deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.dice-value {
  font-size: 2.5rem;
  font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th,
td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: #666;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  color: #4a69bd;
}

td img{
  width: 45px;
  height: 45px;
}


tr:hover {
  background: #f8f9ff;
}

.stats {
  display: flex;
  justify-content: space-around;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #4a69bd;
}

.stat-label {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.clear-btn {
  flex: none;
  background: #95a5a6;
  color: white;
  width: 200px;
  padding: 12px 20px;
  border-radius: 8px;
}

.clear-btn:hover {
  background: #7f8c8d;
}

.counter {
  font-size: 1.1rem;
  color: #7f8c8d;
  display: flex;
  align-items: center;
}

.counter span {
  font-weight: bold;
  color: #4a69bd;
  margin: 0 5px;
}

.instructions {
  background: #fff8e1;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  border-left: 4px solid #ffc107;
}

.instructions h3 {
  margin-bottom: 10px;
  color: #e65100;
}

.instructions ul {
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 8px;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

