:root {
  --bg: #0b0d10;
  --card: #12161b;
  --line: #222831;
  --text: #e6e8eb;
  --muted: #8b929a;
  --accent: #7cc7ff;
  --accent-2: #b3e0ff;
  --on-accent: #06243a;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2230 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent-2); }

.top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform .15s, border-color .15s, color .15s;
}
.socials a:hover { transform: translateY(-2px) rotate(-6deg); border-color: var(--accent); color: var(--accent); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.socials svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.socials svg.stroke .dot { fill: currentColor; stroke: none; }

main { max-width: 880px; margin: 0 auto; padding: 0 20px; }

.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 .4rem; letter-spacing: -.03em; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 560px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 .25rem; font-size: 1.25rem; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Chat */
.messages {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px; overflow-y: auto;
  margin: 16px 0 12px;
}
.messages:empty { display: none; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #1b2129; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.error { border-color: #7a2e2e; color: #f3b1b1; }
.msg.typing::after { content: "Thinking"; animation: dots 1.2s steps(4) infinite; }
@keyframes dots {
  0% { content: "Thinking"; }
  25% { content: "Thinking."; }
  50% { content: "Thinking.."; }
  75% { content: "Thinking..."; }
}

.chips[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chips button {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer;
}
.chips button:hover { border-color: var(--accent); color: var(--accent); }

.composer { display: flex; gap: 8px; }
.composer input {
  flex: 1; min-width: 0;
  background: #0e1216; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font: inherit;
}
.composer input:focus { outline: none; border-color: var(--accent); }
.composer button {
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 12px; padding: 0 18px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.composer button:disabled { opacity: .5; cursor: default; }

/* Flights */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: #0e1216; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 1.4rem; color: var(--accent); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.globe { width: 100%; height: 460px; border: 0; border-radius: 12px; background: #05070a; display: block; }

/* Spotify */
.card[hidden] { display: none; }
.artists { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.artists a { display: block; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.artists img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 8px; border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.artists a:hover { color: var(--accent); }
.artists a:hover img { transform: scale(1.04); border-color: var(--accent); }
.artists .rank { color: var(--accent); margin-right: 4px; }

/* CR7 news */
.news-list { list-style: none; margin: 14px 0 0; padding: 0; }
.news-list li { border-top: 1px solid var(--line); padding: 12px 0; }
.news-list li:first-child { border-top: 0; }
.news-list a { color: var(--text); text-decoration: none; font-weight: 600; }
.news-list a:hover { color: var(--accent); }
.news-list .meta { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }

footer { text-align: center; padding: 20px 20px 40px; }
