:root {
  --bg-1: #062925;
  --bg-2: #0a4a43;
  --accent: #ff7a18;
  --accent-2: #00b894;
  --card: #ffffff;
  --text: #0b1f1b;
  --muted: #3e5b55;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Sora', 'Trebuchet MS', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 460px at 5% 0%, #f59e0b66 0%, transparent 55%),
    radial-gradient(1000px 500px at 95% 100%, #2dd4bf66 0%, transparent 55%),
    linear-gradient(120deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 24px;
}

.wrap {
  width: min(760px, 100%);
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 28px 60px rgba(2, 35, 30, 0.38);
  animation: rise-in 350ms ease-out;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.8vw, 2.5rem);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 6px 0 14px;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  color: #114d42;
  background: #ddf7ef;
  border-radius: 999px;
  padding: 6px 10px;
}

.admin-link {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
}

.admin-link:hover {
  text-decoration: underline;
}

#messages {
  height: 390px;
  overflow-y: auto;
  border: 1px solid #d5e6e1;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fffd, #f2faf8);
}

.msg {
  margin: 8px 0;
  line-height: 1.45;
  padding: 11px 12px;
  border-radius: 10px;
  max-width: 90%;
  animation: fade-in 220ms ease-out;
}

.user {
  margin-left: auto;
  background: #e6f2ff;
  color: #1c3f63;
}

.bot {
  background: #e7fff5;
  color: #145245;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.controls {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
}

.controls label {
  font-size: 13px;
  color: #30554d;
  display: flex;
  align-items: center;
  gap: 8px;
}

select {
  border: 1px solid #bfd8d2;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}

.stream-label {
  margin-left: auto;
}

input {
  flex: 1;
  padding: 12px;
  border: 1px solid #bfd8d2;
  border-radius: 10px;
  font-size: 15px;
}

input:focus {
  outline: 2px solid #8de1ce;
  border-color: #5abca6;
}

button {
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  body {
    padding: 14px;
  }

  .wrap {
    padding: 16px;
  }

  #messages {
    height: 58vh;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .stream-label {
    margin-left: 0;
  }
}