/* ==========================================================================
   DENTRIX — shared design tokens
   Canvas dark, purple/cyan duotone, blueprint-grid signature
   ========================================================================== */

:root{
  --canvas:      #0a0912;
  --canvas-2:    #100e1c;
  --surface:     rgba(255,255,255,0.04);
  --surface-hi:  rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.09);
  --border-hi:   rgba(255,255,255,0.16);

  --purple:      #8b5cf6;
  --purple-dim:  #6d4cd1;
  --cyan:        #22d3ee;
  --cyan-dim:    #17a8bd;

  --text:        #f5f3ff;
  --text-muted:  #9891b0;
  --text-faint:  #6b6580;

  --danger:      #f87171;
  --good:        #34d399;

  --radius:      14px;
  --radius-sm:   9px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* blueprint grid backdrop, used behind hero / empty states */
.grid-bg{
  position: relative;
  background-image:
    linear-gradient(rgba(139,92,246,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center top;
}
.grid-bg::after{
  content:'';
  position:absolute; inset:0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139,92,246,0.16), transparent 70%);
  pointer-events:none;
}

a{ color: inherit; text-decoration:none; }
button{ font-family: inherit; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1,h2,h3{ font-family: var(--font-display); margin:0; letter-spacing: -0.01em; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family: var(--font-body); font-weight:600; font-size:14px;
  padding: 12px 22px; border-radius: 999px; border:1px solid transparent;
  cursor:pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active{ transform: scale(0.97); }
.btn-primary{
  background: linear-gradient(135deg, var(--purple), var(--cyan-dim));
  color: #fff;
}
.btn-primary:hover{ filter: brightness(1.1); }
.btn-ghost{
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ background: var(--surface-hi); border-color: var(--border-hi); }
.btn-danger{ background: rgba(248,113,113,0.14); border-color: rgba(248,113,113,0.35); color: #fca5a5; }
.btn-sm{ padding: 7px 14px; font-size: 12.5px; }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

.glass{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.input, select.input, textarea.input{
  width:100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}
.input:focus{ border-color: var(--purple); }
.input::placeholder{ color: var(--text-faint); }
label.field-label{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display:block;
  margin-bottom: 6px;
}

::selection{ background: var(--purple); color:#fff; }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: var(--border-hi); border-radius: 8px; }

/* top nav shared across pages */
.topnav{
  position: sticky; top:0; z-index: 50;
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 32px;
  background: rgba(10,9,18,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-display); font-weight:700; font-size:18px;
  letter-spacing: -0.02em;
}
.brand-mark{
  width:26px; height:26px; border-radius:7px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  position: relative;
  transform: rotate(0deg);
}
.brand-mark::before{
  content:''; position:absolute; inset:5px;
  border: 1.5px solid rgba(10,9,18,0.65);
  border-radius:3px;
}
.nav-links{ display:flex; align-items:center; gap:28px; }
.nav-links a{
  font-size: 14px; color: var(--text-muted); font-weight:500;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--text); }

.toast{
  position: fixed; bottom: 24px; left:50%; transform: translateX(-50%);
  background: var(--canvas-2); border:1px solid var(--border-hi);
  padding: 12px 20px; border-radius: 999px; font-size:13px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 999; opacity:0; pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(-4px); }

/* ==========================================================================
   Social layer — shared across launcher, studio, profile, messages, index
   ========================================================================== */

/* notification bell + dropdown */
.dx-bell-wrap{ position:relative; }
.dx-bell-btn{
  position:relative; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background: var(--surface); border:1px solid var(--border); color: var(--text); cursor:pointer; font-size:15px;
}
.dx-bell-btn:hover{ background: var(--surface-hi); border-color: var(--border-hi); }
.dx-bell-dot{
  display:none; position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%;
  background: var(--danger); border:1.5px solid var(--canvas);
}
.dx-bell-dot.show{ display:block; }
.dx-bell-panel{
  display:none; position:absolute; top:calc(100% + 10px); right:0; z-index:200; width:320px; max-height:420px; overflow-y:auto;
  background: var(--canvas-2); border:1px solid var(--border-hi); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dx-bell-panel.open{ display:block; }
.dx-bell-head{ font-family: var(--font-display); font-weight:600; font-size:13.5px; padding:14px 16px 10px; border-bottom:1px solid var(--border); }
.dx-bell-list{ display:flex; flex-direction:column; }
.dx-bell-item{
  display:flex; flex-direction:column; gap:3px; padding:11px 16px; border-bottom:1px solid var(--border);
  font-size:12.5px; color: var(--text-muted); transition: background .12s ease;
}
.dx-bell-item:last-child{ border-bottom:none; }
.dx-bell-item:hover{ background: var(--surface); }
.dx-bell-item.unread{ background: rgba(139,92,246,0.07); }
.dx-bell-item.unread .dx-bell-text{ color: var(--text); }
.dx-bell-text b{ color: var(--text); font-weight:600; }
.dx-bell-time{ font-family: var(--font-mono); font-size:10.5px; color: var(--text-faint); }
.dx-bell-empty{ padding: 26px 16px; text-align:center; color: var(--text-faint); font-size:12.5px; }

/* small colored circle with initials — used anywhere a mini avatar is needed */
.avatar-circle{
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:14px; color:#fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.avatar-circle.sm{ width:28px; height:28px; font-size:11px; }
.avatar-circle.lg{ width:84px; height:84px; font-size:28px; }

/* like button, used on game cards + game detail views */
.like-btn{
  display:inline-flex; align-items:center; gap:6px; font-family: var(--font-mono); font-size:12px;
  background: var(--surface); border:1px solid var(--border); color: var(--text-muted);
  padding:6px 12px; border-radius:999px; cursor:pointer; transition: border-color .15s ease, color .15s ease;
}
.like-btn:hover{ border-color: var(--border-hi); }
.like-btn.liked{ color:#fb7185; border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.08); }

/* relationship status pill — follow/friend state indicators */
.status-chip{
  display:inline-flex; align-items:center; gap:5px; font-family: var(--font-mono); font-size:10.5px;
  letter-spacing:.04em; padding:3px 9px; border-radius:999px; color: var(--text-muted); border:1px solid var(--border-hi);
}
.status-chip.on{ color: var(--good); border-color: rgba(52,211,153,0.4); }
