:root {
  --bg: #0b1020;
  --panel: #131a30;
  --panel-2: #1b2444;
  --text: #e8ecf6;
  --muted: #9aa6c4;
  --accent: #0b5fff;
  --accent-2: #2f80ff;
  --radius: 14px;
  --max: 1080px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #16224a 0%, var(--bg) 60%);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px 20px 60px; }
a { color: inherit; text-decoration: none; }

.nav {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.brand-dot { margin-left: 6px; }
.nav-links a { color: var(--muted); margin-left: 18px; font-weight: 600; font-size: 14px; }
.nav-links a:hover { color: var(--text); }

.hero { padding: 24px 0 12px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 10px; line-height: 1.1; }
.lead { color: var(--muted); font-size: 17px; max-width: 70ch; margin: 0 0 18px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-weight: 700; border: 0; cursor: pointer;
  transition: transform .05s ease, background .2s ease;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border: 1px solid #2a355f; color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }

.section { margin-top: 34px; }
.section h2 { font-size: 22px; margin: 0 0 16px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid #20294a; border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .08s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-emoji { font-size: 26px; }
.card-emoji.big { font-size: 40px; }
.card-title { font-weight: 800; font-size: 17px; }
.card-cat { color: var(--accent-2); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.card-desc { color: var(--muted); font-size: 14px; }

.profile, .profile-head, .chat-wrap { display: flex; flex-direction: column; gap: 12px; }
.profile-head { flex-direction: row; align-items: center; gap: 16px; }
.profile-head h1 { margin: 0; font-size: 30px; }

.chat-head { flex-direction: row; align-items: center; gap: 16px; display: flex; }
.chat-head h1 { margin: 0; font-size: 26px; }

.chat {
  background: var(--panel); border: 1px solid #20294a; border-radius: var(--radius);
  padding: 16px; min-height: 320px; max-height: 460px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.msg.bot { background: var(--panel-2); align-self: flex-start; }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; }
.chat-form { display: flex; gap: 10px; }
.chat-form input {
  flex: 1; background: var(--panel); border: 1px solid #2a355f; color: var(--text);
  padding: 12px 14px; border-radius: 10px; font-size: 15px; outline: none;
}
.chat-form input:focus { border-color: var(--accent); }

.footer {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; padding: 18px 20px;
  color: var(--muted); font-size: 13px; border-top: 1px solid #1a2240;
}

@media (max-width: 560px) {
  .nav-links a { margin-left: 12px; }
  .profile-head, .chat-head { flex-direction: column; align-items: flex-start; }
}
