/* JoinAllinor – Browser UI (aus deinem bestehenden app.css übernommen)
   Hinweis: Wir halten es erstmal „plain“ (kein Build nötig). */

:root{
  --bg:#0b1020;
  --panel:#0f172a;
  --panel2:#0b1225;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:rgba(148,163,184,.18);
  --primary:#7c3aed;
  --primary2:#22c55e;
  --danger:#ef4444;
  --shadow:0 20px 60px rgba(0,0,0,.45);
}

:root[data-theme="light"]{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --panel2:#ffffff;
  --card:#ffffff;
  --text:#0b1020;
  --muted:#475569;
  --border:rgba(15,23,42,.14);
  --primary:#6d28d9;
  --primary2:#16a34a;
  --danger:#dc2626;
  --shadow:0 18px 50px rgba(2,6,23,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 10% 0%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, rgba(56,189,248,.12), transparent 60%),
    var(--bg);
}

.container{
  width:min(1100px, calc(100% - 32px));
  margin:24px auto 60px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(12px);
  border-bottom:1px solid rgba(148,163,184,.12);
}

.topbar-left,.topbar-right{display:flex; align-items:center; gap:12px}
.topbar-center{display:flex; align-items:center; justify-content:center; flex:1}

.brand{display:flex; align-items:center; gap:10px}
.brand-mark{
  width:36px;height:36px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(34,197,94,.75));
  box-shadow: 0 10px 30px rgba(124,58,237,.25);
  font-weight:800;
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted)}

.headline-kicker{font-size:12px; color:rgba(226,232,240,.7)}
.headline-title{font-weight:800}

.icon-btn{
  width:38px;height:38px;border-radius:12px;
  border:1px solid rgba(148,163,184,.16);
  background: rgba(15,23,42,.65);
  color:var(--text);
  cursor:pointer;
}
.icon-btn:hover{border-color:rgba(148,163,184,.35)}

.burger{
  display:block;
  width:18px;height:2px;
  background: rgba(226,232,240,.9);
  position:relative;
  margin:0 auto;
  border-radius:2px;
}
.burger:before,.burger:after{
  content:"";
  position:absolute;
  left:0;
  width:18px;height:2px;
  background: rgba(226,232,240,.9);
  border-radius:2px;
}
.burger:before{top:-6px}
.burger:after{top:6px}

.profile-btn{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.avatar{
  width:38px;height:38px;border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(15,23,42,.85);
  border:1px solid rgba(148,163,184,.16);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  font-size:18px;
}
.avatar.small{width:34px;height:34px;border-radius:12px;font-size:14px}

.dropdown{
  position:absolute;
  right:14px;
  top:64px;
  width:260px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.88);
  box-shadow: var(--shadow);
  padding:10px;

  /* ✅ Animation */
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  transform-origin: top right;
}

.dropdown.show{
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity .16s ease, transform .16s ease, visibility 0s;
}

.dropdown-header{padding:8px 10px}
.dropdown-title{font-weight:800}
.dropdown-sub{font-size:12px;color:var(--muted); margin-top:2px}
.dropdown-divider{height:1px; background: rgba(148,163,184,.14); margin:8px 0}
.dropdown-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor:pointer;
}
.dropdown-item:hover{border-color:rgba(148,163,184,.18); background: rgba(15,23,42,.55)}
.dropdown-item.danger{color: rgba(239,68,68,.95)}
.hidden{display:none !important}

.sidemenu{
  position:fixed;
  top:0; left:-340px;
  width:320px; height:100%;
  background: rgba(2,6,23,.92);
  backdrop-filter: blur(12px);
  border-right:1px solid rgba(148,163,184,.14);
  box-shadow: var(--shadow);
  z-index:50;
  transition: left .18s ease;
}
.sidemenu.show{left:0}
.sidemenu-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(148,163,184,.12);
}
.sidemenu-title{font-weight:900}
.sidemenu-nav{padding:12px 12px; display:flex; flex-direction:column; gap:8px}
.nav-btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.14);
  background: rgba(15,23,42,.55);
  color: var(--text);
  cursor:pointer;
  text-align:left;
}
.nav-btn:hover{border-color:rgba(148,163,184,.28)}
.nav-btn:disabled{opacity:.45; cursor:not-allowed}
.nav-sep{height:1px; background: rgba(148,163,184,.12); margin:10px 0}
.sidemenu-footer{padding:12px 14px; color: var(--muted)}

.backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  z-index:40;
}
.backdrop.hidden{display:none}

.hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 920px){
  .hero{grid-template-columns: 1fr}
}
.hero-kicker{font-size:12px; color: rgba(226,232,240,.7)}
.hero h1{margin:6px 0 10px; font-size:36px}
.muted{color:var(--muted)}
.small{font-size:12px}

.panel{
  border-radius:18px;
  background: rgba(15,23,42,.55);
  border:1px solid rgba(148,163,184,.14);
  padding:14px;
}
.panel-title{font-weight:900; margin-bottom:10px}
.debug-out{
  margin:0;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.12);
  background: rgba(2,6,23,.55);
  min-height: 140px;
  white-space: pre-wrap;
}

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

