body {
  font-family: Arial, sans-serif;
  background: #f4f7f9;
  margin: 0;
  padding: 20px;
}
.container {
  max-width: 800px;
  margin: auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
h1 {
  text-align: center;
  color: #333;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  color: #555;
}
input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}
input:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0,123,255,0.5);
  outline: none;
}
#sim-form button {
  display: block;
  margin: 20px auto;
  background: #000;
  color: #fff;
  padding: 12px 30px;
  font-size: 1.2em;
  border: none;
  border-radius: 4px;
}
#btn-legal, #btn-back {
  display: block;
  margin: 20px auto;
  background: #000;
  color: #fff;
  padding: 12px 30px;
  font-size: 1.2em;
  border: none;
  border-radius: 4px;
}
button {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}
button:hover {
  background: #0056b3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#results {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  font-size: 16px;
}
#results table {
  width: 80%;
  border-collapse: collapse;
  margin: 0 auto;
}
#results th, #results td {
  padding: 10px 12px;
  text-align: center;
  border: 1px solid #aaa;
}
#results th {
  background: #000;
  color: #fff;
  text-transform: uppercase;
  font-size: 14px;
}
#results tr:nth-child(even) {
  background: #f5f5f5;
}
#results tr.total-row {
  background: #000;
  color: #fff;
  font-weight: bold;
}
canvas {
  margin-top: 30px;
  max-width: 100%;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Responsive mobile optimizations */
@media (max-width: 600px) {
  body { padding: 10px; }
  .container { padding: 15px; }
  h1 { font-size: 1.5em; }
  .form-group input,
  #sim-form button,
  #btn-legal,
  #btn-back {
    width: 100%;
    font-size: 1em;
    padding: 10px;
  }
  #results table {
    width: 80%;
    font-size: 14px;
  }
  #results { overflow-x: auto; }
  canvas { height: 300px; }
}
