* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column; /* Allow footer to stay at the bottom */
  justify-content: center; /* Center vertically */
  align-items: center; /* Center horizontally */
  min-height: 100vh; /* Ensure body takes up at least full height */
}

.container {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 95%; /* Increased width for better visibility on larger screens */
  max-width: 500px; /* Increased max width for larger screens */
  margin: 20px; /* Ensure margin at the top */
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2em; /* Increased font size */
}

input[type="text"] {
  width: 100%; /* Full width for input */
  height: 60px; /* Fixed height for input */
  padding: 15px; /* Increased padding for input */
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1.2em; /* Increased font size */
}

button {
  height: 60px; /* Fixed height for button */
  padding: 15px 20px; /* Increased padding for button */
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em; /* Increased font size */
  transition: background-color 0.3s; /* Smooth background change */
  width: 100%; /* Full width for button */
}

button:hover {
  background-color: #218838;
}

#result {
  margin-top: 20px;
}

#significantCount, #significantDigits {
  font-weight: bold;
  color: #333;
}

/* Rules Section Styling */
#rules {
  margin-top: 30px; /* Space above the rules section */
  text-align: left; /* Align text to the left for better readability */
}

.toggle-button {
  background-color: #007bff; /* Button color for dropdown */
  color: white;
  border: none;
  border-radius: 5px;
  padding: 15px 20px; /* Increased padding */
  cursor: pointer;
  width: 100%; /* Full width for dropdown button */
  margin-bottom: 10px;
  font-size: 1.2em; /* Increased font size */
}

.rules-content {
  display: none; /* Initially hidden */
  border: 1px solid #ccc; /* Border around the content */
  border-radius: 5px;
  padding: 10px; /* Padding for the content */
}

.rules-content ul {
  list-style-type: none; /* Remove bullet points */
  padding: 0; /* Remove padding */
}

.rules-content li {
  margin: 10px 0; /* Space between rules */
}

/* Footer Styling */
footer {
  margin-top: 20px;
  font-size: 1em; /* Increased font size */
  color: #555;
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
  h1 {
      font-size: 1.5em; /* Smaller font size for mobile */
  }
}
