/* Custom Stylesheet for Fuel Cell Predictor */

:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --white-color: #ffffff;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --body-bg-light: #f8f9fa;
  --body-bg-dark: #121212;
  --card-bg-light: #ffffff;
  --card-bg-dark: #2d2d2d;
}

/* General Styling */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

body[data-bs-theme="light"] {
  background-color: var(--body-bg-light);
  color: var(--dark-color);
}

body[data-bs-theme="dark"] {
  background-color: var(--body-bg-dark);
  color: var(--light-color);
}

/* Navbar Styling */
#mainNav {
  transition: all 0.3s;
  padding: 0.8rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body[data-bs-theme="light"] #mainNav {
  background-color: #fff;
}

body[data-bs-theme="dark"] #mainNav {
  background-color: #1e1e1e;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

body[data-bs-theme="light"] .navbar-brand {
  color: var(--primary-color);
}

body[data-bs-theme="dark"] .navbar-brand {
  color: var(--white-color);
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
}

body[data-bs-theme="light"] .theme-toggle {
  color: var(--dark-color);
}

body[data-bs-theme="dark"] .theme-toggle {
  color: var(--white-color);
}

/* Card Styling */
.card {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

body[data-bs-theme="light"] .card {
  background-color: var(--card-bg-light);
}

body[data-bs-theme="dark"] .card {
  background-color: var(--card-bg-dark);
}

.card-header {
  font-weight: 600;
  padding: 1rem 1.5rem;
}

/* Input Styling */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body[data-bs-theme="dark"] .form-control,
body[data-bs-theme="dark"] .form-select {
  background-color: #3a3a3a;
  color: #ffffff;
  border-color: #444;
}

/* Range Input Styling */
.form-range {
  height: 1.5rem;
  margin-bottom: 1rem;
}

.form-range::-webkit-slider-runnable-track {
  height: 0.5rem;
  border-radius: 0.25rem;
}

.form-range::-webkit-slider-thumb {
  height: 1.25rem;
  width: 1.25rem;
  margin-top: -0.375rem;
}

body[data-bs-theme="dark"] .form-range::-webkit-slider-runnable-track {
  background-color: #444;
}

body[data-bs-theme="dark"] .form-range::-webkit-slider-thumb {
  background-color: var(--primary-color);
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Loading Spinner */
.spinner-border {
  margin-right: 0.5rem;
}

/* Table Styling */
.table {
  border-radius: 10px;
  overflow: hidden;
}

body[data-bs-theme="dark"] .table {
  color: #eee;
}

body[data-bs-theme="dark"] .table th,
body[data-bs-theme="dark"] .table td {
  border-color: #444;
}

/* Results Display */
.result-container {
  border-radius: 8px;
}

.table-bordered {
  border-radius: 0.5rem;
  overflow: hidden;
}

.table thead {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

body[data-bs-theme="dark"] .table thead {
  background-color: rgba(255, 255, 255, 0.05);
}

.result-container .card {
  transition: transform 0.2s ease;
}

.result-container .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body[data-bs-theme="dark"] .result-container .card:hover {
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.05);
}

.result-container .display-5 {
  font-weight: 600;
  margin-bottom: 0;
}

/* Plot Container */
#plot-container {
  width: 100%;
  min-height: 400px;
}

#plot {
  width: 100%;
  min-height: 500px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .display-5 {
    font-size: 2rem;
  }

  .card-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .form-group {
    margin-bottom: 1.5rem;
  }

  .display-5 {
    font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .display-5 {
    font-size: 1.5rem;
  }
}

.icon-block {
  padding: 0 15px;
}

.icon-block .material-icons {
  font-size: inherit;
}
