* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.container {
  width: 90%;
  max-width: 750px;
  padding: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

h1 {
  margin-bottom: 20px;
  font-size: 32px;
}

textarea {
  width: 100%;
  height: 120px;
  margin-bottom: 20px;
  padding: 12px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  resize: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.controls {
  margin: 15px 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.controls label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 0.85;
}

#speedValue {
  font-weight: bold;
  font-size: 18px;
  color: #6dd5fa;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, #2e86ff, #6dd5fa);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid #2e86ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid #2e86ff;
  cursor: pointer;
}

.buttons {
  margin: 20px 0;
}

button {
  padding: 10px 22px;
  margin: 5px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.lang-select {
  margin-bottom: 20px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.lang-select:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lang-select:focus {
  border-color: #6dd5fa;
  box-shadow: 0 0 8px rgba(109, 213, 250, 0.5);
}

.lang-select option {
  background: #1e3c72;
  color: white;
}

#display {
  margin-top: 25px;
  margin-bottom: 25px;
  font-size: clamp(28px, 8cqi, 75px);
}

.container-for-text {
  container-type: inline-size;
}

.box-container {
  justify-self: center;
  margin-top: 20px;
  margin-bottom: 20px;
}