:root{
  --bg1: #0b1020;
  --bg2: #111a33;
  --card: rgba(255,255,255,0.08);
  --card2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --shadow: 0 18px 60px rgba(0,0,0,0.45);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 15% 20%, #263a9a33, transparent 55%),
              radial-gradient(900px 500px at 80% 15%, #17c3ff22, transparent 55%),
              linear-gradient(160deg, var(--bg1), var(--bg2));
  overflow-x: hidden;
}

.bg{
  position: fixed;
  inset: 0;
  background:
    radial-gradient(650px 250px at 40% 85%, #ffcc0022, transparent 60%),
    radial-gradient(500px 280px at 80% 60%, #9d4edd22, transparent 60%);
  pointer-events: none;
  filter: blur(0.2px);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  background: rgba(8,12,24,0.55);
  border-bottom: 1px solid var(--border);
}

.brand{ display:flex; align-items:center; gap: 12px; }
.logo{
  width: 40px; height: 40px;
  display:grid; place-items:center;
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-weight: 800;
}
.title{ font-weight: 800; letter-spacing: 0.3px; }
.subtitle{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.userbox{ text-align:right; }
.userline{ font-size: 13px; color: var(--muted); }
.actions{ margin-top: 8px; display:flex; gap: 10px; justify-content:flex-end; }

.wrap{
  max-width: 1100px;
  margin: 22px auto;
  padding: 0 16px 40px;
}

.card{
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  padding: 18px;
}

@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .userbox{ text-align:left; }
  .actions{ justify-content:flex-start; }
}

.hero-left{ padding: 8px; }
.h1{ margin: 6px 0 10px; font-size: 34px; line-height: 1.08; }
.p{ margin: 0 0 16px; color: var(--muted); max-width: 58ch; }

.stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.stat{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
}
.stat-label{ font-size: 12px; color: var(--muted); }
.stat-value{ font-size: 22px; font-weight: 800; margin-top: 6px; }

.cta-row{ display:flex; gap: 12px; flex-wrap: wrap; }

.btn{
  appearance:none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.18); }
.btn:active{ transform: translateY(0px) scale(0.99); }
.btn:disabled{ opacity: 0.5; cursor:not-allowed; transform:none; }

.btn.primary{
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(23,195,255,0.28), rgba(23,195,255,0.14));
}
.btn.ghost{ background: rgba(255,255,255,0.06); }
.btn.danger{
  background: linear-gradient(180deg, rgba(255,70,70,0.26), rgba(255,70,70,0.12));
  border-color: rgba(255,120,120,0.25);
}

.log{
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.log-title{ font-weight: 800; font-size: 13px; margin-bottom: 8px; color: rgba(255,255,255,0.85); }
.log-item{ font-size: 13px; color: var(--muted); padding: 6px 0; border-top: 1px dashed rgba(255,255,255,0.14); }
.log-item:first-of-type{ border-top: none; }

.hero-right{ padding: 8px; display:flex; flex-direction:column; gap: 12px; }

/* --- AVATAR --- */
.avatar{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  padding: 14px;
  min-height: 260px;
  position: relative; /* important for accessories */
  overflow: hidden;
}

.avatar-accessories{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index: 5; /* accessories on top */
}

.avatar-face{
  width: 110px; height: 110px;
  border-radius: 28px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border);
  margin: 8px auto 10px;
  position: relative;
  z-index: 2;
}
.avatar-face:before, .avatar-face:after{
  content:"";
  position:absolute;
  top: 42px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
}
.avatar-face:before{ left: 34px; }
.avatar-face:after{ right: 34px; }

.avatar-body{
  width: 160px; height: 90px;
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.avatar-sign{
  position:absolute;
  left: 14px;
  bottom: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  z-index: 1;
}

/* --- SHOP --- */
.cardish{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.shop-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-bottom:10px; }
.shop-title{ font-weight: 1000; }
.shop-sub{ font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.shop-list{ display:grid; gap:10px; }
.shop-item{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.14);
}
.shop-name{ font-weight: 900; margin-bottom: 4px; }
.shop-desc{ color: rgba(255,255,255,0.65); font-size: 13px; line-height: 1.35; }
.shop-meta{ margin-top: 8px; display:flex; gap:10px; flex-wrap:wrap; color: rgba(255,255,255,0.72); font-size: 12px; }
.pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.shop-actions{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; min-width: 140px; }
.shop-cost{ font-weight: 900; color: rgba(255,255,255,0.90); }
.shop-empty{ color: rgba(255,255,255,0.65); font-size: 13px; padding: 10px; }

/* --- ACCESSORY: CARDBOARD SIGN --- */
.acc-sign{
  position:absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) rotate(-4deg);
  z-index: 6;
}

.acc-sign-board{
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(145deg, #8b6b4a, #7a5c3d);
  border: 2px dashed rgba(0,0,0,0.35);
  color: #2b1d12;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 13px;
  text-align:center;
  width: 160px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.45);
}

.acc-sign-stick{
  width: 10px;
  height: 64px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.10));
  border: 1px solid rgba(255,255,255,0.12);
}
