/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2d3748;
}

h2 {
  color: #2d3748;
  font-weight: 600;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

/* Card Styles */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.card-content {
  padding: 1.5rem;
}

/* Input Styles */
.input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .input-grid {
      grid-template-columns: 1fr 1fr;
  }
}

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

.input-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.hint {
  font-size: 0.875rem;
  color: #718096;
  margin-top: 0.5rem;
}

.btn-calculate {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-top: 1.5rem;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-calculate:hover {
  background-color: #3182ce;
}

.alert-error {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #fed7d7;
  color: #c53030;
  border-radius: 4px;
}

/* Results Section */
.results-section {
  margin-top: 2rem;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}

.tab-btn, .reset-zoom-btn {
  padding: 0.75rem;
  background-color: #e2e8f0;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
.reset-zoom-btn{
  cursor: pointer;
  margin-top: 20px;
  font-size: 20px !important;
  border-radius: 5px;
}
.tab-btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.tab-btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.tab-btn.active {
  background-color: #4299e1;
  color: white;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .results-grid {
      grid-template-columns: 1fr 1fr;
  }
}

.converged {
  color: #38a169;
}

.not-converged {
  color: #e53e3e;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  background-color: #f7fafc;
  font-weight: 600;
}

tr:hover {
  background-color: #f7fafc;
}

/* Chart Styles */
.chart-container {
  height: 500px; /* Increased height for better visibility */
  width: 100%;
  margin-bottom: 1.5rem;
}

.method-explanation {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.method-explanation p {
  color: #718096;
  font-size: 0.95rem;
}

/* Step Navigation */
.visualization-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.step-navigation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-btn {
  padding: 0.5rem 0.75rem;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background-color: #3182ce;
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#stepIndicator {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a5568;
}

.step-info {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f7fafc;
  border-radius: 4px;
  border-left: 4px solid #4299e1;
}

.step-info p {
  color: #4a5568;
  font-size: 0.95rem;
}