*{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg:#07070d;
  --surface:#0b0b14;
  --surface-2:#0f0f1a;
  --surface-3:#131320;
  --border:rgba(255,255,255,.06);
  --border-hover:rgba(255,255,255,.11);
  --text:#e8eaf2;
  --muted:#4e617a;
  --dim:#7a90a8;
  --accent:#3b7dff;
  --accent-glow:rgba(59,125,255,.15);
  --accent-subtle:rgba(59,125,255,.07);
  --success:#10b981;
  --radius:10px;
  --radius-lg:14px;
  --font-body:'DM Sans',system-ui,sans-serif;
  --font-mono:'JetBrains Mono',monospace;
  --sidebar-w:220px;
}

html,body{
  background:var(--bg);
  min-height:100vh;
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;text-decoration:none}

/* ── Animations ── */
@keyframes fadeUp{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes rsFall{
  from{transform:translateY(-10px);opacity:0}
  5%{opacity:1}95%{opacity:1}
  to{transform:translateY(100vh);opacity:0}
}
@keyframes shimmer{
  0%{background-position:-200% 0}
  100%{background-position:200% 0}
}

.fu{opacity:0;animation:fadeUp .6s ease forwards}
.d1{animation-delay:.05s}
.d2{animation-delay:.15s}
.d3{animation-delay:.25s}

/* ── Starfield ── */
.rs-star-canvas{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0;opacity:.45}
.rs-star-dot{position:absolute;border-radius:50%;background:#8aa4cc;animation:rsFall linear infinite}

/* ── Shell ── */
.shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;min-height:100vh;position:relative;z-index:1}

/* ── Sidebar ── */
.side{
  position:sticky;top:0;height:100vh;overflow-y:auto;
  border-right:1px solid var(--border);
  padding:20px 12px;
  display:flex;flex-direction:column;gap:2px;
  scrollbar-width:none;
}
.side::-webkit-scrollbar{display:none}

.side-logo{display:flex;align-items:center;gap:10px;padding:6px 10px 24px;font-weight:800;font-size:15px;letter-spacing:-.3px}
.side-logo-mark{
  width:32px;height:32px;border-radius:9px;
  background:var(--accent);
  display:grid;place-items:center;
  font-family:var(--font-mono);font-size:13px;font-weight:700;color:#fff;
  flex-shrink:0;box-shadow:0 4px 14px rgba(59,125,255,.3);
}

.side-group-label{
  font-family:var(--font-mono);font-size:10px;font-weight:700;
  color:var(--muted);text-transform:uppercase;letter-spacing:.1em;
  padding:16px 10px 6px;
}

.side-item{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:8px;
  font-size:13px;font-weight:500;color:var(--muted);
  transition:all .15s;cursor:pointer;
}
.side-item:hover{background:rgba(255,255,255,.04);color:var(--dim)}
.side-item.active{background:rgba(59,125,255,.12);color:var(--accent);font-weight:600}
.side-item svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;opacity:.8}
.side-item.active svg{opacity:1}

/* ── Main ── */
.main{min-width:0;overflow-y:auto}
.wrap{max-width:720px;margin:0 auto;padding:80px 48px 120px}

/* ── Hero ── */
.hero{margin-bottom:48px}
.hero-kicker{font-family:var(--font-mono);font-size:11px;font-weight:500;color:var(--muted);letter-spacing:.1em;text-transform:uppercase;margin-bottom:26px}
.hero h1{font-size:clamp(1.9rem,4vw,3rem);font-weight:800;letter-spacing:-.04em;line-height:1.08;margin-bottom:22px}
.hero h1 em{font-style:normal;color:var(--accent)}
.hero-body{font-size:15px;line-height:1.85;color:var(--dim);max-width:480px}

/* ── Filter bar ── */
.filter-bar{
  display:flex;gap:6px;
  margin-bottom:28px;
  flex-wrap:wrap;
}

.filter-btn{
  padding:6px 14px;
  border-radius:7px;
  border:1px solid var(--border);
  background:none;
  font-size:12px;font-weight:600;
  color:var(--muted);
  cursor:pointer;
  transition:all .15s;
  font-family:var(--font-body);
}
.filter-btn:hover{color:var(--dim);border-color:var(--border-hover);background:rgba(255,255,255,.03)}
.filter-btn.active{background:rgba(59,125,255,.1);border-color:rgba(59,125,255,.25);color:var(--accent)}

/* ── News feed ── */
.news-feed{display:flex;flex-direction:column;gap:0}

.news-item{
  display:flex;gap:20px;
  padding:20px 0;
  border-bottom:1px solid var(--border);
  transition:background .15s;
  animation:fadeUp .4s ease both;
}
.news-item:first-child{border-top:1px solid var(--border)}

.news-date-col{
  width:90px;
  flex-shrink:0;
  padding-top:2px;
}
.news-date{
  font-family:var(--font-mono);
  font-size:10px;font-weight:500;
  color:var(--muted);
  white-space:nowrap;
}

