/* General Page Styling */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f8f9fb;
  color: #333;
  display: flex;             /* allows sticky footer */
  flex-direction: column;
  min-height: 100vh;         /* full viewport height */
}

header {
  background: #004080;
  color: #fff;
  padding: 15px 30px;
}

header h1 {
  margin: 0;
  font-size: 1.6em;
}

/* Navigation */
.topnav {
  margin-top: 10px;
}

.topnav a {
  color: #fff;
  padding: 8px 15px;
  text-decoration: none;
  display: inline-block;
}

.topnav a.active, .topnav a:hover {
  background: #0066cc;
  border-radius: 4px;
}

.dropdown {
  display: inline-block;
  position: relative;
}

.dropdown .dropbtn {
  background: none;
  border: none;
  color: #fff;
  padding: 8px 15px;
  font-size: 1em;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 1;
}

.dropdown-content a {
  color: #333;
  padding: 10px;
  display: block;
  text-decoration: none;
}

.dropdown-content a:hover {
  background: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 30px auto;
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  flex: 1;                   /* fills remaining space so footer stays at bottom */
}

/* Headings */
h2 {
  margin-top: 0;
  color: #004080;
}

.equation {
  font-family: "Courier New", monospace;
  background: #f4f6f9;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Inputs */
.inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

label {
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input {
  padding: 5px;
  margin-left: 10px;
  flex: 1;
}

/* Buttons */
.btn-row {
  margin: 15px 0;
}

button {
  background: #004080;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
}

button:hover {
  background: #0066cc;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 15px;
}

table, th, td {
  border: 1px solid #ddd;
}

th {
  background: #004080;
  color: #fff;
}

td, th {
  padding: 8px;
  text-align: center;
}

tbody tr:nth-child(even) {
  background: #f9f9f9;
}

/* Canvas */
canvas {
  margin-top: 25px;
}
/* Footer */
footer {
  background: #666;         /* gray background */
  color: white;
  text-align: center;
  padding: 15px 0;
  border-top: 1px solid #ccc;
  width: 100%;
  margin-top: auto;         /* pushes footer to bottom */
  font-size: 0.9em;
}
