:root {
  --bg: #0b0d12;
  --panel: #1e1f22;
  --panel-2: #2b2d31;
  --panel-3: #313338;
  --border: #3a3c42;
  --text: #f2f3f5;
  --text-muted: #b5bac1;
  --text-dim: #8c8f95;
  --accent: #5cf0c5;
  --accent-2: #43b9ff;
  --green: #23a55a;
  --red: #f23f43;
  --yellow: #f0b232;
  --bubble: #3f3945;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% 10%, #1c2340 0%, transparent 60%),
    radial-gradient(1000px 700px at 90% 90%, #2a1a3a 0%, transparent 60%),
    linear-gradient(160deg, #0a0b10 0%, #12131a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow-x: hidden;
}

.backdrop {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.02) 0%, transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><defs><pattern id='p' width='60' height='60' patternUnits='userSpaceOnUse'><circle cx='1' cy='1' r='1' fill='%23ffffff08'/></pattern></defs><rect width='100%25' height='100%25' fill='url(%23p)'/></svg>");
  z-index: 0;
  pointer-events: none;
}

.modal {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.04);
}

.close-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s;
}
.close-btn:hover { background: rgba(0,0,0,.6); }

/* ---------- LEFT ---------- */
.left {
  background: var(--panel);
  position: relative;
}

.banner { position: relative; height: 150px; }
.banner-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(92,240,197,.35), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(67,185,255,.35), transparent 55%),
    linear-gradient(135deg, #2d5b86 0%, #1f3a5f 40%, #1a2640 100%);
  filter: saturate(1.1);
}
.banner-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 150'><circle cx='80' cy='40' r='18' fill='%2358c49b' opacity='.6'/><circle cx='340' cy='30' r='12' fill='%23ffd76e' opacity='.7'/><path d='M0 140 Q100 90 200 120 T400 110 L400 150 L0 150 Z' fill='%23264d6a' opacity='.45'/></svg>");
  background-size: cover;
  opacity: .9;
}

.avatar-wrap {
  position: absolute;
  left: 18px; bottom: -46px;
  width: 104px; height: 104px;
}
.avatar {
  width: 104px; height: 104px;
  border-radius: 50%;
  background: #2b2d31;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 6px solid var(--panel);
  overflow: hidden;
  isolation: isolate;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.fallback { background: linear-gradient(135deg,#5865f2,#43b9ff); }
.avatar-fallback-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 30px; color: #fff;
  z-index: -1;
}
.avatar-decoration {
  position: absolute; inset: -10px;
  border-radius: 50%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='%2387d8a8'><circle cx='20' cy='20' r='6'/><circle cx='100' cy='18' r='5'/><circle cx='14' cy='60' r='4'/><circle cx='106' cy='62' r='5'/><circle cx='24' cy='100' r='5'/><circle cx='96' cy='102' r='4'/></g><g fill='%23ffd76e'><circle cx='60' cy='10' r='3'/><circle cx='110' cy='90' r='3'/></g></svg>");
  background-size: contain;
  pointer-events: none;
}

.status-dot {
  position: absolute;
  right: 4px; bottom: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red);
  border: 5px solid var(--panel);
  box-sizing: content-box;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--red);
  clip-path: inset(40% 0 40% 0);
}

.bubble {
  position: absolute;
  left: 140px; bottom: -10px;
  background: var(--bubble);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 8px;
  max-width: 240px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.bubble::before {
  content: "";
  position: absolute;
  left: -6px; top: 16px;
  width: 12px; height: 12px;
  background: var(--bubble);
  transform: rotate(45deg);
  border-radius: 2px;
}
.bubble-heart { color: #ff5a7a; font-size: 14px; line-height: 1.2; }

/* ---------- INFO ---------- */
.info { padding: 64px 22px 22px; }

.display-name {
  font-size: 26px;
  color: var(--accent);
  margin: 0 0 4px;
  letter-spacing: .2px;
}
.username-row {
  display: flex; align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.dot-sep { color: var(--text-dim); }
.pronoun { color: var(--text-muted); }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #2b2d31;
  color: var(--text);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
  border: 1px solid var(--border);
}
.tag-ico { color: #ffd76e; font-size: 10px; }

.badges {
  display: flex; gap: 6px;
  margin-bottom: 14px;
}
.badge {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 18%, #2b2d31);
  color: var(--c);
  font-size: 13px;
  cursor: default;
  transition: transform .15s;
}
.badge:hover { transform: translateY(-2px); }

.action-row {
  display: flex; gap: 8px;
  margin-bottom: 18px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background: #1e8e4c; }
.btn-icon {
  background: #2b2d31;
  color: var(--text);
  padding: 8px 10px;
}
.btn-icon:hover { background: #393b40; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 18px;
}
.btn-outline:hover { background: rgba(255,255,255,.05); }

.about .link {
  color: #00a8fc;
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}
.about .link:hover { text-decoration: underline; }
.tagline { margin: 6px 0 10px; font-size: 14px; color: var(--text); }
.meta {
  margin: 4px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.meta-key { color: var(--text); font-weight: 500; }
.meta.muted { color: var(--text-dim); }

.section { margin-top: 18px; }
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.sub {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.ext { color: var(--text-dim); font-size: 11px; margin-left: 4px; }

.connections {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.connections li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.conn-ico {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

/* ---------- RIGHT ---------- */
.right {
  background: var(--panel-3);
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 14px;
}

.tabs {
  display: flex; gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 2px;
}
.tab {
  background: none; border: none;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  cursor: pointer;
  position: relative;
}
.tab.active { color: var(--text); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.tab:hover { color: var(--text); }

.widget-head {
  display: flex; justify-content: space-between; align-items: center;
}
.widget-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.widget-card {
  background: var(--panel-2);
  border-radius: 10px;
  padding: 16px;
}
.widget-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px;
  gap: 10px;
}
.widget-card-head h4 { margin: 0 0 2px; font-size: 15px; }
.widget-card-head .sub { font-size: 12px; }

.game-list {
  display: flex; flex-direction: column; gap: 10px;
}
.game {
  display: flex; gap: 12px;
  padding: 8px;
  border-radius: 8px;
  transition: background .15s;
}
.game:hover { background: rgba(255,255,255,.04); }
.game-art {
  width: 92px; height: 56px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  letter-spacing: .5px;
  text-align: center;
  padding: 4px;
  flex-shrink: 0;
}
.game-meta {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.game-title { font-size: 14px; font-weight: 500; }
.chip {
  align-self: flex-start;
  font-size: 11px;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
}

.show-more {
  align-self: flex-start;
  background: none; border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
  padding: 0;
}
.show-more:hover { color: var(--text); text-decoration: underline; }

.credit {
  position: fixed;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  z-index: 2;
  pointer-events: none;
}
.credit span { pointer-events: auto; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .modal { grid-template-columns: 1fr; }
  .bubble { display: none; }
}
@media (max-width: 520px) {
  .info { padding: 60px 16px 18px; }
  .display-name { font-size: 22px; }
  .avatar-wrap { left: 14px; }
}
