:root {
  --bg0: #020203;
  --bg1: #050607;
  --glass: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.86);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(900px 700px at 50% -10%, var(--bg1) 0%, var(--bg0) 62%, #000 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  overflow-x: hidden;
}

/* Quiet “liquid glass” motion (almost invisible, very dark) */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;

  opacity: 0.55;

  background:
    radial-gradient(520px 420px at 22% 32%, rgba(130, 180, 255, 0.10) 0%, rgba(130, 180, 255, 0) 62%),
    radial-gradient(560px 420px at 74% 40%, rgba(190, 150, 255, 0.08) 0%, rgba(190, 150, 255, 0) 62%),
    radial-gradient(720px 520px at 50% 74%, rgba(120, 255, 215, 0.05) 0%, rgba(120, 255, 215, 0) 66%),
    radial-gradient(900px 700px at 50% 50%, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 72%);

  filter: blur(26px);
  animation: drift 18s ease-in-out infinite alternate;
}

main {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.ip-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
}

.msg-form {
  width: min(520px, 100%);
}

.msg-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.msg-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.msg-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.msg-input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(130, 180, 255, 0.10);
}

.msg-send {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  cursor: pointer;
  user-select: none;
}

.msg-send:hover {
  background: rgba(255, 255, 255, 0.11);
}

.msg-send:active {
  transform: translateY(1px);
}

.msg-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat {
  width: min(620px, 100%);
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.chat-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.chat-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.chat-log {
  height: min(46vh, 360px);
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg--user .chat-bubble {
  background: rgba(130, 180, 255, 0.10);
  border-color: rgba(130, 180, 255, 0.18);
}

.chat-form {
  padding: 12px 12px 0;
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.chat-input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(190, 150, 255, 0.10);
}

.chat-send {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  cursor: pointer;
  user-select: none;
}

.chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-hint {
  margin: 10px 14px 12px;
  min-height: 1em;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.ip-card {
  margin: 0;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  max-width: min(420px, 100%);
}

.ip-label {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.ip-value {
  margin: 0;
  font-size: clamp(18px, 3.8vw, 22px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.loc-label {
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.loc-value {
  margin: 0;
  font-size: clamp(15px, 3.2vw, 18px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.loc-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.38);
}

h1 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1;

  padding: 14px 20px;
  border-radius: 14px;

  border: 1px solid var(--stroke);
  background:
    radial-gradient(120px 110px at 18% 20%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

@keyframes drift {
  0% {
    transform: translate3d(-1.2%, -0.8%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(1.2%, 0.8%, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}
