.flt-tool {
  max-width: 900px;
  margin: 1.5em auto;
  padding: 1.5em;
  color: #FFFFFF;
  background-color: #202020; /* Explicitly set if not inherited */
  border-radius: 8px;
  display: grid;
  gap: 1.5em;
}

.flt-tool label, .flt-tool .flt-section-title {
  font-weight: bold;
  margin-bottom: 0.6em;
  display: block;
  color: #FFFFFF;
}

.flt-input-section textarea,
.flt-output-section textarea {
  width: 100%;
  min-height: 150px;
  font-family: monospace;
  padding: 0.75em;
  resize: vertical;
  box-sizing: border-box;
  background-color: #2B2B2B;
  color: #FFFFFF;
  border: 1px solid #404040;
  border-radius: 4px;
}
.flt-tool textarea::placeholder { color: #AAAAAA; }

.flt-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
  gap: 1.5em;
  align-items: start; /* Align items at the start of their grid cell */
}

.flt-processing-options label,
.flt-sorting-options label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
  font-weight: normal;
  cursor: pointer;
}
.flt-processing-options input[type="checkbox"],
.flt-sorting-options input[type="radio"] {
  margin-top: -1px;
  transform: scale(1.1);
  accent-color: #555555; /* Darker accent for checkboxes/radios */
}

.flt-tld-filter-options .flt-checkbox-group,
.flt-word-filter-options {
  margin-top: 0.2em; /* Space below its label */
}

.flt-checkbox-group { /* For TLDs */
  max-height: 150px;
  overflow-y: auto;
  padding: 0.75em;
  border: 1px solid #404040;
  border-radius: 4px;
  background-color: #2B2B2B;
}
.flt-checkbox-group label {
  display: flex;
  align-items: center;
  margin-bottom: 0.4em;
  font-weight: normal;
  cursor: pointer;
  gap: 0.5em;
}
.flt-checkbox-group label:last-child { margin-bottom: 0; }
.flt-checkbox-group input[type="checkbox"] { margin: 0; transform: scale(1.1); }
.flt-tld-placeholder { color: #AAAAAA; font-style: italic; padding: 0.2em; }


#flt-filter-words-input {
  width: 100%;
  padding: 0.6em;
  box-sizing: border-box;
  background-color: #2B2B2B;
  color: #FFFFFF;
  border: 1px solid #404040;
  border-radius: 4px;
  margin-bottom: 0.5em;
}
.flt-word-filter-logic {
  display: flex;
  gap: 0.5em;
}
.flt-word-filter-logic .flt-logic-btn {
  flex-grow: 1;
  background-color: #484848;
  border: 1px solid #585858;
  opacity: 0.7;
}
.flt-word-filter-logic .flt-logic-btn.active {
  background-color: #686868;
  border-color: #787878;
  opacity: 1;
  font-weight: bold;
}

.flt-actions-row {
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
  margin-top: 1em;
  justify-content: flex-start;
}

.flt-tool button {
  padding: 0.7em 1.4em;
  cursor: pointer;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  transition: opacity 0.2s ease, transform 0.1s ease;
  min-width: 120px;
}
.flt-tool button:hover { opacity: 0.85; }
.flt-tool button:active { transform: translateY(1px); }

.flt-button-process  { background-color: #C0392B; /* Red */ }
.flt-button-copy     { background-color: #2980B9; /* Blue */ }
.flt-button-download { background-color: #27AE60; /* Green */ }

.flt-output-section > label strong { color: #FFFFFF; }

#flt-popup-notifications-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000; width: 300px;
}
.flt-popup {
  padding: 12px 18px; margin-bottom: 10px; border-radius: 5px; color: #FFFFFF;
  font-size: 0.9em; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  opacity: 0; transform: translateX(100%); animation: fltPopupSlideIn 0.5s forwards;
}
@keyframes fltPopupSlideIn { to { opacity: 1; transform: translateX(0); } }
.flt-popup.success { background-color: #27AE60; }
.flt-popup.info    { background-color: #2980B9; }
.flt-popup.warning { background-color: #F39C12; }
.flt-popup.error   { background-color: #C0392B; }

#flt-log-viewer-container textarea { /* Admin styles */
  background-color: #f9f9f9; border: 1px solid #ddd; padding: 10px; color: #333333;
}

@media (max-width: 768px) {
  .flt-options-grid { grid-template-columns: 1fr; } /* Stack all option groups */
  .flt-actions-row { justify-content: center; }
}