* { box-sizing: border-box; margin: 0; padding: 0; }
/* The `hidden` attribute must win over id/class display rules like #client or
   .center that would otherwise keep hidden elements visible. */
[hidden] { display: none !important; }
:root {
  --bg: #12100f; --panel: #1b1817; --panel-2: #241f1e; --line: #322b29;
  --text: #f2ece9; --muted: #9c8f8a; --brand: #fd5068; --brand-2: #ff7854;
  --me: #fd5068; --them: #2b2523;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); overflow: hidden;
}
.center { display: flex; align-items: center; justify-content: center; height: 100vh; }
.muted { color: var(--muted); }

.gate-card { text-align: center; }
.gate-card h1 { font-size: 56px; margin-bottom: 12px; }
.gate-card p { color: var(--muted); }

#client { display: flex; height: 100vh; }
#sidebar { width: 300px; min-width: 300px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
#sidebar-header { padding: 16px; border-bottom: 1px solid var(--line); font-weight: 700;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#matches { list-style: none; overflow-y: auto; flex: 1; }
.match { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.match:hover, .match.active { background: var(--panel-2); }
.match img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.match .name { font-weight: 600; font-size: 15px; }

#chat { flex: 1; display: flex; flex-direction: column; }
#chat-view { display: flex; flex-direction: column; height: 100%; }
#chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
#chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
#chat-name { font-weight: 600; font-size: 16px; }
#messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 62%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.bubble.them { background: var(--them); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--me); align-self: flex-end; border-bottom-right-radius: 4px; }
#composer { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
#composer-input { flex: 1; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; outline: none; }
#composer-input:focus { border-color: var(--brand); }
button { font: inherit; cursor: pointer; border: none; border-radius: 999px; padding: 10px 18px; color: white; background: linear-gradient(90deg, var(--brand), var(--brand-2)); font-weight: 600; }
