/* --- FULL CSS FROM ORIGINAL index.html --- */
:root {
  --primary-bg: #fdf6ee;
  --secondary-bg: #f9f1e7;
  --accent-color: #d4a373;
  --accent-light: #fae6d3;
  --text-primary: #5c4d42;
  --text-secondary: #8c7b6b;
  --border-radius: 12px;
  --transition-speed: 0.4s;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
}
.waterfall {
  position: fixed;
  top: 0;
  height: 100%;
  width: 100px;
  overflow: hidden;
  z-index: 1;
}
.waterfall.left {
  left: 0;
}
.waterfall.right {
  right: 0;
}
.script-characters {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: waterfall 20s linear infinite;
}
.script-characters.second {
  top: -100%;
}
.script-char {
  font-size: 24px;
  opacity: 0.3;
  text-align: center;
  width: 100px;
  text-shadow: 0 0 10px rgba(212, 163, 115, 0.7);
}
@keyframes waterfall {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}
.waterfall.left .script-characters {
  animation-delay: -10s;
}
.waterfall::before,
.waterfall::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100px;
  z-index: 3;
}
.waterfall::before {
  top: 0;
  background: linear-gradient(to bottom, var(--primary-bg), transparent);
  height: 50px;
}
.waterfall::after {
  bottom: 0;
  background: linear-gradient(to top, var(--primary-bg), transparent);
  height: 50px;
}
.app-container {
  width: 100%;
  max-width: 1200px;
  background-color: var(--secondary-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  text-align: center;
}
.logo {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.logo-svg {
  width: 100%;
  height: 100%;
}
.logo.focused,
.logo.translated {
  top: 20px;
  left: 40px;
  width: 150px;
  height: 30px;
}
.input-container {
  margin-top: 70px;
  position: relative;
}
.input-section {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
textarea {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--accent-light);
  border-radius: var(--border-radius);
  padding: 15px;
  font-size: 16px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 100px;
  transition: all var(--transition-speed) ease;
  animation: fadeIn 0.5s ease-in;
}
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}
.arrow-button {
  background: linear-gradient(135deg, var(--accent-color), #e9b384);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: white;
  cursor: pointer;
  transition: all var(--transition-speed);
  box-shadow: 0 5px 15px rgba(212, 163, 115, 0.4);
  opacity: 0;
  transform: scale(0.8);
  flex-shrink: 0;
}
.arrow-button.visible {
  opacity: 1;
  transform: scale(1);
}
.arrow-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(212, 163, 115, 0.6);
}
.arrow-button:disabled {
  background: #e0d6c9;
  cursor: not-allowed;
  box-shadow: none;
}
.features-bar {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  transition: all var(--transition-speed);
}
.features-bar.hidden {
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  height: 0;
  padding: 0 15px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  align-items: flex-start;
}
.feature-item label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.feature-value {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--accent-light);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 120px;
  text-align: left;
}
.feature-value:hover {
  background-color: rgba(255, 255, 255, 0.9);
}
.feature-item select,
.feature-item input {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--accent-light);
  border-radius: 6px;
  padding: 8px;
  color: var(--text-primary);
}
.feature-item select:focus,
.feature-item input:focus {
  outline: none;
  border-color: var(--accent-color);
}
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e0d6c9;
  transition: 0.4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text-primary);
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-color);
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.dropdown-container {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--secondary-bg);
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1;
  border-radius: var(--border-radius);
  border: 1px solid var(--accent-light);
  max-height: 200px;
  overflow-y: auto;
}
.dropdown-content a {
  color: var(--text-primary);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: rgba(212, 163, 115, 0.1);
}
.dropdown-container:hover .dropdown-content {
  display: block;
}
.search-input {
  width: 100%;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--accent-light);
  border-radius: 6px;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.result-container {
  margin-top: 30px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius);
  display: none;
}
.result-container.visible {
  display: block;
}
.result-container h3 {
  margin-bottom: 15px;
  color: var(--accent-color);
}
.translation-result {
  white-space: pre-wrap;
  line-height: 1.6;
}
.error {
  color: #e74c3c;
  margin-top: 15px;
}
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}
.loading.visible {
  display: block;
}
.loading-dots {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
}
.loading-dots span {
  animation: blink 1.4s infinite both;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}
@media (max-width: 768px) {
  .app-container {
    padding: 20px;
  }
  .input-section {
    flex-direction: column;
  }
  .arrow-button {
    align-self: center;
    margin-bottom: 0;
  }
  .features-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-item {
    width: 100%;
  }
  .waterfall {
    display: none;
  }
}
