/* Base Styles */
body {
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin-top: 50px;
}

#output {
  white-space: pre-wrap;
}

.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
}

.flag-icon {
  width: 20px;
  margin-right: 5px;
}

/* Dark Mode Styles */
[data-theme="dark"] body {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

[data-theme="dark"] .card {
  background-color: #2d2d2d;
  border-color: #404040;
}

[data-theme="dark"] .card-header {
  background-color: #333;
  border-bottom-color: #404040;
  color: #f0f0f0;
}

[data-theme="dark"] .form-control {
  background-color: #333;
  border-color: #404040;
  color: #f0f0f0;
}

[data-theme="dark"] .form-control:focus {
  background-color: #404040;
  border-color: #505050;
  color: #f0f0f0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-theme="dark"] .form-select {
  background-color: #333;
  border-color: #404040;
  color: #f0f0f0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f0f0f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-select:focus {
  border-color: #505050;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-theme="dark"] .btn-primary {
  background-color: #0d6efd;
  border-color: #0a58ca;
}

[data-theme="dark"] .btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

[data-theme="dark"] #output {
  background-color: #2d2d2d !important;
  color: #f0f0f0;
  border: 1px solid #404040;
}

[data-theme="dark"] .bg-light {
  background-color: #2d2d2d !important;
}

/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  background: none;
  border: 1px solid #dee2e6;
  color: inherit;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-toggle {
  border-color: #404040;
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* RTL Support / RTL Desteği */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .theme-toggle {
  left: 1rem;
  right: auto;
}

[dir="rtl"] .language-selector {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .form-label {
  text-align: right;
}

[dir="rtl"] pre {
  direction: ltr;
  text-align: left;
}
