/* General Reset */
body, h1, h2, p, div, section, header, footer {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: linear-gradient(to bottom, #f5f9fc, #dfeaf5);
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}
@media (prefers-color-scheme: dark) {
  body {
    color: #f5f5f5;
    background: linear-gradient(to bottom, #121212, #1e2024);
  }
  header {
    background-color: #16202a;
  }
  #controls {
    background-color: #1e2933;
    color: #f5f5f5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
  #controls label {
    color: #d1d5db;
  }
  #canvas-wrapper {
    background-color: #1e2933;
    border: 2px solid #374151;
  }
  footer {
    background-color: #16202a;
    color: #f5f5f5;
  }
  footer a {
    color: #38bdf8;
  }
  footer a:hover {
    color: #0ea5e9;
  }
}
header {
  text-align: center;
  background-color: #1e81b0;
  color: white;
  padding: 20px 15px;
}
header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}
header p {
  font-size: 1rem;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}
#controls {
  background-color: #e6f4ff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}
#controls h2 {
  font-size: 1.5rem;
  color: #064663;
  margin-bottom: 15px;
}
#controls label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #064663;
}
#controls input[type="range"] {
  width: 100%;
}
.control-button {
  margin: 10px 5px 0 0;
  padding: 10px;
  font-size: 1rem;
  color: white;
  background-color: #1e81b0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.control-button:hover {
  background-color: #145a7b;
}
#canvas-container {
  width: 100%;
  max-width: 800px;
}
#canvas-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: white;
  border: 2px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#canvas-wrapper:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 129, 176, 0.7);
}
#canvas-container h2 {
  font-size: 1.5rem;
  color: #064663;
}
footer {
  text-align: center;
  padding: 15px;
  background-color: #1e81b0;
  color: white;
  margin-top: 20px;
}
footer p {
  margin: 5px 0;
}
footer a {
  color: #a8d8ef;
}
footer a:hover {
  text-decoration: underline;
}  