/* ==========================================================================
   SPECTRILIS GAMING — stylesheet
   Design language: dark "obsidian" base, inventory-panel construction
   (notched corners, 2px pixel borders, hotbar-slot status readout)
   instead of rounded AI-template cards.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root{
  --bg:        #0b0c0f;
  --bg-2:      #101217;
  --panel:     #15171d;
  --panel-2:   #1b1e26;
  --line:      #2a2e37;
  --line-soft: #21242c;

  --text:      #e9e6de;
  --text-dim:  #9aa0ac;
  --text-faint:#5c6270;

  --emerald:      #3ddc84;
  --emerald-dim:  #1f5c3c;
  --amethyst:     #a57beb;
  --amethyst-dim: #4a3670;
  --redstone:     #e5484d;
  --gold:         #e8b34a;
  --lapis:        #4c8fe8;

  --radius-notch: 8px; /* corner-cut size, not border-radius */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.5;
  min-height:100vh;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(165,123,235,0.07), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(61,220,132,0.06), transparent 40%);
}

a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
ul{ list-style:none; }
img{ max-width:100%; display:block; }

::selection{ background:var(--amethyst-dim); color:#fff; }

/* focus visibility — accessibility floor */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:2px solid var(--amethyst);
  outline-offset:2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}

/* ---------- notch utility (the recurring "panel" construction) ---------- */
.notch{
  clip-path: polygon(
    var(--radius-notch) 0, 100% 0, 100% calc(100% - var(--radius-notch)),
    calc(100% - var(--radius-notch)) 100%, 0 100%, 0 var(--radius-notch)
  );
}
.notch-sm{ --radius-notch:5px; }

/* ---------- layout shell ---------- */
.wrap{ max-width:1180px; margin:0 auto; padding:0 28px; }

header.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(11,12,15,0.88);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:16px 0; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; font-size:1.05rem; letter-spacing:0.02em; }
.brand .mark{
  width:36px; height:36px; object-fit:contain; flex-shrink:0;
}
.brand .sub{ display:block; font-family:var(--font-mono); font-size:0.62rem; letter-spacing:0.16em; color:var(--text-dim); font-weight:500; text-transform:uppercase; margin-top:1px; }