.news-content{flex:1;min-width:0}

.news-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}

.news-tag{
  display:inline-flex;align-items:center;
  padding:2px 7px;border-radius:4px;
  font-size:9px;font-weight:800;
  text-transform:uppercase;letter-spacing:.06em;
  font-family:var(--font-mono);
  flex-shrink:0;
}
.tag-new{background:rgba(16,185,129,.1);color:#6ee7b7;border:1px solid rgba(16,185,129,.12)}
.tag-fix{background:rgba(239,68,68,.1);color:#fca5a5;border:1px solid rgba(239,68,68,.12)}
.tag-security{background:rgba(245,158,11,.1);color:#fde68a;border:1px solid rgba(245,158,11,.12)}
.tag-improve{background:rgba(59,125,255,.1);color:#93c5fd;border:1px solid rgba(59,125,255,.12)}

/* ── Delete button (admin only) ── */
.news-delete-btn{
  margin-left:auto;
  background:none;border:none;
  color:var(--muted);cursor:pointer;
  padding:2px 4px;border-radius:4px;
  transition:color .15s,background .15s;
  display:flex;align-items:center;
}
.news-delete-btn:hover{color:#fca5a5;background:rgba(239,68,68,.08)}
.news-delete-btn svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* ── Admin panel ── */
.admin-panel{margin-top:8px}

.admin-form{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:24px;
  display:flex;flex-direction:column;gap:16px;
}

.admin-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.admin-field{display:flex;flex-direction:column;gap:6px}
.admin-field label{
  font-family:var(--font-mono);font-size:10px;font-weight:700;
  color:var(--muted);text-transform:uppercase;letter-spacing:.08em;
}
.admin-required{color:#fca5a5}

.admin-field input,
.admin-field textarea{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:9px 12px;
  font-family:var(--font-body);font-size:13px;
  color:var(--text);outline:none;
  resize:vertical;
  transition:border-color .15s;
}
.admin-field input:focus,
.admin-field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}
.admin-field input::placeholder,
.admin-field textarea::placeholder{color:var(--muted)}

.admin-bottom{display:flex;align-items:center;gap:10px}

.admin-select{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:8px 12px;
  font-family:var(--font-mono);font-size:12px;
  color:var(--text);outline:none;cursor:pointer;
}
.admin-select:focus{border-color:var(--accent)}

.admin-submit{
  padding:9px 20px;
  border-radius:9px;border:none;
  background:var(--accent);color:#fff;
  font-size:13px;font-weight:700;
  cursor:pointer;transition:opacity .15s;
  font-family:var(--font-body);
}
.admin-submit:hover{opacity:.85}
.admin-submit:disabled{opacity:.4;cursor:default}

.admin-status{
  font-family:var(--font-mono);font-size:11px;
  min-height:16px;
}
.admin-status.ok{color:#6ee7b7}
.admin-status.error{color:#fca5a5}

@media(max-width:768px){
  .admin-row{grid-template-columns:1fr}
}

.news-title{font-size:14px;font-weight:700;color:var(--text)}
.news-body{font-size:13px;color:var(--muted);line-height:1.65}

/* ── Skeleton ── */
.news-skeleton{display:flex;flex-direction:column;gap:0}

.skel-item{
  height:72px;
  border-bottom:1px solid var(--border);
  background:linear-gradient(90deg,var(--surface) 25%,var(--surface-2) 50%,var(--surface) 75%);
  background-size:200% 100%;
  animation:shimmer 1.6s infinite;
}
.skel-item:first-child{border-top:1px solid var(--border)}

/* ── Empty / error states ── */
.news-empty,
.news-error{
  display:flex;align-items:center;gap:12px;
  padding:32px 0;
  color:var(--muted);
  font-size:13px;
}
.news-empty svg,
.news-error svg{width:16px;height:16px;stroke:var(--muted);stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}

.news-error button{
  background:none;border:none;
  color:var(--accent);font-size:13px;
  font-family:var(--font-body);
  cursor:pointer;text-decoration:underline;
  padding:0;
}

.hidden{display:none!important}

/* ── Footer ── */
.site-footer{border-top:1px solid var(--border);padding:22px 48px;display:flex;align-items:center;justify-content:space-between}
.site-footer p{font-family:var(--font-mono);font-size:11px;color:var(--muted)}
.footer-links{display:flex;gap:20px}
.footer-links a{font-family:var(--font-mono);font-size:11px;color:var(--muted);transition:color .15s}
.footer-links a:hover{color:var(--dim)}

/* ── Mobile ── */
@media(max-width:768px){
  .shell{grid-template-columns:1fr}
  .side{display:none}
  .wrap{padding:40px 20px 80px}
  .news-date-col{display:none}
  .hero{margin-bottom:32px}
  .site-footer{flex-direction:column;gap:10px;padding:20px;text-align:center}
}
