/* Main Styles */
body {
  font-family: "Inter", sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

/* Card styling */
.card {
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.125);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Textarea styling */
textarea {
  resize: none;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.font-monospace {
  font-family: "Fira Code", monospace !important;
}

/* History items */
.history-container {
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.history-item:hover {
  background-color: #e9ecef;
  cursor: pointer;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.history-item-content {
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Fira Code", monospace;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: rgba(13, 110, 253, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

.highlight {
  animation: highlight 1.5s ease-in-out;
}

/* Success checkmark animation */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.checkmark-animation {
  animation: checkmark 0.5s ease-in-out;
}

/* Removed spaces visualization */
.removed-space {
  background-color: rgba(255, 0, 0, 0.1);
  text-decoration: line-through;
  color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .card-header div {
    margin-top: 0.5rem;
  }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: none;
}

/* Dark mode toggle */
.dark-mode {
  background-color: #212529;
  color: #f8f9fa;
}

.dark-mode .card {
  background-color: #343a40;
  border-color: #495057;
}

.dark-mode .card-header,
.dark-mode .card-footer {
  background-color: #2b3035;
  border-color: #495057;
}

.dark-mode .text-muted {
  color: #adb5bd !important;
}

.dark-mode textarea,
.dark-mode .form-select,
.dark-mode .form-control {
  background-color: #343a40;
  border-color: #495057;
  color: #f8f9fa;
}

.dark-mode .history-item {
  background-color: #343a40;
  border-color: #495057;
}

.dark-mode .bg-light {
  background-color: #343a40 !important;
}

.dark-mode .text-dark {
  color: #f8f9fa !important;
}

/* Drag and drop area */
.drag-area {
  border: 2px dashed #ced4da;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.drag-area.active {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
}

/* Code highlighting */
.code-mode {
  background-color: #282c34;
  color: #abb2bf;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: "Fira Code", monospace;
}

.code-mode .keyword {
  color: #c678dd;
}

.code-mode .string {
  color: #98c379;
}

.code-mode .number {
  color: #d19a66;
}

.code-mode .comment {
  color: #5c6370;
  font-style: italic;
}

