:root{
  --bg: none;
  --ink: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --muted2: rgba(255,255,255,.55);

  --glass: rgba(16,18,28,.58);
  --glass2: rgba(16,18,28,.42);
  --stroke: rgba(255,255,255,.14);
  --shadow: 0 14px 40px rgba(0,0,0,.45);

  --radius: 18px;
  --pad: 14px;
  --blur: 18px;

  --brand: #8fe4ff;
  --good: rgba(180,255,200,.92);
  --bad: rgba(255,210,210,.92);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body.apr-social{
  margin:0;
  color:var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(110,231,255,.25), transparent 65%),
    radial-gradient(900px 600px at 80% 0%, rgba(168,85,247,.22), transparent 55%),
    linear-gradient(180deg, rgba(5,10,20,.92), rgba(6,8,14,.96));
  background-image:
    linear-gradient(180deg, rgba(5,10,20,.92), rgba(6,8,14,.96)),
    var(--bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow-x:hidden;
}

/* Top bar */
.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  backdrop-filter: blur(var(--blur));
  background: rgba(10,12,18,.55);
  border-bottom: 1px solid var(--stroke);
}
.brand{ display:flex; flex-direction:column; gap:3px; }
.brand-link{ color:var(--ink); text-decoration:none; display:flex; gap:10px; align-items:center; }
.brand-mark{
  font-weight:800;
  letter-spacing:.08em;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.brand-text{ font-weight:800; font-size:18px; }
.brand-sub{ color:var(--muted); font-size:12px; }

.top-actions{ display:flex; gap:10px; align-items:center; }

/* Layout */
.layout{
  width:min(1320px, 96vw);
  margin: 14px auto 24px;
  display:grid;
  grid-template-columns: 290px 1fr 330px;
  gap: 14px;
  padding-bottom: 24px; /* ensures you can scroll to bottom */
}

@media (max-width: 1100px){
  .layout{ grid-template-columns: 280px 1fr; }
  .col.right{ grid-column: 1 / -1; }
}
@media (max-width: 820px){
  .layout{ grid-template-columns: 1fr; }
  .col.left{ order:2; }
  .col.center{ order:1; }
  .col.right{ order:3; }
}

/* Panels */
.panel{
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
}
.panel-title{
  font-weight:800;
  letter-spacing:.02em;
  margin-bottom: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.muted{ color:var(--muted); }
.muted2{ color:var(--muted2); }
.small{ font-size:12px; }

/* Buttons/inputs */
.btn{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.10);
  color:var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{ background: rgba(255,255,255,.14); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn.ghost{ background: rgba(255,255,255,.06); }

.input, .textarea, .select{
  width:100%;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.20);
  color:var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}
.textarea{ resize: vertical; min-height: 70px; }
.lbl{ display:block; font-size:12px; color:var(--muted); margin: 10px 0 6px; }

.shortcut-list{ display:flex; flex-direction:column; gap:10px; }
.shortcut{
  text-decoration:none;
  color:var(--ink);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.shortcut:hover{ background: rgba(255,255,255,.10); }

.feed-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.feed-controls{ display:flex; gap:10px; flex-wrap:wrap; }

.feed-list{ display:flex; flex-direction:column; gap: 12px; }

/* Post card */
.post{
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.22);
  border-radius: 18px;
  padding: 12px;
}
.post-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.post-who{ display:flex; gap:10px; align-items:flex-start; }
.avatar{
  width:40px; height:40px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.07);
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
}
.avatar::after{ content: attr(data-initial); }

.post-name a, .post-handle a{ color:var(--ink); text-decoration:none; }
.post-handle{ color:var(--muted2); font-size:12px; }
.post-time{ color:var(--muted2); font-size:12px; margin-top:4px; }

.post-body{ margin: 10px 2px 10px; white-space:pre-wrap; line-height:1.35; }

.post-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.action{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 8px 10px;
  cursor:pointer;
  user-select:none;
}
.action.on{ background: rgba(255,80,130,.18); border-color: rgba(255,80,130,.35); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  padding:4px 8px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  margin-top:6px;
}
.badge.breaking{ border-color: rgba(255,100,100,.45); background: rgba(255,100,100,.12); }
.badge.weather{ border-color: rgba(110,231,255,.50); background: rgba(110,231,255,.12); }
.badge.traffic{ border-color: rgba(250,204,21,.50); background: rgba(250,204,21,.12); }

/* Comments */
.comment-box{ display:none; margin-top: 10px; }
.comment-box.open{ display:block; }
.comment-row{ display:flex; gap:10px; align-items:center; }
.comment-list{ display:flex; flex-direction:column; gap:8px; margin-top: 10px; }
.comment{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 10px;
}
.comment-head{ display:flex; justify-content:space-between; gap:10px; }
.comment-body{ white-space:pre-wrap; margin-top: 6px; }

/* Modals */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  z-index: 80;
  padding: 18px;
}
.modal.open{ display:flex; align-items:center; justify-content:center; }
.modal-card{
  width:min(520px, 96vw);
  border:1px solid var(--stroke);
  background: rgba(10,12,18,.78);
  backdrop-filter: blur(var(--blur));
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modal-head{
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.modal-title{ font-weight:900; }
.iconbtn{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:var(--ink);
  border-radius: 12px;
  padding: 6px 10px;
  cursor:pointer;
}
.modal-body{ padding: 14px; }

/* Footer */
.apr-footer{
  width:min(1320px, 96vw);
  margin: 18px auto 24px;
  border:1px solid var(--stroke);
  background: rgba(10,12,18,.55);
  backdrop-filter: blur(var(--blur));
  border-radius: 18px;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.apr-footer a{ color: var(--brand); text-decoration:none; font-weight:800; }
.apr-footer a:hover{ text-decoration:underline; }
