body { padding: 40px; background-color: #f7f9fc; }
.translator-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  background-color: #fff;
}
h2 { text-align: left; font-size: 26px; }
.language-selection {
  margin-bottom: 25px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
select { font-size: 16px; padding: 6px 10px; }
.translation-row { display: flex; gap: 20px; margin-bottom: 20px; }
.textarea-container, .result-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
textarea, .translation-result {
  flex: 1;
  min-height: 180px;
  padding: 12px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  resize: none;
}
.translation-result {
  background-color: #f1f6ff;
  border-color: #e1e1e1;
  text-align: left;
}
.controls, .result-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
#charCount {
  font-size: 13px;
  color: #888;
  user-select: none;
}
.controls button, .result-controls button {
  padding: 8px 15px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
.translate-btn { background-color: #FE635E; color: #ffffff; }
.clear-btn { background-color: #e0e0e0; color: #333; }
.translate-btn:hover, .clear-btn:hover { opacity: 0.8; }
.result-controls { justify-content: flex-end; gap: 10px; }
.copy-btn, .feedback-btn, .download-btn {
  background-color: #009CFF; color: #ffffff;
}
.copy-btn:hover, .feedback-btn:hover, .download-btn:hover { opacity: 0.8; }
.cta-line {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #555;
}
.switch-lang {
  cursor: pointer;
  font-size: 28px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.failed-chunk {
  border-left: 4px solid red;
  padding-left: 8px;
  background: #fff3f3;
}
.retry-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 4px 8px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 4px;
}
.retry-btn:hover {
  background-color: #c0392b;
  opacity: 0.9;
}
.auth-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}
.auth-box {
  background: linear-gradient(to bottom right, #f9f9ff, #e8ecff);
  padding: 32px 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  max-width: 360px;
  width: 90%;
}
.auth-box h3 {
  margin-bottom: 16px;
  font-size: 20px;
  color: #1f37b7;
}
.auth-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.auth-box button {
  padding: 10px 20px;
  background-color: #1f37b7;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.auth-box button:hover {
  background-color: #152c9e;
}

/* Add the following media query at the end of your styles/style.css file */

@media (max-width: 768px) {
  body {
    padding: 20px; /* Reduce padding on smaller screens */
  }

  .translator-container {
    padding: 15px; /* Adjust padding for the main container */
  }

  .language-selection {
    flex-direction: column; /* Stack language selectors vertically */
    align-items: stretch; /* Stretch items to fill width */
    gap: 15px; /* Adjust gap for vertical layout */
  }

  select {
     width: 100%; /* Make dropdowns full width */
     box-sizing: border-box; /* Include padding and border in element's total width and height */
  }

  .translation-row {
    flex-direction: column; /* Stack text areas vertically */
    gap: 15px; /* Adjust gap */
  }

  .textarea-container, .result-container {
    flex: none; /* Reset flex property */
  }

  textarea, .translation-result {
    min-height: 150px; /* Slightly reduce min-height if needed */
  }

  .controls, .result-controls {
    flex-wrap: wrap; /* Allow controls to wrap if needed */
    gap: 10px; /* Add gap between wrapped items */
  }

  .result-controls {
     justify-content: center; /* Center result buttons */
  }

   h2 {
     font-size: 22px; /* Slightly reduce heading size */
     text-align: center; /* Center heading on mobile */
   }

   .switch-lang {
     margin-top: 10px; /* Add some space above the switch icon when stacked */
   }
}

@media (max-width: 480px) {
  body {
    padding: 10px; /* Further reduce padding */
  }

  .translator-container {
    padding: 10px;
  }

  h2 {
    font-size: 20px; /* Further reduce heading size */
  }

  textarea, .translation-result {
      font-size: 14px; /* Adjust font size in text areas */
  }

  .controls button, .result-controls button {
      padding: 6px 10px; /* Adjust button padding */
      font-size: 14px; /* Adjust button font size */
  }
}