body {
  direction: rtl;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to bottom, #f0f4ff, #d2e0f4);
  color: #333;
  text-align: center;
  padding: 20px;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

h1 {
  color: #4b0082;
  margin-bottom: 10px;
}

p {
  background-color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
  padding: 15px;
  width: 60%;
  margin: 0 auto 20px auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.rules {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  padding: 10px;
  width: 60%;
  margin: 10px auto;
  border-radius: 8px;
}

.score_rule {
  background-color: cornflowerblue;
  color: white;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.9em;
  margin-right: 10px;
}

.results-container {
  margin: 30px auto;
}

.div {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  font-size: 2em;
  font-weight: bold;
  display: inline-block;
  text-align: center;
  line-height: 100px;
  margin: 0 15px;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.div:hover {
  transform: scale(1.1);
}

.red {
  background-color: #e74c3c;
}
.green {
  background-color: #27ae60;
}
.yellow {
  background-color: #f1c40f;
}

#score-display {
  font-size: 1.5em;
  font-weight: bold;
  margin: 20px;
}

.buttons-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

button {
  height: 60px;
  width: 160px;
  font-size: 1.1em;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#try-luck-button {
  background-color: #8e44ad;
}
#reset-button {
  background-color: #2980b9;
}
#home-button {
  background-color: #16a085;
}

button:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
