/* ================================
   Home Hub — Full Stylesheet
   ================================ */

:root{
  --bg:#0e0f12;
  --ink:#eaeef3;
  --muted:#a9b0bb;
  --card:#171a20;
  --line:#22252c;
  --accent:#e3635c;   /* primary brand */
  --ok:#2ecc71;       /* online */
  --bad:#e74c3c;      /* offline */
  --focus:#7aa2ff;    /* focus ring */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:16px/1.5 system-ui,Segoe UI,Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
strong{font-weight:700}

/* ========== Header ========== */
.hub-header{
  position:sticky; top:0; z-index:1000;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  padding:14px 18px;
  background:var(--bg);
  border-bottom:1px solid var(--line);
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}
.header-left{justify-self:start}
.header-center{justify-self:center}
.header-right{justify-self:end}
.hub-header h1{margin:0;font-size:20px}

/* ========== Main layout ========== */
main{max-width:1100px;margin:20px auto;padding:0 16px}
.actions{display:flex;justify-content:flex-end;margin:0 0 12px}

/* ========== Buttons ========== */
.btn{
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:12px;
  padding:8px 12px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .06s ease, opacity .15s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:none}
.btn[disabled]{opacity:.6;cursor:not-allowed}
.btn.secondary{background:#2b3039}

/* ========== Cards grid ========== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:16px;
}
.card{
  display:flex;
  gap:12px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  text-decoration:none;
  color:inherit;
  transition:transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(0,0,0,.28);
  border-color:#2b3340;
}
.thumb{
  width:56px;height:56px;border-radius:12px;
  background:var(--tile,#2b3039);
  display:flex;align-items:center;justify-content:center;
}
.emoji{font-size:28px}
.meta{flex:1;min-width:0}
.row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.row h3{margin:0;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desc{margin:.25rem 0 .4rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.url{font-size:12px;color:#97a0ab;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:12px;height:12px;border-radius:50%}
.dot.on{background:var(--ok)}
.dot.off{background:var(--bad)}

/* ========== Auth pages (login/register) ========== */
main.auth{max-width:520px;margin:40px auto;padding:0 16px}
main.auth h2{margin:0 0 12px}
.form{display:flex;flex-direction:column;gap:12px}
.form label{display:flex;flex-direction:column;gap:6px}
.form input{
  padding:10px 12px;border-radius:12px;
  border:1px solid #333a45;background:#0c0e13;color:var(--ink)
}
.hint{color:var(--muted);margin-top:6px}

/* ========== Utilities ========== */
.muted{color:var(--muted)}
.center{text-align:center}
.right{text-align:right}

/* ========== Responsive tweaks ========== */
@media (max-width:720px){
  .hub-header{grid-template-columns:1fr 1fr;grid-template-rows:auto auto}
  .header-center{grid-column:1 / -1;order:-1}
  main{padding:0 12px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
}
