/* Default light mode */
body.light-mode {
  background-color: #f5f5f5;
  color: #333;
}

.light-mode .card, .light-mode .result-card {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.light-mode .app-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #333;
}

.light-mode #action-popup {
  background-color: #fff;
  color: #333;
}

.light-mode .priority {
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

.dark-mode .card, .dark-mode .result-card {
  background-color: #1e1e1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dark-mode .app-header {
  background-color: #1e1e1e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #e0e0e0;
}

.dark-mode button {
  background-color: #35bb31;
}

.dark-mode button:hover {
  background-color: #258322;
}

.dark-mode #action-popup {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

.dark-mode #action-popup .action-options img {
  filter: brightness(0.8);
}

.dark-mode #action-popup .action-options img:hover {
  filter: brightness(1);
}

.dark-mode .priority {
  color: #e0e0e0;
  background-color: #1e1e1e;
  border: 1px solid #ccc;
}

/* Common styles for both modes */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
  transition: filter 0.3s ease;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: inherit;
  z-index: 1000;
  position: sticky;
  top: 0;
}

.app-header .logo {
  font-size: 32px;
  font-weight: bold;
  flex: 1;
  text-align: left;
}

.github-link-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.github-link {
  display: flex;
  justify-content: center;
  align-items: center;
}

.github-link a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.github-link a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .github-link a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#github-icon {
  transition: fill 0.3s ease;
}

.light-mode #github-icon {
  fill: #24292f;
}

.dark-mode #github-icon {
  fill: #ffffff;
}

.mode-toggle {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

#mode-icon {
  margin-top: 6px;
  margin-right: 8px;
}

/* Toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  margin-left: 8px;
}

.card {
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.result-card {
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.result-card.visible {
  opacity: 1;
  visibility: visible;
}

h2, h3 {
  color: inherit;
  margin-top: 0;
  margin-bottom: 10px;
}

button {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 5px;
}

button:hover {
  background-color: #0056b3;
}

.input-field {
  padding: 10px;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: inherit;
  color: inherit;
}

/* Adjusting image size within the instruction section */
.instruction-set .action-icon {
  width: 64px;
  height: 64px;
}

.actions-container img {
  width: 64px;
  height: 64px;
  margin: 5px;
}

select {
  padding: 10px;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid inherit;
}

.instruction-set {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.instruction-set img {
  margin-right: 10px;
}

.action-icon {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.action-icon:hover {
  transform: scale(1.1);
}

#action-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  width: 90%;
  max-width: 520px;
}

#action-popup.hidden {
  display: none;
}

#action-popup .action-popup-content h3 {
  margin-bottom: 20px;
  text-align: left;
}

#action-popup .action-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

#action-popup .action-options img {
  width: 64px;
  height: 64px;
  margin: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#action-popup .action-options img:hover {
  transform: scale(1.1);
}

.popup-button {
  display: block;
  margin-left: auto;
  margin-top: 20px;
}

/* Blur everything except the popup */
.blurred {
  filter: blur(5px);
  pointer-events: none;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #35bb31;
}

input:checked + .slider:before {
  transform: translateX(14px);
}

/* Media query for mobile devices */
@media (max-width: 768px) {
  #action-popup {
    width: 80%;
    max-width: 80%;
  }

  .app-header {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
    position: relative;  /* Remove sticky positioning for mobile */
  }

  .app-header .logo {
    font-size: 24px;
    flex: none;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .mode-toggle {
    flex: none;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  #mode-icon {
    margin-top: 8px;
    margin-right: 4px;
  }

  .switch {
    margin-left: 4px;
  }

  .github-link-container {
    position: static;
    transform: none;
    margin: 10px 0;
  }
}