.card{
  border-radius:18px;
  background: rgba(15,23,42,.55);
  border:1px solid rgba(148,163,184,.14);
  overflow:hidden;
}
.card-img{width:100%; height:220px; object-fit:cover; display:block}
.card-body{padding:14px}
.tag{
  display:inline-block;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.35);
  color: rgba(226,232,240,.8);
  margin-bottom: 8px;
}
.card h2{margin:0 0 8px}
.card p{margin:0; color: var(--muted)}

.modal{
  position:fixed; inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 70;
}
.modal.hidden{display:none}
.modal-card{
  width:min(520px, 100%);
  border-radius: 18px;
  background: rgba(2,6,23,.92);
  border:1px solid rgba(148,163,184,.14);
  box-shadow: var(--shadow);
  padding: 14px;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 10px;
}
.modal-title{font-weight: 900}

.label{display:block; margin:10px 2px 6px; color: rgba(226,232,240,.9)}
.input{
  width:100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.55);
  color: var(--text);
  outline: none;
}
.input:focus{border-color: rgba(124,58,237,.55)}

.row{display:flex; gap:10px; align-items:center; margin-top: 12px}
.row > *{flex:1}

.btn{
  width:100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  cursor:pointer;
  font-weight:800;
  display: inline-flex; /* center label */
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(34,197,94,.75));
  border: none;
  color: white;
}
.btn.secondary{
  background: rgba(15,23,42,.55);
  color: var(--text);
}
.btn.danger{
  background: rgba(239,68,68,.92);
  border:none;
  color:white;
}
.btn.tiny{
  padding: 7px 10px;
  border-radius: 12px;
  font-weight:800;
  width:auto;
}
.btn:hover{filter: brightness(1.05)}

.help{font-size:12px; margin-top:6px; color: var(--muted)}
.help.error{color: rgba(239,68,68,.95)}

/* ✅ Wizard Steps (neu, minimal) */
.steps{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}
.step{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.16);
  color: rgba(226,232,240,.65);
  background: rgba(15,23,42,.35);
}
.step.active{
  color: rgba(226,232,240,.95);
  border-color: rgba(226,232,240,.7);
}

/* ✅ Friends list (neu) */
.page{margin-top: 18px}
.list{display:flex; flex-direction:column; gap:10px}
.list-item{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.14);
  background: rgba(15,23,42,.35);
}
.list-left{display:flex; align-items:center; gap:10px}
.list-title{font-weight:900}
.list-actions{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end}

/* ===== Profile (Konto) ===== */
.profile-shell {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,12,20,.35);
  backdrop-filter: blur(10px);
}

.profile-banner {
  height: 160px;
  background: radial-gradient(900px 260px at 40% 30%, rgba(120,70,255,.35), rgba(0,0,0,0)),
              radial-gradient(700px 260px at 80% 60%, rgba(0,220,180,.20), rgba(0,0,0,0)),
              rgba(12,14,24,.55);
  position: relative;
  background-size: cover;
  background-position: center;
}

.profile-banner-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.profile-header {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 18px;
  padding: 16px 18px 18px 18px;
  align-items: end;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -46px;
  width: 150px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 4px solid rgba(15,18,30,.95);
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 42px;
  user-select: none;
}

.profile-avatar-btn {
  margin-top: 10px;
  width: 120px;
}

.profile-meta {
  padding-bottom: 4px;
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .2px;
}

.profile-handle {
  margin-top: 4px;
}

.profile-tags {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-size: 13px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-bottom: 6px;
}

.profile-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

@media (max-width: 980px) {
  .profile-header {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .profile-avatar-wrap { margin-top: -46px; }
  .profile-actions { justify-content: flex-start; }
  .profile-grid { grid-template-columns: 1fr; }
}

.kv { margin-top: 12px; display: grid; gap: 10px; }
.kv-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.kv-k { color: rgba(255,255,255,.65); font-size: 13px; }
.kv-v { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.btn.small { padding: 8px 10px; font-size: 13px; }
.btn.ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.mini-profile { display:flex; gap:12px; align-items:center; padding:12px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
.mini-avatar { width:44px; height:44px; border-radius:999px; display:grid; place-items:center; font-weight:800; background: rgba(255,255,255,.08); }
.mini-name { font-weight:700; }
.mini-sub { font-size: 13px; }

.input.inline {
  margin-top: 8px;
  width: 100%;
}

/* reset page specific adjustments */
.reset-actions { display:flex; gap:12px; }
.reset-actions .btn { width:100%; min-width:0; }
.reset-actions .btn.primary { min-width:0; }
.reset-actions .btn.secondary { min-width:0; }

/* Invalid token overlay (reset page) */
.invalid-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,0.6);
  z-index: 220;
  pointer-events: auto;
}
.invalid-overlay.hidden{display:none}
.invalid-box{
  width: min(480px, 94%);
  border-radius: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid rgba(148,163,184,.12);
  box-shadow: var(--shadow);
  text-align: center;
}
.invalid-actions{display:flex; gap:10px; margin-top:12px; justify-content:center}
.invalid-actions .btn{width:48%;}

/* error styling for infoText/message */
#infoText.error{color: var(--danger); font-weight:700}
#message.error{color: var(--danger)}

/* registration inline info text */
#regInfoText{margin:8px 0}
#regInfoText.error{color: var(--danger); font-weight:700}

/* ensure btn text centered */
.btn{ display:inline-flex; align-items:center; justify-content:center; text-align:center }
