
body {
  font-family: Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: #f0f2f5;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  margin: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

#display {
  min-width: 300px;
  max-width: 80%;
  min-height: 100px;
  text-align: center;
  background-color: #ffffff;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 64px;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
}

textarea {
  width: 80%;
  max-width: 600px;
  margin-top: 10px;
  height: 100px;
  font-size: 1rem;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

#mobileControls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
}

.circle-button,
.circle-small {
  border-radius: 50%;
  background-color: #e0e0e0;
  border: 1px solid #ccc;
  box-shadow: inset 0 -1px 0 #bbb;
  font-size: 24px;
  font-family: monospace;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  
  flex-shrink: 0;
}

.circle-button {
  width: 70px;
  height: 70px;
  box-shadow: inset 0 -2px 0 #bbb;
}

.circle-small {
  width: 50px;
  height: 50px;
}

.circle-button:hover,
.circle-small:hover {
  box-shadow: none;
  transform: scale(1.05);
}

.icon {
  display: block;
  width: 0;
  height: 0;
}

.icon.play {
  border-left: 18px solid #333;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.icon.pause {
  width: 20px;
  height: 20px;
  position: relative;
}

.icon.pause::before,
.icon.pause::after {
  content: '';
  position: absolute;
  top: 0;
  width: 6px;
  height: 100%;
  background: #333;
  border-radius: 1px;
}

.icon.pause::before { left: 0; }
.icon.pause::after { right: 0; }

.info {
  position: absolute;
  font-size: 1rem;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 8px;
  opacity: 0;
  

  transition: opacity 0.5s ease;
}

#speedInfo { top: 10px; left: 10px; }
#fontSizeInfo { top: 50px; left: 10px; }
#progressInfo {
  top: 10px;
  right: 60px; }

#controls {
  display: flex;
  margin-top: 20px;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

#controls button {
  font-size: 0.85rem;
  padding: 6px 12px;
  background-color: #e0e0e0;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 #bbb;
  font-family: monospace;
  color: #333;
  
  display: flex;
  align-items: center;
  gap: 6px;
}

#controls button:hover {
  background-color: #d5d5d5;
  box-shadow: inset 0 -1px 0 #aaa;
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 180px; /* ниже окна слов */
  flex-wrap: wrap;
  z-index: 500;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

.toggle input[type="checkbox"] {
  width: 40px;
  height: 20px;
  appearance: none;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  outline: none;
  cursor: pointer;
  
}

.toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 1px;
  left: 1px;
  

  transition: transform 0.3s ease;
}

.toggle input[type="checkbox"]:checked {
  background: #444;

  transition: background 0.3s ease;
}

.toggle input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

#hintToggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1100;
  font-size: 18px;
  background: #e0e0e0;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 #bbb;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 14px 18px;
  border-radius: 12px;
  z-index: 1001;
  width: 90vw;
  max-width: 500px;
  font-size: 0.95rem;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .popup {
    width: 95vw;
    max-width: 95vw;
    font-size: 1rem;
  }
}

.popup.hidden {
  display: none;
}

.hint-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
  justify-content: center;
}

.key {
  background: #e0e0e0;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: #333;
  box-shadow: inset 0 -1px 0 #bbb;
  font-family: monospace;
}

#copyright {
  font-size: 0.75rem;
  color: #888;
  margin-top: 10px;
}




@media (max-width: 600px) {
  
}

#presetSelect, #categorySelect {
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
  padding: 10px 40px 10px 10px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  appearance: none;
  font-family: inherit;
  color: #333;
  background-image: url("data:image/svg+xml,%3Csvg fill='%23666' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

@media (max-width: 600px) {
  #presetSelect, #categorySelect {
    width: 100%;
    margin-top: 8px;
    font-size: 1rem;
  }
}

.hidden { display: none !important; }

.select-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.select-container select {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: opacity 0.3s ease;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
  .select-container {
    flex-direction: column;
  }
}

.select-container select {
  height: 44px; /* одинаковая высота */
}
