body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a1a; /* Dark background */
  color: #f0f0f0; /* Light text */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.container {
  width: 80%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
}

.policy-content {
  width: 100%;
  max-width: 1200px;
  text-align: left;
}

.policy-content .container {
  max-width: none;
  width: 100%;
  align-items: center;
  gap: 20px;
  flex: 1;
}

h1, h2 {
  color: #6c63ff; /* A pleasant purple */
  margin: 20px 0;
  text-align: center;
}

/* Site icon styling */
.site-icon {
  height: 1.2em;
  width: auto;
  margin-right: 0.3em;
  vertical-align: text-top;
  display: inline-block;
}

/* Page title styling */
h1 a {
  text-decoration: none;
  color: #6c63ff;
}

h1 a:hover {
  text-decoration: none;
  color: #6c63ff;
}

.system-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.system-button {
  background-color: #6c63ff; /* Purple */
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1.1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.system-button:hover {
  background-color: #574fd8; /* Darker purple */
}

.dice-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.dice-buttons form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.dice-buttons button {
  background-color: #6c63ff; /* Purple */
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1.1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dice-buttons button:hover {
  background-color: #574fd8; /* Darker purple */
}

.dice-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.dice-form form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.dice-input {
  padding: 10px;
  font-size: 1em;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 200px;
}

.dice-form button {
  background-color: #007bff; /* Blue */
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dice-form button:hover {
  background-color: #0056b3; /* Darker blue */
}

.roll-results {
  width: 100%;
  max-width: 600px;
  background-color: #2a2a2a; /* Slightly lighter dark shade */
  border: 1px solid #444;
  border-radius: 8px;
  padding: 20px;
  min-height: 150px;
  text-align: left;
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
  box-sizing: border-box;
  margin: 0 auto;
}

.roll-results p {
  margin: 0;
}

.footer {
  margin-top: auto;
  padding: 0 10px 10px 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  color: #aaa;
}

/* Section Dividers */
.section-divider {
  border: none;
  height: 1px;
  background-color: #444;
  margin: 40px auto;
  width: 80%;
  max-width: 600px;
}

.footer .section-divider {
  margin: 20px auto 15px auto;
}

/* Utility classes */
.hidden {
  display: none;
}

/* Responsive adjustments for limited-width screens */
@media (max-width: 768px) {
  .container {
    width: 92%;
    max-width: none;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 0 8px;
  }

  .system-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .system-button {
    flex: 1 1 45%;
    min-width: 140px;
  }

  .dice-buttons {
    gap: 10px;
  }

  .dice-buttons form {
    flex: 1 1 45%;
    min-width: 140px;
  }

  .dice-buttons button {
    width: 100%;
    max-width: 100%;
  }

  .dice-form {
    width: 100%;
  }

  .dice-form form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .dice-input {
    width: 100%;
    box-sizing: border-box;
  }

  .dice-form button {
    width: 100%;
  }

  .roll-results {
    padding: 12px;
    min-height: 100px;
    font-size: 0.95em;
  }

  .footer {
    width: 100%;
    padding: 12px;
  }

  .section-divider {
    margin: 30px auto;
    width: 90%;
  }
}

/* Monitoring Dashboard Styles */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.metric-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
  border-left: 4px solid #007cba;
  transition: all 0.3s ease;
  position: relative;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.metric-card.error-card {
  border-left-color: #dc3545;
}

.metric-value {
  font-size: 2em;
  font-weight: bold;
  color: #007cba;
}

.error-card .metric-value {
  color: #dc3545;
}

.metric-label {
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

.error-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5em;
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .system-button,
  .dice-buttons button,
  .dice-form button {
    padding: 10px 12px;
    font-size: 1em;
  }
}
