@charset "UTF-8";
:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --card-bg: #fafafa;
  --card-bg-g: rgba(255, 255, 255, 0.8);
  --card-border: #ccd;
  --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  --accent: #6b7b8c;
  --accent-soft: #e8f0ff;
  --text-main: #111827;
  --text-soft: #555863;
  --key: #111827;
  --input-bg: #ffffff;
  --input-border: #d2d6db;
  --placeholder: #9ba1ab;
  --output-bg: #f9fafb;
  --output-border: #e5e7eb;
  --button-border: #d1d5db;
  --radius-card: 24px;
  --radius-input: 16px;
  --radius-button: 999px;
  --noise-opacity: 0.2;
  --noise-contrast: 15%;
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050812;
    --card-bg: #0b1020;
    --card-bg-g: rgba(11, 16, 32, 0.88);
    --card-border: #667;
    --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    --accent: #32b1ff;
    --accent-soft: rgba(50, 177, 255, 0.18);
    --text-main: #f5f7ff;
    --text-soft: #c2c7d1;
    --key: #f9f9ff;
    --input-bg: rgba(9, 14, 26, 0.8);
    --input-border: #2a3245;
    --placeholder: #707894;
    --output-bg: #070b19;
    --output-border: #2b3347;
    --button-border: #323a4f;
    --noise-opacity: 0.18;
    --noise-contrast: 30%;
  }
}
.reply-block {
  white-space: pre-wrap;
  margin: 0;
}
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-ui);
}
body {
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: .15;
  mix-blend-mode: normal;
}
html.theme-ready .card,
html.theme-ready .output-box,
html.theme-ready .input-box textarea,
html.theme-ready .button-row .btn {
  transition: box-shadow 660ms ease-in-out;
}
pre, code, .reply-block, .mono {
  font-family: var(--font-mono);
}
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}
@supports (height: 100dvh) {
  .page {
    min-height: 100dvh;
  }
}
.card {
  width: 100%;
  max-width: 1080px;
  background:
    linear-gradient(var(--card-bg-g), var(--card-bg-g)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/120px 120px repeat,
    var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 2.2rem 2.4rem;
  display: flex;
  gap: 2.4rem;
  position: relative;
  overflow: hidden;
  margin: 0.75rem 0;
}
.left-col {
  width: 260px;
  text-align: center;
  flex-shrink: 0;
}
.bot-avatar {
  width: 230px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.bot-title {
  margin: 0.5rem 0 0.25rem;
  font-size: 2.1rem;
  letter-spacing: 0.04em;
}
.bot-status {
  margin-top: 0.2rem;
  font-size: 0.98rem;
  color: var(--text-soft);
}
.bot-avatar.glowing {
  filter:
    drop-shadow(0 0 6px rgba(50, 177, 255, 0.5))
    drop-shadow(0 0 18px rgba(50, 177, 255, 0.2))
    drop-shadow(0 0 32px rgba(50, 177, 255, 0.1));
  transform: scale(1.01);
  transition: filter 0.25s ease, transform 0.25s ease;
  animation: botGlowPulse 2.4s ease-in-out infinite;
}
@keyframes botGlowPulse {
  0% {
    filter:
      drop-shadow(0 0 4px rgba(50, 177, 255, 0.3))
      drop-shadow(0 0 10px rgba(50, 177, 255, 0.1))
      drop-shadow(0 0 22px rgba(50, 177, 255, 0.05));
    transform: scale(1);
  }
  50% {
    filter:
      drop-shadow(0 0 8px rgba(50, 177, 255, 0.7))
      drop-shadow(0 0 18px rgba(50, 177, 255, 0.3))
      drop-shadow(0 0 35px rgba(50, 177, 255, 0.2));
    transform: scale(1.01);
  }
  100% {
    filter:
      drop-shadow(0 0 4px rgba(50, 177, 255, 0.3))
      drop-shadow(0 0 10px rgba(50, 177, 255, 0.1))
      drop-shadow(0 0 22px rgba(50, 177, 255, 0.05));
    transform: scale(1);
  }
}
.right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.input-box {
  margin-bottom: 1rem;
}
.input-box input:focus,
.input-box textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(50, 177, 255, 0.35);
  background: var(--input-bg);
  min-height: 46px;
  border-radius: var(--radius-input);
}
.input-box textarea {
  resize: none;
  line-height: 1.4;
}
.button-row {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: transparent;
  color: var(--text-main);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease;
  font-family: var(--font-ui);
  font-weight: 600;
}
.btn-primary {
  background: var(--bg);
  border: 2px solid #d1d5db;
  color: var(--text-main);
}
.btn-secondary {
  background: var(--bg);
  border: 1px solid #d1d5db;
  color: var(--text-main);
}
.btn-primary:hover,
.btn-secondary:hover {
  background: var(--card-bg);
}
.output-box {
  flex: 1;
  border-radius: 20px;
  border: 1px solid var(--output-border);
  background: var(--output-bg);
  padding: 1.2rem 1.3rem;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.95rem;
  overflow-y: auto;
  min-height: 360px;
  max-height: 360px;
}
.output-box strong {
  font-weight: 700;
}
.output-box p {
  margin: 0.2rem 0 0.7rem;
}
.key {
  font-weight: 600;
  color: var(--key);
}
.dim {
  color: var(--text-soft);
  font-weight: 400;
}
.output-box.error {
  border-color: #ff5370;
}
.theme-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.theme-toggle:hover {
  opacity: 1;
}
.theme-toggle img {
  width: 22px;
  height: 22px;
}
@media (max-width: 720px) {
  .card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.6rem 1.5rem 2rem;
  }
  .left-col {
    width: 100%;
  }
  .bot-avatar {
    width: 190px;
  }
  .bot-title {
    font-size: 1.8rem;
  }
  .button-row {
    flex-direction: column;
  }
  .output-box {
    min-height: 220px;
    max-height: 220px;
    overflow-y: auto;
  }
}
@media (max-width: 720px) {
  body.scrolled .bot-avatar {
    transform: scale(0.7);
    opacity: 0.9;
  }
}
@media (max-width: 720px) {
  .left-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center !important;
    margin-bottom: 1rem;
    min-height: 190px;
  }
  .bot-avatar {
    width: 70px !important;
    margin: 0 0 0.35rem 0;
  }
  .bot-title {
    margin: 0;
    padding: 0;
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .bot-status {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: var(--text-soft);
  }
  .right-col {
    width: 100%;
  }
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --card-bg: #fafafa;
  --card-bg-g: rgba(255, 255, 255, 0.8);
  --card-border: #ccd;
  --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  --accent: #6b7b8c;
  --accent-soft: #e8f0ff;
  --text-main: #111827;
  --text-soft: #555863;
  --key: #111827;
  --input-bg: #ffffff;
  --input-border: #d2d6db;
  --placeholder: #9ba1ab;
  --output-bg: #f9fafb;
  --output-border: #e5e7eb;
  --button-border: #d1d5db;
  --noise-opacity: 0.2;
  --noise-contrast: 15%;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050812;
  --card-bg: #0b1020;
  --card-bg-g: rgba(11, 16, 32, 0.88);
  --card-border: #667;
  --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  --accent: #32b1ff;
  --accent-soft: rgba(50, 177, 255, 0.18);
  --text-main: #f5f7ff;
  --text-soft: #c2c7d1;
  --key: #f9f9ff;
  --input-bg: rgba(9, 14, 26, 0.8);
  --input-border: #2a3245;
  --placeholder: #707894;
  --output-bg: #070b19;
  --output-border: #2b3347;
  --button-border: #323a4f;
  --noise-opacity: 0.18;
  --noise-contrast: 30%;
}
@media (max-width: 720px) {
  .left-col {
    margin-bottom: 0;
    transition: margin-bottom 0.2s ease;
  }
  .card.has-status .left-col {
    margin-bottom: 0.6rem;
  }
}
@media (max-width: 720px) {
  .output-box.initial-hidden {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
.right-col input[type="text"],
.right-col textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1.1rem;
  font-size: 1.02rem;
  background: var(--input-bg, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--input-border, #d2d6db);
  color: var(--text-main, #111827);
  outline: none;
  min-height: 46px;
}
.right-col input[type="text"]::placeholder,
.right-col textarea::placeholder {
  color: var(--placeholder, #9ba1ab);
}
.right-col input[type="text"]:focus,
.right-col textarea:focus {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px rgba(50, 177, 255, 0.35);
}
@media (max-width: 480px) {
  body {
    padding-top: 0 !important;
    padding-bottom: 0;
    min-height: auto;
    display: block;
  }
  main {
    margin-top: 0 !important;
  }
}
@media (min-width: 481px) and (max-width: 1024px) {
  body {
    padding-top: 0 !important;
    padding-bottom: 0;
    min-height: auto;
    display: block;
  }
  .card {
    margin: 0.5rem 0;
  }
  main {
    margin-top: 0 !important;
  }
}