:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.10);
  --text: #e9ecf5;
  --muted: rgba(233,236,245,.65);
  --primary: #5b7cfa;
  --danger: #ff5b6e;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(91,124,250,.20), transparent 60%),
    radial-gradient(800px 450px at 95% 10%, rgba(255,91,110,.16), transparent 60%),
    var(--bg);
}

a{ color: inherit; text-decoration: none; }
.container{ max-width: 1100px; margin: 0 auto; padding: 22px; }
.container.narrow{ max-width: 560px; }

.nav{
  position: sticky; top: 0;
  backdrop-filter: blur(10px);
  background: rgba(11,16,32,.55);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.nav-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.brand{
  display:flex; gap:10px; align-items:center;
  font-weight: 900;
  letter-spacing: .3px;
}
.badge{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
}

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

h1,h2,h3{ margin: 0 0 10px 0; }
h1{ font-size: 28px; }
h2{ font-size: 22px; }
h3{ font-size: 16px; color: var(--muted); font-weight: 700; }

.small{ font-size: 13px; color: var(--muted); }
.muted{ color: var(--muted); }

label{ display:block; font-size: 13px; color: var(--muted); margin: 10px 0 8px; }

input, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(11,16,32,.55);
  color: var(--text);
  outline: none;
}
textarea{ min-height: 96px; resize: vertical; }
input:focus, textarea:focus{
  border-color: rgba(91,124,250,.55);
  box-shadow: 0 0 0 4px rgba(91,124,250,.14);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor:pointer;
  user-select:none;
}
.btn.primary{
  background: linear-gradient(180deg, rgba(91,124,250,1), rgba(91,124,250,.75));
  color: #fff;
}
.btn.secondary{
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}
.btn.danger{
  background: rgba(255,91,110,.14);
  border-color: rgba(255,91,110,.35);
  color: #ffd7dc;
}
.btn.full{ width: 100%; }
.btn:active{ transform: translateY(1px); }

.hr{ height:1px; background: var(--border); margin: 14px 0; }

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 860px){
  .row{ grid-template-columns: 1fr; }
}

.profile-top{
  display:flex; align-items:center; gap: 14px;
}
.avatar{
  width: 78px; height: 78px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
}

.toast{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(11,16,32,.45);
  color: var(--muted);
}

/* Center pages (login / signup / dashboard content) */
.page-center{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 22px;
}
.page-center.with-nav{
  min-height: calc(100vh - 64px);
  padding-top: 20px;
  padding-bottom: 20px;
}
.auth-card{ width:100%; max-width: 460px; }

.link{
  display:inline-block;
  margin-top: 10px;
  color: rgba(233,236,245,.82);
}
.link:hover{ color: #fff; }

/* Link editor items (dashboard) */
.link-item{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.link-actions{ display:flex; gap: 8px; }
.link-actions .btn{ padding: 10px 12px; border-radius: 12px; }