.nav-links{ display:flex; align-items:center; gap:28px; font-size:0.92rem; color:var(--text-dim); }
.nav-links a:hover{ color:var(--text); }
.nav-actions{ display:flex; gap:10px; align-items:center; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 20px; font-weight:600; font-size:0.88rem; font-family:var(--font-body);
  border:1px solid var(--line); background:var(--panel-2); color:var(--text);
  transition:transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover{ border-color:var(--text-faint); transform:translateY(-1px); }
.btn:active{ transform:translateY(0); }
.btn-primary{ background:var(--amethyst); border-color:var(--amethyst); color:#1c1030; }
.btn-primary:hover{ background:#b892f0; border-color:#b892f0; }
.btn-ghost{ background:transparent; }
.btn-danger{ background:var(--redstone); border-color:var(--redstone); color:#2a0708; }
.btn-sm{ padding:7px 14px; font-size:0.78rem; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:0.5; cursor:not-allowed; transform:none; }

/* ---------- hero ---------- */
.hero{ padding:76px 0 56px; position:relative; }
.eyebrow{
  font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.18em; text-transform:uppercase;
  color:var(--amethyst); display:flex; align-items:center; gap:8px; margin-bottom:18px;
}
.eyebrow .dot{ width:6px; height:6px; background:var(--amethyst); }
.hero h1{
  font-family:var(--font-display); font-weight:700; font-size:clamp(2.2rem,5vw,3.6rem);
  letter-spacing:-0.01em; line-height:1.05; max-width:720px;
}
.hero h1 em{ font-style:normal; color:var(--amethyst); }
.hero p.lede{ margin-top:18px; max-width:560px; color:var(--text-dim); font-size:1.05rem; }
.hero-actions{ display:flex; gap:12px; margin-top:30px; flex-wrap:wrap; }

/* ---------- hotbar status widget (signature element) ---------- */
.hotbar-frame{
  margin-top:56px; background:var(--panel); border:1px solid var(--line); padding:18px;
}
.hotbar-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; flex-wrap:wrap; gap:8px; }
.hotbar-title{ font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.14em; text-transform:uppercase; color:var(--text-dim); }
.status-pill{
  font-family:var(--font-mono); font-size:0.72rem; font-weight:700; letter-spacing:0.06em;
  padding:5px 10px; display:inline-flex; align-items:center; gap:6px; text-transform:uppercase;
}
.status-pill.on{ background:var(--emerald-dim); color:var(--emerald); }
.status-pill.off{ background:#3a1518; color:var(--redstone); }
.status-pill .blip{ width:6px; height:6px; background:currentColor; }

.hotbar{ display:grid; grid-template-columns:repeat(6,1fr); gap:8px; }
.slot{
  background:var(--bg-2); border:1px solid var(--line-soft); padding:14px 12px; min-height:88px;
  display:flex; flex-direction:column; justify-content:space-between;
}
.slot .k{ font-family:var(--font-mono); font-size:0.62rem; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-faint); }
.slot .v{ font-family:var(--font-display); font-size:1.35rem; font-weight:700; margin-top:4px; word-break:break-word; }
.slot .v.small{ font-size:0.95rem; font-family:var(--font-mono); font-weight:500; }
@media (max-width:820px){ .hotbar{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:520px){ .hotbar{ grid-template-columns:repeat(2,1fr); } }

.playerlist-row{ margin-top:12px; padding-top:12px; border-top:1px solid var(--line-soft); font-family:var(--font-mono); font-size:0.82rem; color:var(--text-dim); }
.playerlist-row .chip{ display:inline-block; background:var(--panel-2); border:1px solid var(--line); padding:2px 8px; margin:2px 4px 2px 0; color:var(--text); }

/* ---------- generic panel / section ---------- */
.section{ padding:64px 0; }
.section-head{ margin-bottom:30px; }
.section-head .eyebrow{ margin-bottom:10px; }
.section-head h2{ font-family:var(--font-display); font-size:clamp(1.5rem,3vw,2.1rem); font-weight:700; }
.section-head p{ color:var(--text-dim); margin-top:8px; max-width:560px; }

.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:860px){ .grid-3{ grid-template-columns:1fr; } .grid-2{ grid-template-columns:1fr; } }

.card{ background:var(--panel); border:1px solid var(--line); padding:22px; }
.card h3{ font-family:var(--font-display); font-size:1.1rem; margin-bottom:8px; }
.card p{ color:var(--text-dim); font-size:0.92rem; }
.card .tag{ font-family:var(--font-mono); font-size:0.68rem; color:var(--amethyst); letter-spacing:0.1em; text-transform:uppercase; margin-bottom:10px; display:block; }

/* ---------- forms ---------- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-dim); margin-bottom:7px; }
.field input, .field select, .field textarea{
  width:100%; background:var(--bg-2); border:1px solid var(--line); color:var(--text);
  padding:11px 12px; font-family:var(--font-body); font-size:0.94rem;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--amethyst); outline:none; }
.field textarea{ resize:vertical; min-height:96px; }
.field .hint{ font-size:0.76rem; color:var(--text-faint); margin-top:6px; }
.field-row{ display:flex; gap:12px; }
.field-row .field{ flex:1; }

.checkbox-row{ display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.checkbox-row input{ width:auto; }
.checkbox-row label{ margin:0; text-transform:none; font-family:var(--font-body); font-size:0.9rem; color:var(--text); }

.form-error{ background:#3a1518; border:1px solid var(--redstone); color:#ffb3b5; padding:10px 12px; font-size:0.85rem; margin-bottom:14px; display:none; }
.form-success{ background:var(--emerald-dim); border:1px solid var(--emerald); color:#c9ffe1; padding:10px 12px; font-size:0.85rem; margin-bottom:14px; display:none; }

/* ---------- modal (auth) ---------- */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(6,7,9,0.72); backdrop-filter:blur(3px);
  display:none; align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal-backdrop.open{ display:flex; }
.modal{ background:var(--panel); border:1px solid var(--line); width:100%; max-width:420px; padding:30px; position:relative; }
.modal-close{ position:absolute; top:14px; right:14px; background:none; border:none; color:var(--text-dim); font-size:1.2rem; }
.modal h2{ font-family:var(--font-display); font-size:1.4rem; margin-bottom:4px; }
.modal .sub{ color:var(--text-dim); font-size:0.88rem; margin-bottom:22px; }
.modal-tabs{ display:flex; border-bottom:1px solid var(--line); margin-bottom:22px; }
.modal-tab{ flex:1; text-align:center; padding:10px 0; font-family:var(--font-mono); font-size:0.76rem; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-faint); background:none; border:none; border-bottom:2px solid transparent; }
.modal-tab.active{ color:var(--amethyst); border-bottom-color:var(--amethyst); }
.divider{ display:flex; align-items:center; gap:10px; margin:18px 0; color:var(--text-faint); font-size:0.76rem; font-family:var(--font-mono); text-transform:uppercase; }
.divider::before,.divider::after{ content:''; flex:1; height:1px; background:var(--line); }

.google-btn{
  display:flex; align-items:center; justify-content:center; gap:10px; width:100%;
  background:#fff; color:#1f1f1f; border:1px solid var(--line); padding:11px; font-weight:600; font-size:0.9rem;
}
.google-btn:hover{ background:#f2f2f2; }

/* ---------- badges / roles ---------- */
.role-badge{ font-family:var(--font-mono); font-size:0.68rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; padding:4px 9px; display:inline-block; }
.role-member{ background:var(--panel-2); color:var(--text-dim); }
.role-admin{ background:#1e3a5c; color:var(--lapis); }
.role-owner{ background:#4a3308; color:var(--gold); }
.role-developer{ background:var(--amethyst-dim); color:var(--amethyst); }

/* ---------- dashboard / admin shell ---------- */
.app-shell{ display:grid; grid-template-columns:230px 1fr; min-height:calc(100vh - 65px); }
.sidebar{ border-right:1px solid var(--line); padding:26px 18px; background:var(--bg-2); }
.sidebar .profile{ padding-bottom:18px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.sidebar .profile .name{ font-family:var(--font-display); font-weight:600; font-size:1rem; }
.sidebar .profile .mail{ color:var(--text-faint); font-size:0.76rem; margin-top:2px; word-break:break-all; }
.sidebar nav a{
  display:flex; align-items:center; gap:9px; padding:10px 10px; margin-bottom:2px;
  color:var(--text-dim); font-size:0.88rem; border-left:2px solid transparent;
}
.sidebar nav a:hover{ color:var(--text); background:var(--panel-2); }
.sidebar nav a.active{ color:var(--amethyst); border-left-color:var(--amethyst); background:var(--panel-2); }
.main{ padding:34px 34px 60px; }
@media (max-width:760px){ .app-shell{ grid-template-columns:1fr; } .sidebar{ display:flex; overflow-x:auto; gap:4px; padding:14px; } .sidebar .profile{ display:none; } .sidebar nav{ display:flex; gap:4px; } .sidebar nav a{ white-space:nowrap; border-left:none; border-bottom:2px solid transparent; } .sidebar nav a.active{ border-bottom-color:var(--amethyst); } }

.page-title{ font-family:var(--font-display); font-size:1.6rem; font-weight:700; margin-bottom:6px; }
.page-sub{ color:var(--text-dim); font-size:0.92rem; margin-bottom:28px; }

table.data-table{ width:100%; border-collapse:collapse; font-size:0.88rem; }
table.data-table th{ text-align:left; font-family:var(--font-mono); font-size:0.68rem; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-faint); padding:10px 12px; border-bottom:1px solid var(--line); }
table.data-table td{ padding:12px; border-bottom:1px solid var(--line-soft); color:var(--text); }
table.data-table tr:hover td{ background:var(--panel-2); }

.pill-select{ display:flex; gap:8px; flex-wrap:wrap; }
.pill-option{ border:1px solid var(--line); padding:8px 13px; font-size:0.82rem; color:var(--text-dim); background:var(--bg-2); }
.pill-option.selected{ border-color:var(--amethyst); color:var(--amethyst); background:var(--amethyst-dim); }

.member-picker{ max-height:220px; overflow-y:auto; border:1px solid var(--line); background:var(--bg-2); }
.member-picker .m-row{ display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--line-soft); font-size:0.86rem; }
.member-picker .m-row:last-child{ border-bottom:none; }
.member-picker .m-row input{ width:auto; }
.member-picker .m-row img{ width:22px; height:22px; }

.embed-preview{ background:#1a1c22; border-left:4px solid var(--amethyst); padding:12px 14px; }
.embed-preview .et{ font-weight:700; color:#fff; margin-bottom:4px; }
.embed-preview .ed{ color:#d3d6db; font-size:0.88rem; white-space:pre-wrap; }

.toast-stack{ position:fixed; bottom:20px; right:20px; display:flex; flex-direction:column; gap:8px; z-index:200; }
.toast{ background:var(--panel); border:1px solid var(--line); border-left:3px solid var(--emerald); padding:12px 16px; font-size:0.86rem; min-width:220px; }
.toast.error{ border-left-color:var(--redstone); }

.empty-state{ text-align:center; padding:50px 20px; color:var(--text-faint); }
.empty-state .glyph{ font-size:1.8rem; margin-bottom:10px; }

/* ---------- footer ---------- */
footer.site-footer{ border-top:1px solid var(--line); padding:34px 0; margin-top:40px; }
footer.site-footer .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
footer.site-footer p{ color:var(--text-faint); font-size:0.82rem; font-family:var(--font-mono); }

.loader{ width:16px; height:16px; border:2px solid rgba(255,255,255,0.2); border-top-color:#fff; display:inline-block; animation:spin .7s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ==========================================================================
   Motion — scroll reveals, hover glow, ambient hero particles
   ========================================================================== */
@keyframes fadeSlideUp{ from{ opacity:0; transform:translateY(22px); } to{ opacity:1; transform:translateY(0); } }
@keyframes pulseDot{ 0%,100%{ box-shadow:0 0 0 0 currentColor; opacity:1; } 70%{ box-shadow:0 0 0 6px transparent; opacity:0.85; } }
@keyframes shardFloat{
  0%   { transform:translate(0,0) rotate(0deg);   opacity:0.35; }
  50%  { transform:translate(8px,-26px) rotate(14deg); opacity:0.7; }
  100% { transform:translate(0,0) rotate(0deg);   opacity:0.35; }
}
@keyframes toastIn{ from{ opacity:0; transform:translateX(24px); } to{ opacity:1; transform:translateX(0); } }
@keyframes modalPop{ from{ opacity:0; transform:scale(0.95) translateY(8px); } to{ opacity:1; transform:scale(1) translateY(0); } }
@keyframes countPop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.12); color:var(--amethyst); } 100%{ transform:scale(1); } }

@media (prefers-reduced-motion: no-preference){
  .reveal{ opacity:0; transform:translateY(22px); transition:opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); }
  .reveal.in-view{ opacity:1; transform:translateY(0); }
  .reveal.r2{ transition-delay:.08s; } .reveal.r3{ transition-delay:.16s; } .reveal.r4{ transition-delay:.24s; }
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; }
}

.card{ transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.card:hover{ transform:translateY(-3px); border-color:#4a3f63; box-shadow:0 10px 30px rgba(165,123,235,0.10); }

.status-pill .blip{ animation:pulseDot 1.6s ease-in-out infinite; }

.slot{ transition:border-color .2s ease, transform .2s ease; }
.slot:hover{ border-color:var(--amethyst); transform:translateY(-2px); }

.btn-primary{ position:relative; overflow:hidden; }
.btn-primary:hover{ box-shadow:0 6px 20px rgba(165,123,235,0.35); }

.value-pop{ animation:countPop .4s ease; }

.toast{ animation:toastIn .3s cubic-bezier(.2,.7,.2,1); }
.modal{ animation:modalPop .28s cubic-bezier(.2,.7,.2,1); }

/* nav link underline sweep */
.nav-links a{ position:relative; padding-bottom:2px; transition:color .15s ease; }
.nav-links a::after{
  content:''; position:absolute; left:0; bottom:-3px; width:0; height:1px; background:var(--amethyst);
  transition:width .25s ease;
}
.nav-links a:hover::after{ width:100%; }

/* sidebar link hover slide */
.sidebar nav a{ transition:background .15s ease, border-color .15s ease, padding-left .15s ease; }
.sidebar nav a:hover{ padding-left:14px; }

/* ambient hero particles */
.hero{ overflow:hidden; }
.hero-particles{ position:absolute; inset:0; pointer-events:none; z-index:0; }
.shard{
  position:absolute; background:linear-gradient(160deg, var(--amethyst), #6a4bb5);
  clip-path:polygon(50% 0%, 100% 35%, 78% 100%, 22% 100%, 0% 35%);
  animation:shardFloat 7s ease-in-out infinite;
  filter:blur(0.2px);
}
.hero > .wrap{ position:relative; z-index:1; }


/* ─────────────────────────────────────────────────────────────────────────
   Mobile responsiveness — additive only, scoped to small screens.
   Desktop layout above is completely untouched.
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }

  .nav { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .brand .sub { display: none; } /* saves space — full name still shows on desktop */
  .nav-links { gap: 16px; flex-wrap: wrap; font-size: 0.86rem; }
  .nav-actions { width: 100%; justify-content: flex-start; }
  .nav-actions .btn { flex: 1; text-align: center; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

  .field-row { flex-direction: column; gap: 0; }

  .hotbar-head { flex-direction: column; align-items: flex-start; }

  h1 { line-height: 1.25; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 12px; }
  .nav-links { font-size: 0.8rem; gap: 12px; }
}
