:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #c7d2fe;
  --primary-dark: #3730a3;
  --primary-rgb: 79, 70, 229;
  --secondary: #8b5cf6;
  --secondary-hover: #7c3aed;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #cbd5e1;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --success-hover: #059669;
  --warning: #f59e0b;
  --warning-hover: #e0a800;
  --info: #0dcaf0;
  --info-hover: #138496;
  --dark: #1e293b;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #4338ca;
  --secondary: #a78bfa;
  --secondary-hover: #8b5cf6;
  --background: #0f172a;
  --card-bg: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-focus: #475569;
  --dark: #f8fafc;
  --info: #17a2b8;
  --info-hover: #138496;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.container {
  width: 100%;
  max-width: 800px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}

.header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--border);
  color: var(--text);
}

.warning {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.warning i {
  font-size: 1rem;
}

.description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--primary);
}

.form-content {
  padding: 0 2rem 2rem;
}

.radio-group {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .radio-group {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 2rem;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.radio-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.25rem;
  width: 1.25rem;
  background-color: var(--background);
  border: 2px solid var(--border-focus);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.radio-option:hover input~.radio-checkmark {
  border-color: var(--primary-light);
}

.radio-option input:checked~.radio-checkmark {
  background-color: transparent;
  border-color: var(--primary);
}

.radio-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.radio-option input:checked~.radio-checkmark:after {
  display: block;
}

.radio-option .radio-checkmark:after {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--primary);
}

.radio-option label {
  font-size: 0.95rem;
  color: var (--text);
}

.input-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.input-content {
  padding-top: 1rem;
}

.text-input-container {
  display: none;
}

.file-input-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  border: 2px dashed var(--border-focus);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  background: var(--background);
}

