/* Import modern font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header/Explanation Section */
.explanation {
  background-color: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 3rem 0;
}

.explanation-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.explanation-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.explanation-content p {
  color: #475569;
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
}

/* Links */
.elegant-link {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.elegant-link:hover {
  border-color: #2563eb;
}

/* Content Grid */
.content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

/* Input Section */
.input-pane {
  background-color: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  height: fit-content;
}

.input-pane h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
}

input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background-color: #fff;
}

input[type="number"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="number"]:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
}

/* Button Styling */
button {
  width: 100%;
  padding: 0.875rem;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover:not(:disabled) {
  background-color: #1d4ed8;
}

button:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* Results Cards */
.card {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
}

th,
td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background-color: #f8fafc;
  font-weight: 500;
  color: #475569;
}

td {
  color: #1e293b;
}

/* Additional Explanation Section */
.additional-explanation {
  background-color: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  margin: 2rem 0;
}

.additional-explanation h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.additional-explanation p {
  margin-bottom: 1rem;
  color: #475569;
}

/* Error Messages */
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 1rem;
  }

  .explanation-content {
    padding: 0 1rem;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #fff;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
}
