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

:root {
  --bg: #0a0a0f;
  --bg-card: #11121a;
  --bg-chat: #0c0d14;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --radius-pill: 999px;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1e1b4b 0, #0a0a0f 60%);
  color: var(--text-main);
  font-family: var(--font-main);
  height: 100vh;
  overflow: hidden;
}

/* PAGE WRAPPER */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.25));
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.subtitle {
  color: var(--text-muted);
  margin: 0;
}

.header-text {
  margin-top: 8px;
  opacity: 0.9;
}

/* ADS */
.ad-section {
  margin-bottom: 14px;
  padding: 10px 0;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 16px;
}

/* FULLSCREEN CHAT */
.chat-fullscreen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* CHAT CARD */
.chat-card {
  flex: 1;
  display: flex;
  flex-direction: column;

  background: var(--bg-card);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);

  min-height: 0;
}

/* CHAT BOX */
.chat-box {
  flex: 1;
  overflow-y: auto;

  background: var(--bg-chat);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);

  padding: 20px;
  margin-bottom: 14px;

  font-size: 1.1rem;
  line-height: 1.7;
  letter-spacing: 0.2px;

  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* SCROLLBAR */
.chat-box::-webkit-scrollbar {
  width: 8px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

/* CHAT BUBBLES */
.message {
  margin-bottom: 16px;
  display: flex;
}

.message .bubble {
  padding: 14px 18px;
  border-radius: 14px;
  max-width: 100%;
}

/* USER */
.message.user {
  justify-content: flex-end;
}
.message.user .bubble {
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(129, 140, 248, 0.6);
}

/* BOT */
.message.assistant {
  justify-content: flex-start;
}
.message.assistant .bubble {
  background: #141726;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
}

/* INPUT */
.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #0d1020;
  color: white;
  font-size: 1rem;
}

.input-row button {
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--accent-strong);
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* FOOTER */
.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
