:root {
  --bg: #1c1d26; --bg2: #232430; --card: #2a2b38; --card2: #343546; --line: #3a3b4d;
  --text: #f1f0f7; --muted: #9a9bb0; --accent: #7a1fff; --accent2: #a66bff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 "Raleway", system-ui, "Segoe UI", sans-serif; position: relative; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }

.blob { position: fixed; width: 220px; height: 220px; border-radius: 50%; background: var(--accent); filter: blur(60px); opacity: .45; z-index: 0; pointer-events: none; }
.b1 { top: 12%; right: -50px; } .b2 { bottom: 8%; left: -70px; background: var(--accent2); opacity: .3; }
.nav, .hero, .features, .footer, .pick, .top, .layout, .container { position: relative; z-index: 1; }

.brand { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.brand sup { font-size: 10px; }
.logo { width: 32px; height: 32px; border-radius: 50%; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 32px; background: rgba(35,36,48,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.nav-right { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.nav-right a:hover { color: var(--text); }
.user { display: flex; align-items: center; gap: 8px; color: var(--text); }
.user img, .menu img { width: 28px; height: 28px; border-radius: 50%; }

.btn { display: inline-block; padding: 9px 18px; border-radius: 10px; border: 0; background: var(--card2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: .15s; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #8d3dff; transform: translateY(-1px); }
.btn.ghost:hover { background: #3d3e52; }
.btn.big { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: wait; }

.hero { text-align: center; padding: 110px 20px 90px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); margin: 0 0 16px; }
.grad { color: var(--accent2); }
.hero p { max-width: 620px; margin: 0 auto 32px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }
.card { background: var(--card); border-radius: 14px; padding: 22px; }
.features .card:hover { background: var(--card2); transform: translateY(-3px); transition: .2s; }
.icon { font-size: 26px; color: var(--accent2); } .card h3 { margin: 12px 0 6px; } .card p { margin: 0; color: var(--muted); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); padding: 28px 40px; border-top: 1px solid var(--line); font-size: 13px; }
.flinks { display: flex; gap: 20px; } .flinks a:hover, .side-foot a:hover, .doc a:hover { color: var(--text); text-decoration: underline; }
.doc { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; padding: 60px 24px 80px; }
.doc h1 { font-size: 38px; margin: 0 0 4px; } .doc h2 { font-size: 20px; margin: 34px 0 8px; }
.doc p, .doc li { color: #cfcfe0; line-height: 1.75; } .doc ul { padding-left: 22px; } .doc a { color: var(--accent2); }
.side-foot { margin: 26px 12px 0; font-size: 12px; color: var(--muted); }
.side-foot a { display: inline; padding: 0; color: var(--muted); font-weight: 600; }
.doc.wide { max-width: 980px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 30px; }
.req { color: #ff6b81; }
.done { text-align: center; padding: 40px 28px; margin-top: 20px; }
.done .ti { font-size: 44px; color: #35d08a; }
.doc .form { margin-top: 26px; }
.doc .card .chip { color: var(--text); }
.container { max-width: 980px; margin: 0 auto; padding: 40px 20px; }

/* server picker */
.pick { display: flex; flex-direction: column; align-items: center; padding: 70px 16px 40px; gap: 28px; }
.big-brand { font-size: 28px; }
.big-brand .logo { width: 40px; height: 40px; }
.pick-card { width: 100%; max-width: 520px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 28px 28px 14px; }
.logged { display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 20px; }
.pick-list { max-height: 440px; overflow-y: auto; padding-right: 6px; }
.pick-row { display: flex; align-items: center; gap: 16px; padding: 14px 12px; border-radius: 12px; font-weight: 700; font-size: 17px; }
.pick-row:hover { background: var(--card); }
.pick-row img, .pick-row .ph { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ph { display: inline-grid; place-items: center; background: var(--card2); font-weight: 800; border-radius: 50%; }
.pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go { font-size: 22px; color: var(--muted); }
.pick-row.dim { color: var(--muted); } .pick-row.dim img { opacity: .6; }

/* dropdown menus */
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 130%; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; z-index: 20; }
.menu-pop a { display: block; padding: 8px 12px; border-radius: 8px; }
.menu-pop a:hover { background: var(--card2); }
.chev { color: var(--muted); }

/* app shell */
.top { display: flex; align-items: center; gap: 16px; padding: 8px 20px; background: var(--bg2); height: 54px; position: sticky; top: 0; z-index: 10; }
.top .brand { font-size: 18px; }
.srv { display: flex; align-items: center; gap: 8px; background: var(--card); padding: 4px 12px 4px 6px; border-radius: 20px; font-weight: 700; max-width: 260px; }
.srv img, .srv .ph { width: 26px; height: 26px; border-radius: 50%; flex: none; font-size: 12px; }
.srv span:not(.ph):not(.chev) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { flex: 1; max-width: 420px; margin: 0 auto; position: relative; }
.search input { width: 100%; background: var(--card); border: 0; border-radius: 8px; padding: 8px 14px; color: var(--text); font: inherit; }
.results { position: absolute; top: 110%; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results a { display: block; padding: 9px 14px; } .results a:hover { background: var(--card2); }
.top .menu { margin-left: auto; }

.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 54px); }
.side { padding: 22px 16px; position: sticky; top: 54px; align-self: start; height: calc(100vh - 54px); overflow-y: auto; }
.side a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 10px; color: #d6d6e4; font-weight: 600; margin-bottom: 4px; }
.side a i { width: 18px; text-align: center; color: #fff; font-size: 14px; }
.side a:hover { background: var(--card); }
.side a.active { background: var(--card2); color: #fff; }
.side .pill { display: inline-flex; background: var(--card2); border-radius: 20px; padding: 8px 24px; margin: 0 0 20px 38px; border: 1px solid var(--line); }
.side .pill i { width: auto; }
.group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 8px 14px 10px; }
.panel { padding: 48px 56px 70px; max-width: 1040px; width: 100%; }
.sec { display: none; } .sec.on { display: block; }
.welcome { font-size: 44px; margin: 6px 0 0; line-height: 1.15; }
.hl { color: var(--accent2); }
.sub { font-size: 28px; margin: 6px 0 40px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.tile { display: block; padding: 26px; }
.tile:hover { background: var(--card2); }
.ti { font-size: 22px; color: #fff; }
.tile h3 { font-size: 19px; margin: 14px 0 8px; }
.tile p { line-height: 1.6; }
.chip { display: inline-block; margin-top: 22px; background: var(--card2); padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.tile:hover .chip { background: var(--accent); }

.sec h2 { margin: 0 0 6px; font-size: 28px; }
.form { display: flex; flex-direction: column; gap: 20px; margin-top: 22px; padding: 28px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .btn { align-self: flex-start; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.preview { margin-top: 14px; position: sticky; top: 74px; }
.embed { margin: 10px 0; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 6px; padding: 12px 14px; position: relative; color: #dcddde; }
.etitle { font-weight: 700; color: #fff; margin-bottom: 6px; padding-right: 70px; }
.edesc { white-space: pre-wrap; font-size: 14px; }
.thumb { position: absolute; top: 12px; right: 12px; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: none; }
.eimg { max-width: 100%; border-radius: 6px; margin-top: 10px; display: none; }
.dbtn { display: inline-block; background: #5865f2; color: #fff; padding: 7px 16px; border-radius: 4px; font-weight: 600; font-size: 14px; }

.toast { position: fixed; right: 24px; bottom: 24px; background: #1f9d6b; color: #fff; padding: 12px 20px; border-radius: 10px; transform: translateY(120px); opacity: 0; transition: .25s; z-index: 30; }
.toast.bad { background: #d6455d; }
.toast.show { transform: none; opacity: 1; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .side .pill { margin: 0; } .group { width: 100%; }
  .split, .row { grid-template-columns: 1fr; }
  .panel { padding: 20px; } .preview { position: static; }
  .top { gap: 8px; padding: 8px 10px; } .top .brand { font-size: 0; } .search { display: none; }
  .nav { padding: 12px 16px; } .nav-right a:not(.btn) { display: none; }
}