.file-input-wrapper:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.file-input-wrapper.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.file-input-wrapper i {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.file-input-wrapper p {
  font-size: 0.9rem;
  color: var (--text-muted);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  margin-top: 1rem;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.file-list::-webkit-scrollbar {
  width: 6px;
}

.file-list::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb {
  background: var(--border-focus);
  border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb:hover {
  background: var (--text-muted);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--background);
  border-radius: var (--radius);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.file-item-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.file-item-name i {
  color: var(--primary);
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.file-item-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.file-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
  font-family: inherit;
  transition: all 0.3s ease;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.api-key-container {
  margin-bottom: 1.5rem;
}

.api-keys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.add-api-key-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.add-api-key-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.1);
}

.api-key-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.input-with-icon {
  position: relative;
  flex: 1;
}

input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
textarea:hover {
  border-color: var(--border-focus);
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toggle-password:hover {
  color: var(--text);
}

.remove-api-key {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.remove-api-key:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.remove-api-key:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: none;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  cursor: pointer;
  position: relative;
  padding-left: 2rem;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.25rem;
  width: 1.25rem;
  background-color: var(--background);
  border: 2px solid var(--border-focus);
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.checkbox-wrapper:hover input~.checkbox-checkmark {
  border-color: var(--primary-light);
}

.checkbox-wrapper input:checked~.checkbox-checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-wrapper input:checked~.checkbox-checkmark:after {
  display: block;
}

.checkbox-wrapper .checkbox-checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.advanced-options-toggle {
  width: 100%;
  padding: 0.75rem;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var (--radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.advanced-options-toggle:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--border-focus);
}

.advanced-options-toggle i {
  transition: transform 0.3s ease;
}

.advanced-options-toggle.active i {
  transform: rotate(180deg);
}

.advanced-options {
  display: none;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.advanced-options.show {
  display: block;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
}

.form-group textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  background: var (--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.translate-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.translate-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.translate-button:hover::before {
  left: 100%;
}

.translate-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.translate-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.progress-container {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: none;
  animation: fadeIn 0.3s ease;
}

.progress-bar {
  height: 0.5rem;
  background: var(--background);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: 1rem;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var (--text-muted);
}

.download-container {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  display: none;
  animation: fadeIn 0.3s ease;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.download-link:hover::before {
  left: 100%;
}

.download-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.file-info {
  display: block;
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 350px;
}

.toast {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var (--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideIn 0.3s ease forwards;
  border-left: 4px solid var(--primary);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--success);
}

.toast-icon {
  font-size: 1.2rem;
  color: var(--primary);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  transition: all 0.2s ease;
  min-width: 2rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: var(--text);
}

.api-key-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.api-key-note a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.api-key-note a:hover {
  text-decoration: underline;
}

.api-key-note i {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.api-key-note i:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.1);
  color: var(--primary);
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
  border-left: 4px solid var(--danger);
  animation: fadeIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-out {
  animation: slideOut 0.3s ease forwards;
}

/* Loading animation */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 100%;
  animation: gradient 2s ease infinite;
  border-radius: var(--radius);
  opacity: 0.7;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .container {
    border-radius: var(--radius);
  }

  .header {
    padding: 1.5rem 1.5rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .form-content {
    padding: 0 1.5rem 1.5rem;
  }

  .card {
    padding: 1.25rem;
  }

  .api-key-input {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  .input-with-icon {
    width: 85%;
    flex: none;
  }

  .remove-api-key {
    position: static;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.5rem;
  }

  .translations-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .translations-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .search-box,
  .filter-dropdown,
  .sort-dropdown {
    width: 100%;
    min-width: auto;
  }
  
  .translations-grid {
    grid-template-columns: 1fr;
  }
  
  .subtitle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1rem 1rem 0.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .form-content {
    padding: 0 1rem 1rem;
  }

  .card {
    padding: 1rem;
  }

  .api-key-input {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  .input-with-icon {
    width: 85%;
    flex: none;
  }

  .remove-api-key {
    position: static;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.5rem;
  }

  .toast {
    width: 90%;
    margin: 0 auto;
  }

  .api-key-note {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .file-input-wrapper {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .file-input-wrapper p {
    font-size: 0.7rem;
    text-align: center;
    max-width: 200px;
    margin: 0 auto;
  }

  .file-input-wrapper i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .translations-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .translations-header {
    margin-bottom: 1rem;
  }
}

.edit-mode-container {
  margin-top: 0;
  border-top: none;
  padding: 2rem;
  min-height: 400px;
}

.edit-mode-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card-bg);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.edit-mode-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 250px;
  flex: 1;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-dropdown, .sort-dropdown {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-dropdown:focus, .sort-dropdown:focus, .search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}

.subtitle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  height: calc(100vh - 180px);
  overflow: hidden;
}

.subtitle-column {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  background: var(--card-bg);
}

.column-header {
  padding: 12px 16px;
  font-weight: 600;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.column-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  position: relative;
  height: 100%;
}

.subtitle-entry {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.subtitle-entry.modified {
  border-left: 4px solid var(--primary-color);
}

.entry-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.entry-content {
  position: relative;
}

.entry-text {
  white-space: pre-wrap;
  line-height: 1.5;
}

.entry-translation {
  display: flex;
  gap: 8px;
}

.entry-translation textarea {
  flex: 1;
  min-height: 60px;
  max-height: 200px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-family: inherit;
  resize: vertical;
}

.entry-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.2;
  transition: opacity 0.2s;
}

.subtitle-entry:hover .entry-tools {
  opacity: 1;
}

.editor-content {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  overflow: hidden;
}

.subtitles-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--border);
}

.subtitles-table thead {
  position: sticky;
  top: 0;
  background: var(--background);
  z-index: 10;
}

.subtitles-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border-bottom: 1px solid var(--border);
}

.subtitles-table td {
  padding: 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.entry-text-editable {
  width: 100%;
  min-height: 80px;
  padding: 12px 40px 12px 12px; /* Extra padding on right for button */
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
  white-space: pre-wrap;
}

.entry-text-editable:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

/* Ensure proper height of cells */
.subtitles-table td:first-child,
.subtitles-table td:last-child {
  height: 100%;
  vertical-align: top;
}

/* Ensure textarea fills available space */
.entry-edit-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 80px;
  display: flex;
  flex-direction: column;
}

/* Prevent wrapping of the table */
.subtitles-table {
  white-space: normal;
  word-break: normal;
}

.editor-statusbar {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--background);
}

.entry-text,
.translation-text {
  width: 100%;
  min-height: 60px;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.translation-text {
  resize: vertical;
}

/* Enhanced Responsive Styles */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 0;
  }

  .header {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .form-content {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .subtitle-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    height: auto;
  }

  .translations-grid {
    grid-template-columns: 1fr;
  }

  .translations-stats {
    grid-template-columns: 1fr;
  }

  .translations-controls {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .filter-dropdown,
  .sort-dropdown {
    width: 100%;
  }

  .toolbar-section {
    flex-direction: column;
    width: 100%;
  }

  .toolbar-btn {
    width: 100%;
  }

  .file-info-header {
    flex-direction: column;
  }

  .info-item {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .header {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .warning {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .tab {
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
  }

  .api-key-input {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  .input-with-icon {
    width: 85%;
    flex: none;
  }

  .remove-api-key {
    position: static;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.5rem;
  }

  .remove-api-key {
    width: 90%;
    height: 2.5rem;
  }

  .toast {
    width: 90%;
    margin: 0 auto;
  }

  .api-key-note {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .file-input-wrapper {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .file-input-wrapper p {
    font-size: 0.8rem;
    text-align: center;
    max-width: 200px;
    margin: 0 auto;
  }

  .file-input-wrapper i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  background: var(--card-bg);
  margin: 2rem auto;
  max-width: 600px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  transform: scale(1.1);
}

.modal-body {
  padding: 1.5rem;
}

.instruction-section {
  margin-bottom: 2rem;
}

.instruction-section h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.instruction-section.fa {
  direction: rtl;
  text-align: right;
}

.instruction-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.instruction-section.fa ol {
  padding-right: 1.5rem;
  padding-left: 0;
}

.instruction-section li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.modal-note {
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-note i {
  color: var(--primary);
  font-size: 1.25rem;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-10%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .instruction-section h3 {
    font-size: 1rem;
  }
}

/* Add additional styles for the subtitle editing */

/* Edit container styles */
#edit-mode-container {
  padding: 0 !important;
  overflow: auto !important;
  max-height: 600px !important;
  height: auto !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background-color: var(--card-bg) !important;
  margin-bottom: 1rem !important;
}

/* Table styling enhancements */
.subtitles-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.subtitles-table th {
  text-align: left !important;
  padding: 0.75rem 1rem !important;
  font-weight: 600 !important;
  background: var(--primary) !important;
  color: white !important;
  border-bottom: 1px solid var(--border) !important;
}

.subtitles-table td {
  padding: 1rem !important;
  vertical-align: top !important;
  border-bottom: 1px solid var(--border) !important;
}

.subtitles-table th:first-child,
.subtitles-table th:last-child {
  width: 50% !important;
}

/* Entry info styling */
.entry-info {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  background: rgba(var(--primary-rgb), 0.1) !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 4px !important;
  margin-bottom: 0.5rem !important;
  display: inline-block !important;
}

.entry-text {
  white-space: pre-wrap !important;
  line-height: 1.5 !important;
  font-size: 0.95rem !important;
}

.entry-edit-container {
  position: relative !important;
}

.entry-text-editable {
  width: 100% !important;
  min-height: 80px !important;
  padding: 0.75rem !important;
  padding-right: 2rem !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--background) !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  resize: vertical !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
}

.entry-action-btn.retranslate-btn {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  border: none !important;
  background: none !important;
  color: var(--primary) !important;
  opacity: 0.6 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-size: 0.9rem !important;
  padding: 0.25rem !important;
  border-radius: var(--radius) !important;
}

.entry-action-btn.retranslate-btn:hover {
  opacity: 1 !important;
  background: rgba(var(--primary-rgb), 0.1) !important;
}

.subtitles-table tr.modified-row {
  background-color: rgba(var(--primary-rgb), 0.05) !important;
}

.subtitles-table tr.modified-row td {
  border-left: 3px solid var(--primary) !important;
}

/* استایل برای تب منیج (مدیریت ترجمه‌ها) */
.translations-manager {
  padding: 1rem;
}

.translations-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
}

.translations-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-item i {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.translations-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.translations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.translation-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.translation-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.translation-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.translation-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.translation-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.translation-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.translation-content {
  padding: 1rem;
}

.translation-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.translation-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.translation-actions {
  display: flex;
  gap: 0.5rem;
}

.translation-action {
  flex: 1;
  padding: 0.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  color: var(--text);
}

.translation-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.translation-action.delete {
  color: var(--danger);
  border-color: var(--danger);
  opacity: 0.8;
}

.translation-action.delete:hover {
  background: var(--danger);
  color: white;
  opacity: 1;
}

.no-translations {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-translations i {
  font-size: 3rem;
  opacity: 0.5;
}

#file-info {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

#file-info::before {
  content: "\f15b";
  font-family: "Font Awesome 6 Free";
  margin-right: 0.5rem;
  color: var(--primary);
}

/* استایل جستجو و فیلتر در تب منیج */
#search-translations {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 250px;
  font-size: 0.9rem;
}

#language-filter, #sort-translations {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text);
  font-size: 0.9rem;
}

/* تب های اصلی */
.tab-content {
  display: none;
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 0 0 8px 8px;
}

.tab-content.active {
  display: block;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  background-color: var(--background);
  border-radius: 8px 8px 0 0;
}

.tab {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  background-color: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background-color: var(--card-bg);
}

/* استایل هدر ویرایشگر */
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-section {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.toolbar-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.file-info-header {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-item .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .editor-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toolbar-section {
    width: 100%;
    justify-content: space-between;
  }
  
  .toolbar-btn {
    flex: 1;
    justify-content: center;
  }
  
  .file-info-header {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  
  /* ریسپانسیو تب منیج */
  .translations-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .translations-controls {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  
  #search-translations {
    width: 100%;
    min-width: auto;
  }
  
  #language-filter, 
  #sort-translations {
    width: 100%;
    min-width: auto;
  }
  
  .translations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .file-info-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .info-item {
    width: 100%;
    justify-content: space-between;
  }
  
  /* ریسپانسیو تب منیج برای موبایل */
  .translations-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .translations-header {
    margin-bottom: 1rem;
  }
}

/* استایل‌های جدید برای تنظیمات مدل و دیکشنری */
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.range-slider {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 10px 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.range-slider:hover::-webkit-slider-thumb {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.range-slider:hover::-moz-range-thumb {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.range-value {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.tooltip-text {
  font-weight: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  position: relative;
}

.dictionary-settings {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--background);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: .4s;
  border-radius: 24px;
}

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

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.dictionary-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.action-button {
  padding: 0.4rem 0.8rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.action-button:hover {
  background: var(--primary-hover);
}

.action-button.secondary {
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--border);
}

.action-button.secondary:hover {
  background: var(--border);
}

.dictionary-entries {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
}

.dictionary-entry {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.dictionary-entry input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.dictionary-entry .remove-term,
.dictionary-entry .test-term {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.dictionary-entry .remove-term {
  color: var(--danger);
}

.dictionary-entry .test-term {
  color: var(--primary);
}

.dictionary-entry .remove-term:hover,
.dictionary-entry .test-term:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.05);
}

.dictionary-entry .test-term:hover {
  color: var(--primary-hover);
}

.dictionary-entry .remove-term:hover {
  color: var(--danger-hover);
}

/* استایل برای دکمه‌های اضافی */
.mr-2 {
  margin-right: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
}

.btn i {
  font-size: 0.8rem;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-warning {
  background-color: var(--warning);
  color: var(--dark);
}

.btn-warning:hover {
  background-color: var(--warning-hover);
}

.btn-info {
  background-color: var(--info);
  color: white;
}

.btn-info:hover {
  background-color: var(--info-hover);
}


@media (max-width: 768px) {
  .dictionary-controls {
    flex-wrap: wrap;
  }
  
  .action-button {
    flex: 1;
    justify-content: center;
  }
}

/* Styles for advanced options tabs */
.advanced-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  gap: 0.25rem;
  padding-bottom: 2px;
}

.advanced-tab {
  padding: 0.6rem 1rem;
  background: var(--background);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.advanced-tab i {
  font-size: 0.9rem;
}

.advanced-tab:hover {
  color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.advanced-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background-color: rgba(var(--primary-rgb), 0.07);
}

.advanced-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.advanced-tab-content.active {
  display: block;
}

/* Responsive styles for tabs */
@media (max-width: 600px) {
  .advanced-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .advanced-tab {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

.footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}


.footer i:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.1);
  color: var(--primary);
}

.icon {
    color: var(--dark-secondary);
    font-size: 1.5rem;

    transition: var(--transition);
}
