:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --background-color: #f5f5f5;
  --text-color: #333;
  --border-color: #ddd;
  --success-color: #2ecc71;
  --error-color: #e74c3c;
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo {
  margin-right: 15px;
}

h1,
h2,
h3 {
  color: var(--secondary-color);
}

h1 {
  font-size: 24px;
  margin: 0;
}

.description {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 5px;
}

.input-group {
  margin-bottom: 20px;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--secondary-color);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
}

.file-drop-area {
  border: 2px dashed var(--primary-color);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
}

.file-drop-area:hover,
.file-drop-area.dragover {
  background-color: rgba(52, 152, 219, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
}

.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 5px;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background-color: #2980b9;
}

button i {
  margin-right: 5px;
}

.secondary-button {
  background-color: var(--secondary-color);
}

.secondary-button:hover {
  background-color: #34495e;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

#output {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: monospace;
  white-space: pre-wrap;
  background-color: white;
}

.error-message {
  color: var(--error-color);
  margin-top: 10px;
  font-weight: bold;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.progress-bar {
  width: 100%;
  background-color: #f3f3f3;
  padding: 3px;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
}

.progress-bar .progress {
  display: block;
  height: 22px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: width 500ms ease-in-out;
}

#recent-conversions {
  margin-top: 30px;
}

#recent-conversions h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

#recent-list {
  list-style-type: none;
  padding: 0;
}

#recent-list li {
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

#recent-list li:hover {
  background-color: #f0f0f0;
}

.delete-conversion {
  background-color: var(--error-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-conversion:hover {
  background-color: #c0392b;
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  color: #333; /* Dark text color for light mode */
}

.modal-content h2,
.modal-content h3,
.modal-content p,
.modal-content li {
  color: #333; /* Ensure all text in modal is dark in light mode */
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: #000;
  text-decoration: none;
}

footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 20px 0;
  margin-top: 40px;
}

footer nav ul {
  list-style-type: none;
  padding: 0;
}

footer nav ul li {
  display: inline;
  margin: 0 10px;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--success-color);
  color: white;
  padding: 15px;
  border-radius: 5px;
  z-index: 1000;
}

/* Dark mode styles */
body.dark-mode {
  --background-color: #1a1a1a;
  --text-color: #f0f0f0;
  --border-color: #444;
}

.dark-mode .input-group,
.dark-mode #output,
.dark-mode #recent-list li,
.dark-mode .modal-content {
  background-color: #2c2c2c;
}

.dark-mode input[type="text"],
.dark-mode textarea {
  background-color: #3c3c3c;
  color: var(--text-color);
  border-color: var(--border-color);
}

.dark-mode .file-drop-area:hover,
.dark-mode .file-drop-area.dragover {
  background-color: rgba(52, 152, 219, 0.2);
}

.dark-mode #recent-list li:hover {
  background-color: #3c3c3c;
}

body.dark-mode .modal-content {
  background-color: #2c2c2c;
  color: #f0f0f0; /* Light text color for dark mode */
  border-color: #444;
}

body.dark-mode .modal-content h2,
body.dark-mode .modal-content h3,
body.dark-mode .modal-content p,
body.dark-mode .modal-content li {
  color: #f0f0f0; /* Ensure all text in modal is light in dark mode */
}

/* Adjust close button color for better visibility in dark mode */
body.dark-mode .close-modal {
  color: #f0f0f0;
}

body.dark-mode .close-modal:hover,
body.dark-mode .close-modal:focus {
  color: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header-content {
    flex-direction: column;
  }

  .logo {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Additional styles for extension and exclude detection */
.input-with-button {
  display: flex;
  align-items: center;
}

.input-with-button input {
  flex-grow: 1;
  margin-right: 10px;
}

#detected-extensions,
#detected-excludes {
  margin-top: 10px;
}

.checkbox-wrapper {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 5px;
}

.checkbox-wrapper label {
  margin-left: 5px;
}
