/* ==========================================================================
   Window manager (draggable retro windows + inner "social" UI)
   ========================================================================== */

.window{
  position:absolute;
  top:90px; left:160px;
  width:min(760px, 92vw);
  height:min(520px, 70vh);
  border-radius:18px;
  background:rgba(16,39,66,.88);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:var(--shadow);
  backdrop-filter: blur(14px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.window[data-state="min"]{display:none}
.window[data-state="max"]{
  top:10px !important; left:10px !important;
  width:calc(100vw - 20px);
  height:calc(100vh - 64px);
}
.titlebar{
  height:40px;
  display:flex; align-items:center;
  padding:0 10px 0 12px;
  gap:10px;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  border-bottom:1px solid rgba(255,255,255,.15);
  user-select:none;
}
.titlebar__icon{width:18px; height:18px}
.titlebar__title{
  font-weight:800;
  letter-spacing:.2px;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}
.titlebar__spacer{flex:1}
.winbtn{
  width:30px; height:26px;
  display:grid; place-items:center;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(0,0,0,.12);
  color:var(--text);
}
.winbtn:hover{background:rgba(255,255,255,.12)}
.winbtn[data-kind="close"]:hover{background:rgba(255,59,59,.18); border-color:rgba(255,59,59,.5)}
.window__body{
  flex:1;
  display:grid;
  grid-template-columns: 260px 1fr;
  min-height:0; /* allow inner scroll */
}
.sidebar{
  border-right:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.10);
  padding:12px;
  overflow:auto;
}
.sidebar h3{margin:0 0 8px; font-size:14px}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:12px;
  margin:4px 6px 0 0;
}
.badge b{color:var(--text)}
.sidebar .btnrow{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}

.content{
  padding:12px;
  overflow:auto;
}
.panel{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  padding:12px;
}
.panel + .panel{margin-top:12px}

/* Social-esque components */
.profile{
  display:grid;
  grid-template-columns: 94px 1fr;
  gap:12px;
}
.pfp{
  width:94px; height:94px;
  border-radius:18px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), rgba(255,255,255,.1)),
    linear-gradient(135deg, rgba(0,255,209,.35), rgba(255,79,216,.22));
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 18px 40px rgba(0,0,0,.22) inset;
}
.kv h2{margin:0}
.kv p{margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.35}

.statgrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:10px;
}
.stat{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.12);
  padding:10px;
}
.stat b{display:block; font-size:16px}
.stat span{color:var(--muted); font-size:12px}

.postbox{
  display:flex; gap:8px; align-items:center;
}
.postbox input{
  flex:1;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.18);
  color:var(--text);
  padding:0 12px;
  outline:none;
}
.postbox input:focus{border-color:rgba(0,255,209,.6); box-shadow:0 0 0 3px rgba(0,255,209,.12)}
.post{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.12);
  padding:12px;
}
.post + .post{margin-top:10px}
.post__meta{display:flex; gap:8px; align-items:center; color:var(--muted); font-size:12px}
.dot{width:4px; height:4px; border-radius:999px; background:rgba(255,255,255,.35)}
.post__text{margin:8px 0 0; line-height:1.4}
.reacts{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.react{
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:6px 10px;
  font-size:12px;
}
.react:hover{filter:brightness(1.06)}
.react[data-active="true"]{border-color:rgba(0,255,209,.6); background:rgba(0,255,209,.12)}

/* Mini "Winamp-ish" */
.player{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
  align-items:center;
}
.player .meter{
  width:100%;
}
.meter{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
.meter > div{
  height:100%;
  width:0%;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
}
kbd{
  font-family:var(--font-mono);
  font-size:12px;
  border:1px solid rgba(255,255,255,.18);
  border-bottom-color:rgba(0,0,0,.35);
  background:rgba(0,0,0,.18);
  padding:2px 6px;
  border-radius:8px;
}

/* Responsive for windows */
@media (max-width: 860px){
  .window{position:relative; top:auto; left:auto; width:100%; height:auto; margin:10px auto}
  .window__body{grid-template-columns:1fr}
}
