/* Reset some defaults */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  color: #212529;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: flex-start;
}

.container {
  max-width: 900px;
  width: 100%;
  background: #fff;
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
  color: #222;
}

.calc-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.input-row {
  display: flex;
  gap: 20px;
  flex: 1 1 100%;
  justify-content: center;
}

label {
  font-weight: 600;
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  color: #333;
}

input[type="number"] {
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 5px;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

button[type="submit"] {
  cursor: pointer;
  background: #007bff;
  border: none;
  color: #fff;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  transition: background-color 0.3s;
  flex: 1 1 100%;
  max-width: 240px;
  margin: 0 auto;
  display: block;
}

button[type="submit"]:hover {
  background: #0056b3;
}

.result {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
  color: #222;
}

/* Responsive canvas styles */
canvas#graphCanvas {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
