﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  height: 100vh;
  background: #ffffff;
  color: #000000;
}

.page {
  position: relative;
  height: 100%;
}

.choosen-from {
  position: fixed;
  display: block;
  top: 7%;
  left: 25%;
  text-align: left;
  color: #43454a;
  font-size: 16px;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  margin-left: -5px;
  white-space: nowrap;
}

.selected-among {
  font-size: 12px;
}

/* Главный текст по центру */
.center-text { 
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: justify;
  max-width: 50%;
  max-height: 40vh;
}
 
.center-text h1 {
  font-size: 32px;
  font-weight: 400;
  font-family: "Libre Baskerville", "Lora", serif;
  color: #1f1f1f;
  line-height: 1.7em; 
  opacity: 0;
  transition: opacity 0.3s ease;
  letter-spacing: 0.02em;
}

.center-text h1.visible {
  opacity: 1;
}

.translate-btn {
  position: fixed;
  right: 25%;
  top: 40vh;
  font-size: 12px;
  color: #b7c8fe;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #d3e2ff;;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
  text-align: center;
  user-select: none;
  display: none;
}

.translate-btn:hover {
  color: #8fb3fe;
  background: rgba(239, 246, 255, 0.6);
  border-color: #b7c8fe;
}

.translate-btn:active {
  transform: translateY(1px);
  color: #679efe;
  background: rgba(223, 234, 255, 0.8);
  border-color: #8fb3fe;
}

.translation
{
  position: relative;
  font-size: 12px;
  color: #8a8f98;
  left: 0%;
  text-align: right;
  user-select: none;
  transition: color 0.15s ease;
  opacity: 0;
} 
.translation.visible {
  opacity: 1;
}
@media (hover: hover) {
  .translation:hover {
    color: #5b5f68;
  }

  .translation:active {
    color: #3a3a3a;
    transform: translateY(1px);
  }
}

.how-it-works {
  font-size: 13px;
  color: #aeb2bd;
  opacity: 1;
  transition: opacity 0.4s ease;
  margin-top: -25px;
}

.how-it-works.hidden {
  opacity: 0;
  pointer-events: none;
}

.status-text {
  display: flex;
  font-size: 12px;
  opacity: 0;
  color: #000;
  transition: opacity 0.3s ease;
  pointer-events: none;
  min-height: 1.2em;
}

.status-text.visible {
  opacity: 0.6;
}

.input-wrapper {
  position: fixed;
  top: 85%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90%;
  display: flex;
  flex-direction: column; /* Элементы встают друг под друга */
  align-items: center;    /* Центрирует содержимое (включая статус) */
  gap: 8px;
}

.input-row {
  display: flex;
  width: 100%; /* Занимает всю ширину input-wrapper */
  gap: 8px;
}

.input-wrapper input:focus {
  outline: none;
}

.input-row input {
  flex: 1;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 16px;
  color: #000;
}

.input-wrapper input::placeholder {
  color: #888;
}

.input-wrapper button {
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
}

.input-wrapper button:hover {
  background: #eaeaea;
}
#footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #9ca3af;
  background: transparent;
  cursor: default;
  overflow: hidden;
  height: auto;
}

#footer span {
  display: block;
  transition: opacity 0.35s;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
}

/* начальное состояние */
#footer .original {
  opacity: 1;
}

#footer .hover-text {
  opacity: 0;
}
/* при наведении */
/*
#footer:hover .original {
  opacity: 0;
}

#footer:hover .hover-text {
  opacity: 1;
}
*/
@media (max-width: 768px) {
  .input-wrapper {
    top: 70% !important;
  }
  .choosen-from {
    top: 4%;
    left: 15%;
    font-size: 14px;
  }
  .selected-among {
    font-size: 10px;
  }
  .center-text { 
    top: 35%;
    width: max-content;
    max-width: 70%;
    max-height: 50%;
  }
  .translate-btn {
    right: 15%;
  }
}