body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f1 100%);
  min-height: 100vh;
  margin: 0;
}

h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(120deg, #2c3e50, #3498db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 10px 0;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  max-width: 900px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.input-section, .output-section {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.input-section:hover, .output-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
  font-size: 1.1rem;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
  min-height: 120px;
}

textarea:read-only {
  background-color: #f8fafc;
  border-color: #e0e6ed;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

button {
  padding: 12px 25px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: linear-gradient(135deg, #2980b9, #2c3e50);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:disabled {
  background: linear-gradient(135deg, #bdc3c7, #95a5a6);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dictionary-section {
  margin-top: 30px;
  border-top: 2px solid #e0e6ed;
  padding-top: 25px;
}

.dictionary-section h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.dictionary-section h3 {
  color: #3498db;
  font-size: 1.4rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #e0e6ed;
  padding-bottom: 10px;
}

.dictionary-section h4 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin: 20px 0 10px;
  background: linear-gradient(to right, #f5f7fa, transparent);
  padding: 8px 15px;
  border-radius: 6px;
}

#dictionaryContent {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  min-height: 150px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
}

#dictionaryContent::-webkit-scrollbar {
  width: 8px;
}

#dictionaryContent::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#dictionaryContent::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#dictionaryContent::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

#dictionaryContent ul {
  list-style: none;
  padding-left: 0;
}

#dictionaryContent li {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

#dictionaryContent strong {
  color: #3498db;
  font-size: 1.1rem;
}

#dictionaryContent em {
  color: #7f8c8d;
  font-style: normal;
  display: block;
  margin-top: 8px;
  padding-left: 15px;
  border-left: 2px solid #e0e6ed;
}

#dictionaryContent em:last-child {
  color: #95a5a6;
  font-size: 0.95em;
  border-left-color: #bdc3c7;
}

.language-description {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid #3498db;
  font-size: 0.95rem;
  color: #34495e;
  line-height: 1.4;
  min-height: 60px;
  transition: all 0.3s ease;
}

.language-description.loading {
  background: linear-gradient(90deg, #f0f3f6 25%, #e6e9ec 50%, #f0f3f6 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.custom-lang-description {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #34495e;
    background: #ffffff;
    transition: all 0.3s ease;
}

.custom-lang-description:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.language-description input {
    margin: 0;
    background: transparent;
}

.text-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.copy-button {
  padding: 6px 12px;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #34495e, #2c3e50);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-button:hover {
  background: linear-gradient(135deg, #2c3e50, #243342);
  transform: translateY(-1px);
}

.copy-button.copied {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
    margin: 10px;
  }
  
  button {
    padding: 10px 20px;
    font-size: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
}