/* ===== Мяу-Переводчик: бело-голубая тема ===== */

:root {
  --blue-dark: #1e3a5f;
  --blue: #4da3ff;
  --blue-mid: #8ec5ff;
  --blue-light: #cfe6ff;
  --blue-soft: #eaf4ff;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(77, 163, 255, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
  color: var(--blue-dark);
  min-height: 100vh;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%234da3ff' fill-opacity='0.07' transform='rotate(-15 70 70)'%3E%3Cellipse cx='70' cy='88' rx='17' ry='13'/%3E%3Ccircle cx='50' cy='64' r='7.5'/%3E%3Ccircle cx='65' cy='57' r='7.5'/%3E%3Ccircle cx='80' cy='57' r='7.5'/%3E%3Ccircle cx='94' cy='64' r='7.5'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--white) 0%, var(--blue-soft) 60%, var(--blue-light) 100%);
  background-attachment: fixed;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===== Шапка ===== */

.hero {
  text-align: center;
  padding: 8px 0 0;
}

.title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  letter-spacing: 0.5px;
  color: var(--blue-dark);
}

.subtitle {
  margin-top: 8px;
  font-size: 1rem;
  color: #3f6ea5;
}

.fineprint {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #7ba3cc;
  font-style: italic;
}

/* ===== Карточки ===== */

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--blue-light);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card__title {
  font-size: 1.15rem;
  margin-bottom: 14px;
  text-align: center;
}

/* ===== Фото кошки ===== */

.cat-card {
  padding: 14px;
}

/* Рамка вокруг фото/заглушки */
.cat-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 2px dashed var(--blue-mid);
  background: var(--blue-soft);
  padding: 20px; /* отступ внутри рамки */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Сама картинка — со скруглением углов */
.cat-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.placeholder__emoji {
  font-size: 3.6rem;
  animation: float 3s ease-in-out infinite;
}

.placeholder__text {
  font-size: 1rem;
  color: #3f6ea5;
  line-height: 1.5;
}

.placeholder__text small {
  color: #7ba3cc;
}

.placeholder__text code {
  background: var(--blue-soft);
  border: 1px solid var(--blue-light);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Выбор пола ===== */

.gender-buttons {
  display: flex;
  gap: 12px;
}

.choice {
  flex: 1;
  padding: 14px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--blue-dark);
  background: var(--white);
  border: 2px solid var(--blue-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice:hover {
  border-color: var(--blue-mid);
  transform: translateY(-2px);
}

.choice.is-active {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(77, 163, 255, 0.4);
}

/* ===== Кнопки мяуканья ===== */

.meow-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.meow-btn {
  padding: 14px 10px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 2px solid var(--blue-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.meow-btn:hover:not(:disabled) {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  transform: scale(1.04);
}

.meow-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.meow-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== Результат ===== */

.result-card {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 10px 0;
}

/* Кольцо-загрузка */
.ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--blue) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status {
  font-size: 1.05rem;
  color: #3f6ea5;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Ответ */
.answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 0;
  text-align: center;
}

.answer__bubble {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 600;
  padding: 20px 28px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(77, 163, 255, 0.45);
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.answer__hint {
  font-size: 0.8rem;
  color: #7ba3cc;
  font-style: italic;
}

.reset {
  padding: 10px 22px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--blue-dark);
  background: var(--white);
  border: 2px solid var(--blue-mid);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reset:hover {
  background: var(--blue-soft);
  transform: translateY(-2px);
}

/* ===== Подвал ===== */

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: #7ba3cc;
  padding: 6px 0 10px;
}

/* ===== Мобильные ===== */

@media (max-width: 420px) {
  .meow-buttons {
    grid-template-columns: 1fr;
  }
}
