/* PasblnokHail — ванильная версия (HTML/CSS/JS) */
:root {
  --bg: #04060f;
  --card: rgba(17, 24, 49, 0.72);
  --card2: rgba(30, 41, 82, 0.55);
  --border: rgba(99, 130, 220, 0.18);
  --text: #e6e9f2;
  --muted: #94a3c8;
  --blue: #3b82f6;
  --blue-l: #93c5fd;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
/* Nebula */
.nebula {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(29,78,216,.35), transparent 60%),
    radial-gradient(ellipse 60% 70% at 80% 20%, rgba(59,130,246,.28), transparent 60%),
    radial-gradient(ellipse 70% 50% at 60% 80%, rgba(37,99,235,.30), transparent 60%),
    linear-gradient(180deg, #050814, #030617 50%, #04071e);
  opacity: .55;
}
body[data-nebula="medium"] .nebula { opacity: .85; }
body[data-nebula="high"] .nebula { opacity: 1; filter: saturate(1.3); }
.nebula::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 25% 75%, rgba(200,220,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 45% 35%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 65% 15%, rgba(180,210,255,.6), transparent),
    radial-gradient(1px 1px at 80% 65%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 55% 85%, rgba(255,255,255,.4), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }
body[data-anim="off"] *, body[data-anim="off"] *::before, body[data-anim="off"] *::after {
  animation-duration: .01ms !important; transition-duration: .01ms !important;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 80px; }
.glass {
  background: linear-gradient(145deg, rgba(17,24,49,.72), rgba(10,15,35,.85));
  backdrop-filter: blur(22px); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 8px 40px rgba(0,0,0,.45);
}
/* Header */
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 20px; position: sticky; top: 16px; z-index: 20; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg,#3b82f6,#1d4ed8);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px;
  box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.site-name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.site-sub { font-size: 11px; color: var(--muted); }
.spacer { flex: 1; }
.btn {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 16px;
  font-weight: 700; font-size: 13px; cursor: pointer; color: #cdd6f4;
  background: rgba(30,41,82,.5); transition: all .2s;
}
.btn:hover { border-color: rgba(96,165,250,.6); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg,#3b82f6,#2563eb); color: #fff; border-color: rgba(96,165,250,.4); box-shadow: 0 4px 14px rgba(37,99,235,.35); }
.btn.danger { background: rgba(127,29,29,.35); color: #fca5a5; border-color: rgba(239,68,68,.35); }
.btn.small { padding: 6px 12px; font-size: 12px; }
.admin-badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px;
  background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
/* Layout */
.layout { display: flex; gap: 20px; margin-top: 20px; align-items: flex-start; }
.side { width: 270px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.nav { padding: 14px; }
.nav-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 8px 10px; }
.nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 12px; border: 1px solid transparent; background: none;
  color: #cbd5e1; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s; }
.nav-btn small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.nav-btn:hover { background: rgba(59,130,246,.1); }
.nav-btn.active { background: linear-gradient(90deg, rgba(59,130,246,.25), rgba(59,130,246,.05));
  border-color: rgba(96,165,250,.5); color: #bfdbfe; box-shadow: 0 0 20px rgba(59,130,246,.2); }
.profiles-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px;
  border: 1px solid transparent; background: rgba(255,255,255,.02); cursor: pointer; color: var(--text); text-align: left; }
.pl-item:hover { background: rgba(255,255,255,.06); }
.pl-item.active { background: rgba(59,130,246,.15); border-color: rgba(96,165,250,.4); }
.pl-ava { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#475569,#1e293b);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; overflow: hidden; flex-shrink: 0; }
.pl-ava img { width: 100%; height: 100%; object-fit: cover; }
.pl-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { font-size: 11px; color: var(--muted); }
/* Admin card bottom-left */
.admin-card { padding: 14px; display: flex; align-items: center; gap: 10px; }
.admin-card.is-admin { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); }
.admin-dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.admin-card.is-admin .admin-dot { background: #34d399; box-shadow: 0 0 10px #34d399; animation: twinkle 2s infinite; }
/* Banner */
.banner { height: 190px; position: relative; overflow: hidden; border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg,#1e40af,#3b82f6 40%,#1d4ed8 70%,#1e3a8a); }
.banner.has-img { background-size: cover; background-position: center; }
.banner::after { content:''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(4,6,15,.55) 70%, #04060f 100%); }
.banner-tools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 8px; }
.country-chip { position: absolute; top: 12px; left: 14px; z-index: 2; display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15);
  font-size: 12px; font-weight: 700; }
.profile-row { padding: 0 24px 20px; display: flex; gap: 18px; align-items: flex-end; margin-top: -52px; position: relative; z-index: 2; flex-wrap: wrap; }
.avatar { width: 110px; height: 110px; border-radius: 50%; border: 4px solid #0a0f23; overflow: hidden; position: relative;
  background: linear-gradient(135deg,#334155,#0f172a); display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; box-shadow: 0 0 0 3px rgba(59,130,246,.5), 0 0 30px rgba(59,130,246,.35); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .ov { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .2s; cursor: pointer; }
.avatar:hover .ov { opacity: 1; }
.p-name { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.p-sub { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  background: rgba(59,130,246,.15); color: var(--blue-l); border: 1px solid rgba(59,130,246,.3); }
/* Country buttons */
.countries { padding: 0 24px 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.countries .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 100%; }
.cbtn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 12px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: #cbd5e1; cursor: pointer; transition: all .2s; }
.cbtn .code { font-family: monospace; font-size: 11px; opacity: .7; }
.cbtn.active { background: rgba(59,130,246,.2); border-color: rgba(96,165,250,.6); color: #dbeafe; box-shadow: 0 0 16px rgba(59,130,246,.35); }
.cbtn:disabled { cursor: default; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 24px 22px; }
.stat { background: var(--card2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; position: relative; overflow: hidden; }
.stat::before { content:''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,.6), transparent); animation: shimmer 3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.stat .l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.stat .v { font-size: 15px; font-weight: 700; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(255,255,255,.07); padding: 18px 24px 0; overflow-x: auto; }
.tab { padding: 10px 16px; font-size: 13.5px; font-weight: 700; color: var(--muted); background: none; border: none;
  cursor: pointer; position: relative; white-space: nowrap; }
.tab:hover { color: #e2e8f0; }
.tab.active { color: var(--blue-l); }
.tab.active::after { content:''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg,#60a5fa,#3b82f6); box-shadow: 0 0 10px #3b82f6; }
.tab .cnt { font-size: 10px; background: rgba(59,130,246,.25); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.tabbody { padding: 22px 24px 26px; min-height: 300px; }
.lockbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 12.5px;
  background: rgba(245,158,11,.06); border: 1px solid rgba(245,158,11,.25); color: #fcd34d; margin-bottom: 18px; }
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(99,130,220,.1); }
.row.full { grid-column: 1 / -1; }
.row .k { font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.row .val { font-size: 14px; text-align: right; }
.inp, select.inp, textarea.inp {
  width: 100%; background: rgba(8,12,30,.6); border: 1px solid rgba(99,130,220,.22); border-radius: 10px;
  padding: 9px 13px; color: var(--text); font-size: 14px; outline: none; font-family: inherit; }
.inp:focus { border-color: rgba(96,165,250,.7); box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.inp.right { text-align: right; }
.inp.mono { font-family: monospace; }
textarea.inp { min-height: 130px; resize: vertical; line-height: 1.6; }
.flabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.secttl { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.secttl .ic { width: 32px; height: 32px; border-radius: 9px; background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.25);
  display: flex; align-items: center; justify-content: center; font-size: 15px; }
.secttl h3 { margin: 0; font-size: 15px; }
.secttl p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
/* Gallery */
.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gitem { aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); position: relative; background: #000; }
.gitem img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .4s; }
.gitem:hover img { transform: scale(1.06); }
.gitem .tools { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.gitem:hover .tools { opacity: 1; }
.gitem .tools button { flex: 1; font-size: 10px; font-weight: 800; padding: 7px 4px; border-radius: 8px; border: none; cursor: pointer; color: #fff; }
.empty { border: 1px dashed rgba(255,255,255,.15); border-radius: 16px; padding: 40px; text-align: center; color: var(--muted); }
/* Family cards */
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fcard { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.02); transition: all .25s; }
.fcard:hover { transform: translateY(-3px); border-color: rgba(96,165,250,.4); box-shadow: 0 10px 30px rgba(59,130,246,.2); }
.fcard.active { border-color: rgba(96,165,250,.6); box-shadow: 0 0 24px rgba(59,130,246,.3); }
.fbanner { height: 64px; background: linear-gradient(135deg,#1e40af,#3b82f6,#1e3a8a); position: relative; background-size: cover; }
.fbanner .tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.ftag { font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15); }
.fbody { padding: 0 14px 14px; }
.fava { width: 52px; height: 52px; border-radius: 14px; margin-top: -26px; border: 2px solid #0c1330; overflow: hidden;
  background: linear-gradient(135deg,#475569,#1e293b); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; position: relative; z-index: 1; }
.fava img { width: 100%; height: 100%; object-fit: cover; }
/* Modal */
.mback { position: fixed; inset: 0; z-index: 100; background: rgba(2,4,14,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.mpanel { width: 100%; max-width: 400px; padding: 26px; animation: pop .35s cubic-bezier(.34,1.4,.64,1); position: relative; }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
.mpanel.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:none} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
.err { font-size: 12.5px; color: #fca5a5; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 9px 12px; }
.mclose { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 16px; border: 1px solid rgba(255,255,255,.15); }
/* settings */
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setcard { background: var(--card2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.fadein { animation: fadein .4s both; }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; }
  .stats { grid-template-columns: 1fr; }
  .rows { grid-template-columns: 1fr; }
  .gal { grid-template-columns: repeat(2, 1fr); }
  .fgrid { grid-template-columns: 1fr; }
  .setgrid { grid-template-columns: 1fr; }
  .topbar { position: static; flex-wrap: wrap; }
}
