* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

.container {
  max-width: 1120px;
  margin: 36px auto;
  padding: 28px;
  background: #ffffff;
  border-radius: 18px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.logo {
  width: 105px;
}

.header-text h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 18px;
  color: #4b5563;
}

a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.language-switch {
  width: 100%;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
}

.arrow {
  color: #2563eb;
  font-size: 26px;
}

.translator-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}

.translate-card {
  border: 1px solid #d1d5db;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

#sourceText {
  width: 100%;
  height: 110px;
  padding: 18px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 18px;
  font-family: inherit;
}

#result {
  width: 100%;
  height: 160px;
  padding: 18px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 18px;
  font-family: inherit;
  background: #ffffff;
  color: #111827;
  cursor: text;
}

.manual-translate-btn {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 15px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.feedback-box {
  margin-top: 28px;
  padding: 22px;
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.feedback-box h3 {
  margin-top: 0;
  font-size: 22px;
}

.feedback-box textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
}

.feedback-box input {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.secondary-btn {
  width: 100%;
  margin-top: 12px;
  padding: 15px;
  border-radius: 10px;
  border: none;
  background: #374151;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

#feedbackStatus {
  margin-top: 12px;
  color: #2563eb;
  font-weight: 700;
}

.notice {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.not-found-message {
  color: #b45309;
  background: #fffbeb;
}

@media (max-width: 820px) {
  .container {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    padding: 24px 18px;
  }

  .app-header {
    gap: 14px;
  }

  .logo {
    width: 76px;
  }

  .header-text h1 {
    font-size: 31px;
  }

  .subtitle {
    font-size: 15px;
  }

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

  #sourceText {
    height: 100px;
    font-size: 16px;
  }

  #result {
    height: 150px;
    font-size: 16px;
  }
}


.language-switch {
    height: 60px;
    min-height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-switch span,
.language-switch button,
.language-switch a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper #sourceText {
  padding-right: 48px;
}

#clearInputBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-size: 20px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  display: block;
  z-index: 9999;
  padding: 0;
  z-index: 5;
}

#clearInputBtn:hover {
  background: #d1d5db;
}
