body {
  font-family: Arial, sans-serif;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

body.dark-mode {
  background-color: #1f2937;
  color: #e5e7eb;
}

.container {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

body.dark-mode .container {
  background-color: #374151;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

h1, h3 {
  text-align: center;
  color: #2563eb;
  margin-bottom: 20px;
}

body.dark-mode h1, body.dark-mode h3 {
  color: #60a5fa;
}

.input-group {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #2563eb;
  font-weight: bold;
}

body.dark-mode label {
  color: #60a5fa;
}

input[type="text"], input[type="number"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
  background-color: #4b5563;
  border-color: #6b7280;
  color: #e5e7eb;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563eb;
}

body.dark-mode input:focus, body.dark-mode select:focus, body.dark-mode textarea:focus {
  border-color: #60a5fa;
}

.item-group {
  background-color: #f0f7ff;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

body.dark-mode .item-group {
  background-color: #4b5563;
}

.item-group input[type="number"] {
  width: 30%;
}

.toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  padding: 8px 16px;
  background-color: #9ca3af;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

body.dark-mode .slider {
  background-color: #6b7280;
}

.toggle input:checked + .slider {
  background-color: #10b981;
}

.toggle input:checked + .slider::before {
  content: 'Flat Discount';
}

.toggle input:not(:checked) + .slider::before {
  content: 'Percentage Discount';
}

body.dark-mode .toggle input:checked + .slider {
  background-color: #34d399;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

button {
  flex: 1;
  padding: 10px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

body.dark-mode button {
  background-color: #60a5fa;
}

button:hover {
  background-color: #1e40af;
}

body.dark-mode button:hover {
  background-color: #3b82f6;
}

.results {
  margin-top: 20px;
  padding: 15px;
  background-color: #f0f7ff;
  border-radius: 4px;
  text-align: center;
}

body.dark-mode .results {
  background-color: #4b5563;
}

.results p {
  margin: 10px 0;
  color: #2563eb;
  font-size: 1.1em;
}

body.dark-mode .results p {
  color: #60a5fa;
}

.results span {
  font-weight: bold;
}

.error {
  color: #dc2626;
  text-align: center;
  margin-top: 10px;
}

.notification {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

.notification.success {
  background-color: #d1fae5;
  color: #065f46;
}

.history {
  margin-top: 20px;
}

.history-item {
  background-color: #f0f7ff;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-mode .history-item {
  background-color: #4b5563;
}

.history-item select {
  width: auto;
}

.back-button {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #2563eb;
  text-decoration: none;
  font-weight: bold;
}

body.dark-mode .back-button {
  color: #60a5fa;
}

.back-button:hover {
  color: #1e40af;
}

body.dark-mode .back-button:hover {
  color: #3b82f6;
}

.footer-note {
  text-align: center;
  margin-top: 20px;
  color: #4b5563;
  font-size: 0.9em;
}

body.dark-mode .footer-note {
  color: #9ca3af;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-left: 5px;
  color: #2563eb;
}

body.dark-mode .tooltip {
  color: #60a5fa;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #2563eb;
  color: white;
  text-align: center;
  border-radius: 4px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

body.dark-mode .tooltip .tooltip-text {
  background-color: #60a5fa;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}