:root {
  --bg: #fdf7fb;
  --bg-accent-1: #ffd8ea;
  --bg-accent-2: #e4dcff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-border: rgba(116, 75, 138, 0.14);
  --text: #2b2136;
  --text-muted: #645475;
  --accent: #b94a86;
  --accent-hover: #9f3970;
  --accent-secondary: #9b7ede;
  --accent-soft: rgba(185, 74, 134, 0.12);
  --accent-text: #8f3164;
  --button-text: #ffffff;
  --shadow: 0 20px 50px rgba(107, 63, 128, 0.12);
  --focus-ring: #b94a86;

  --cat-bg: #f6ebff;
  --cat-fur: #ffffff;
  --cat-stroke: #523c66;
  --cat-ear: #f7b2d2;
  --cat-blush: #f9a8cf;
  --cat-nose: #e06a9f;
  --cat-sparkle: #a782eb;
  --cat-sparkle-pink: #ee82b7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171221;
    --bg-accent-1: #351d3a;
    --bg-accent-2: #231f42;
    --surface: rgba(34, 27, 48, 0.88);
    --surface-border: rgba(240, 198, 232, 0.14);
    --text: #f8f2fa;
    --text-muted: #c3b4d1;
    --accent: #f29ec9;
    --accent-hover: #f7b4d7;
    --accent-secondary: #c5afff;
    --accent-soft: rgba(242, 158, 201, 0.16);
    --accent-text: #f7b7d8;
    --button-text: #1c1326;
    --shadow: 0 24px 60px rgba(8, 4, 15, 0.52);
    --focus-ring: #f29ec9;

    --cat-bg: #2d2240;
    --cat-fur: #f7effb;
    --cat-stroke: #453159;
    --cat-ear: #f29ec9;
    --cat-blush: #f29ec9;
    --cat-nose: #e274ab;
    --cat-sparkle: #c9b3ff;
    --cat-sparkle-pink: #f4a3cc;
  }
}

:root[data-theme="dark"] {
  --bg: #171221;
  --bg-accent-1: #351d3a;
  --bg-accent-2: #231f42;
  --surface: rgba(34, 27, 48, 0.88);
  --surface-border: rgba(240, 198, 232, 0.14);
  --text: #f8f2fa;
  --text-muted: #c3b4d1;
  --accent: #f29ec9;
  --accent-hover: #f7b4d7;
  --accent-secondary: #c5afff;
  --accent-soft: rgba(242, 158, 201, 0.16);
  --accent-text: #f7b7d8;
  --button-text: #1c1326;
  --shadow: 0 24px 60px rgba(8, 4, 15, 0.52);
  --focus-ring: #f29ec9;

  --cat-bg: #2d2240;
  --cat-fur: #f7effb;
  --cat-stroke: #453159;
  --cat-ear: #f29ec9;
  --cat-blush: #f29ec9;
  --cat-nose: #e274ab;
  --cat-sparkle: #c9b3ff;
  --cat-sparkle-pink: #f4a3cc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      circle at 15% 15%,
      var(--bg-accent-1) 0%,
      transparent 48%
    ),
    radial-gradient(circle at 85% 80%, var(--bg-accent-2) 0%, transparent 48%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: inline-block;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.97);
}

.theme-toggle:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
}

.card {
  width: 100%;
  max-width: 560px;
  padding: 44px 40px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.cat-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.cat-illustration {
  display: block;
  width: 124px;
  height: 124px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cat-illustration:hover {
  transform: translateY(-3px) scale(1.03);
}

.cat-illustration.is-happy {
  animation: cat-bounce 0.45s ease;
}

.cat-bg {
  fill: var(--cat-bg);
  transition: fill 0.25s ease;
}

.cat-fur {
  fill: var(--cat-fur);
  stroke: var(--cat-stroke);
  stroke-width: 3.2;
  stroke-linejoin: round;
}

.cat-ear {
  fill: var(--cat-ear);
}

.cat-stripe {
  fill: none;
  stroke: var(--cat-sparkle);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.7;
}

.cat-feature {
  fill: none;
  stroke: var(--cat-stroke);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-blush {
  fill: var(--cat-blush);
  opacity: 0.75;
}

.cat-nose {
  fill: var(--cat-nose);
}

.cat-whisker {
  fill: none;
  stroke: var(--cat-stroke);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0.7;
}

.cat-sparkle {
  fill: var(--cat-sparkle);
}

.cat-sparkle-pink {
  fill: var(--cat-sparkle-pink);
}

@keyframes cat-bounce {
  0% {
    transform: scale(1) translateY(0);
  }
  35% {
    transform: scale(1.07, 0.95) translateY(-6px);
  }
  70% {
    transform: scale(0.98, 1.03) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-illustration,
  .cat-illustration:hover,
  .cat-illustration.is-happy {
    transition: none;
    animation: none;
    transform: none;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: inline-block;
}

.title {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

.subtitle {
  margin: 0 auto 30px;
  max-width: 42ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  justify-content: center;
}

.primary-button {
  padding: 12px 26px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.primary-button:active {
  transform: scale(0.97);
}

.status-message {
  min-height: 1.6em;
  margin: 18px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.status-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 520px) {
  .page {
    padding: 18px 16px;
  }

  .card {
    padding: 34px 22px;
    border-radius: 22px;
  }

  .cat-illustration {
    width: 108px;
    height: 108px;
  }

  .subtitle {
    font-size: 0.98rem;
  }
}
