:root {
  --navy: #07111f;
  --navy-2: #0b192c;
  --panel: #0f2137;
  --blue: #1577d2;
  --blue-bright: #2f9df4;
  --ice: #eef6fd;
  --text: #17263a;
  --muted: #63748a;
  --line: #dbe6f0;
  --white: #fff;
  --shadow: 0 28px 80px rgba(1, 20, 41, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #eaf1f7;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}
button, textarea { font: inherit; }
button { cursor: pointer; }

.reveal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #070c12;
  transition: opacity .8s ease, visibility .8s ease;
}
.reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.reveal video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reveal.is-finished { opacity: 0; visibility: hidden; }
.skip-reveal {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 10px 16px;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.26);
  backdrop-filter: blur(10px);
}

.app {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  background: var(--white);
  opacity: 1;
  transform: scale(1);
  transition: opacity .7s ease, transform .7s ease;
}
.app.is-hidden { opacity: 0; transform: scale(1.015); }

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 32px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 12%, rgba(47,157,244,.24), transparent 34%),
    linear-gradient(155deg, var(--navy-2), var(--navy));
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(73,168,242,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(73,168,242,.035), 0 0 0 104px rgba(73,168,242,.025);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-mark { position: relative; width: 42px; height: 42px; }
.brand-mark span { position: absolute; height: 5px; border-radius: 3px; background: var(--blue-bright); transform: rotate(-45deg); }
.brand-mark span:nth-child(1) { width: 35px; left: 0; top: 10px; }
.brand-mark span:nth-child(2) { width: 30px; left: 11px; top: 20px; }
.brand-mark span:nth-child(3) { width: 23px; left: 1px; top: 29px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.brand-subtitle { margin-top: 2px; color: #9fc8e8; font-size: 12px; }
.status-card {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  margin-top: 64px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(8px);
}
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #4dd792; box-shadow: 0 0 0 5px rgba(77,215,146,.1); }
.status-card strong { font-size: 13px; }
.status-card p { margin: 6px 0 0; color: #a9bdd0; font-size: 12px; line-height: 1.5; }
.sidebar-copy { position: relative; z-index: 1; margin-top: auto; padding: 44px 0; }
.sidebar-copy h2 { max-width: 230px; margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.035em; }
.sidebar-copy p { max-width: 250px; margin: 18px 0 0; color: #9fb3c7; font-size: 13px; line-height: 1.65; }
.confidential { position: relative; z-index: 1; color: #6f879e; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }

.chat-shell { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; background: #f7fafc; }
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 36px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
}
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.chat-header h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.online-pill { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #d7e5ef; border-radius: 999px; color: #3d5b72; background: #f8fbfd; font-size: 11px; font-weight: 600; }
.online-pill span { width: 7px; height: 7px; border-radius: 50%; background: #27be76; }

.messages { overflow-y: auto; padding: 34px max(36px, calc((100% - 900px)/2)); scroll-behavior: smooth; }
.message { display: flex; align-items: flex-start; gap: 13px; max-width: 760px; margin: 0 0 24px; animation: rise .35s ease both; }
.message.user-message { margin-left: auto; flex-direction: row-reverse; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; color: var(--white); background: linear-gradient(145deg, var(--blue-bright), #0e65b5); font-size: 10px; font-weight: 700; box-shadow: 0 8px 20px rgba(21,119,210,.2); }
.user-message .avatar { background: #d9e5ef; color: #4e6478; box-shadow: none; }
.message-content { padding: 15px 17px; border: 1px solid var(--line); border-radius: 4px 16px 16px; background: var(--white); box-shadow: 0 7px 22px rgba(20,46,72,.055); line-height: 1.6; font-size: 13px; }
.user-message .message-content { border: none; border-radius: 16px 4px 16px 16px; color: var(--white); background: linear-gradient(145deg, #1677ce, #0f67b8); }
.message-content p { margin: 0; white-space: pre-wrap; }
.message-content p + p { margin-top: 10px; }
.message-note { color: var(--muted); font-size: 11px; }
.typing { display: inline-flex; gap: 5px; padding: 4px 1px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: #79a8cb; animation: pulse 1.1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .14s; }
.typing span:nth-child(3) { animation-delay: .28s; }
.suggestions { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0 24px 47px; }
.suggestions button { border: 1px solid #ccdce9; border-radius: 999px; padding: 9px 13px; color: #3e5d74; background: rgba(255,255,255,.8); font-size: 11px; transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.suggestions button:hover { transform: translateY(-1px); color: var(--blue); border-color: #86bce5; }

.composer-area { padding: 14px max(36px, calc((100% - 900px)/2)) 18px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.beta-warning { margin-bottom: 9px; color: #7b6842; font-size: 10px; }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 8px 8px 8px 16px; border: 1px solid #cbdbe7; border-radius: 16px; background: var(--white); box-shadow: 0 12px 34px rgba(21,50,78,.08); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #68ace1; box-shadow: 0 12px 34px rgba(21,119,210,.13); }
.composer textarea { width: 100%; max-height: 130px; resize: none; border: 0; outline: 0; padding: 8px 0; color: var(--text); background: transparent; font-size: 13px; line-height: 1.5; }
.composer textarea::placeholder { color: #91a0af; }
.composer button { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 12px; background: linear-gradient(145deg, var(--blue-bright), #126dbd); box-shadow: 0 7px 17px rgba(21,119,210,.25); }
.composer button:disabled { opacity: .5; cursor: wait; }
.composer svg { width: 19px; fill: white; }
.footer-note { margin: 9px 0 0; color: #9aa7b3; text-align: center; font-size: 9px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pulse { 0%, 70%, 100% { transform: translateY(0); opacity: .4; } 35% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .chat-header { padding: 20px; }
  .messages { padding: 24px 18px; }
  .composer-area { padding: 12px 16px 15px; }
  .suggestions { margin-left: 0; }
  .skip-reveal { right: 16px; bottom: 16px; }
  .reveal video { object-fit: contain; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
