.chat-page {
  width: min(1180px, calc(100% - 28px));
  margin: 40px auto 70px;
}

.chat-hero {
  padding: clamp(28px, 5vw, 58px);
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 122, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(70, 30, 15, 0.92), rgba(16, 7, 10, 0.96));
  border: 1px solid rgba(255, 210, 122, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.chat-hero h1 {
  margin: 8px 0 16px;
  color: #ffd27a;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
}

.chat-hero p {
  max-width: 820px;
  margin: 0 auto;
  color: #f1dfbd;
  font-size: 20px;
  line-height: 1.55;
}

.chat-demo-banner {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #ffe1a3;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 210, 122, 0.26);
  font-weight: 800;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 26px;
}

.chat-panel,
.chat-side-card {
  padding: clamp(22px, 4vw, 34px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 235, 190, 0.10), rgba(255, 235, 190, 0.04)),
    rgba(25, 11, 12, 0.88);
  border: 1px solid rgba(255, 210, 122, 0.22);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.chat-panel-header h2,
.chat-side-card h2 {
  margin: 0 0 8px;
  color: #ffd27a;
  font-size: clamp(30px, 4vw, 44px);
}

.chat-panel-header p,
.chat-side-card li,
.chat-hint {
  color: #ead8b8;
  line-height: 1.5;
}

.chat-clear-button {
  border: 1px solid rgba(255, 210, 122, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffe1a3;
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.chat-clear-button:hover {
  border-color: rgba(255, 210, 122, 0.48);
}

.chat-messages {
  height: 420px;
  overflow-y: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 210, 122, 0.16);
}

.chat-message {
  display: grid;
  gap: 5px;
  max-width: 82%;
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255, 210, 122, 0.10);
  border: 1px solid rgba(255, 210, 122, 0.14);
}

.chat-message.system {
  max-width: 100%;
  background: rgba(126, 88, 255, 0.10);
}

.chat-message.own {
  margin-left: auto;
  background: rgba(255, 210, 122, 0.16);
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #ffd27a;
  font-size: 13px;
  font-weight: 800;
}

.chat-message-text {
  color: #f5e4c2;
  line-height: 1.45;
  word-break: break-word;
}

.chat-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.chat-form label {
  display: grid;
  gap: 7px;
  color: #ffe1a3;
  font-weight: 800;
}

.chat-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 210, 122, 0.24);
  color: #ffe8bd;
  background: rgba(0, 0, 0, 0.28);
}

.chat-form button {
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  color: #4d240e;
  background: linear-gradient(180deg, #ffd27a, #c9852f);
  font-weight: 900;
  cursor: pointer;
}

.chat-form button:hover {
  transform: translateY(-1px);
}

.chat-hint {
  margin: 12px 0 0;
  font-size: 14px;
}

.chat-side-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

@media (max-width: 980px) {
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .chat-page {
    width: min(100% - 16px, 1180px);
    margin-top: 18px;
  }

  .chat-hero,
  .chat-panel,
  .chat-side-card {
    border-radius: 22px;
  }

  .chat-messages {
    height: 360px;
  }

  .chat-message {
    max-width: 100%;
  }
}
