* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; background: var(--bg); background-attachment: fixed; color: var(--text); }
a { color: inherit; }
:root { --accent: #ff7a66; --on-accent: #fff; --c1: #7c3aed; --c2: #06b6d4; }

/* ================= ТЕМИ (ті самі, що в лаунчері) ================= */
[data-theme="dark"], [data-prev="dark"] {
  --bg: linear-gradient(135deg, #171a22, #0d0e13);
  --panel: rgba(255,255,255,.045); --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.08); --text: #eef0f6; --muted: #8b91a3; --side: rgba(20,22,30,.7); --blur: 0px;
}
[data-theme="light"], [data-prev="light"] {
  --bg: linear-gradient(135deg, #f6f7fb, #e6e9f2);
  --panel: rgba(255,255,255,.75); --panel2: rgba(0,0,0,.06);
  --border: rgba(0,0,0,.09); --text: #14161c; --muted: #6a7184; --side: rgba(255,255,255,.75); --blur: 0px;
}
[data-theme="amoled"], [data-prev="amoled"] {
  --bg: #000; --panel: rgba(255,255,255,.04); --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.09); --text: #f4f4f6; --muted: #858a99; --side: rgba(0,0,0,.85); --blur: 0px;
}
[data-theme="glass"], [data-prev="glass"] {
  --bg: radial-gradient(900px 520px at 8% 0%, #3b82f6 0, transparent 60%), radial-gradient(800px 600px at 100% 100%, #ec4899 0, transparent 55%), radial-gradient(600px 400px at 90% 0%, #8b5cf6 0, transparent 60%), #0b0d1a;
  --panel: rgba(255,255,255,.11); --panel2: rgba(255,255,255,.18);
  --border: rgba(255,255,255,.22); --text: #fff; --muted: rgba(255,255,255,.72); --side: rgba(255,255,255,.1); --blur: 22px;
}
[data-theme="glass2"], [data-prev="glass2"] {
  --bg: radial-gradient(800px 500px at 0% 0%, #c7d2fe 0, transparent 60%), radial-gradient(800px 600px at 100% 100%, #fbcfe8 0, transparent 60%), #eef2ff;
  --panel: rgba(255,255,255,.55); --panel2: rgba(255,255,255,.8);
  --border: rgba(255,255,255,.9); --text: #1b1f33; --muted: #5d6485; --side: rgba(255,255,255,.6); --blur: 22px;
}
[data-theme="snow"], [data-prev="snow"] {
  --bg: linear-gradient(160deg, #0d1a2e, #2b4a70 60%, #86aad0);
  --panel: rgba(255,255,255,.10); --panel2: rgba(255,255,255,.17);
  --border: rgba(255,255,255,.16); --text: #f3f8ff; --muted: rgba(235,243,255,.7); --side: rgba(8,16,32,.45); --blur: 14px;
}
[data-theme="sun"], [data-prev="sun"] {
  --bg: linear-gradient(135deg, #ffe08a, #ff9a62 60%, #ff6f61);
  --panel: rgba(255,255,255,.45); --panel2: rgba(255,255,255,.65);
  --border: rgba(255,255,255,.6); --text: #2b1406; --muted: rgba(60,28,8,.68); --side: rgba(255,255,255,.4); --blur: 14px;
}
[data-theme="autumn"], [data-prev="autumn"] {
  --bg: linear-gradient(135deg, #2d150a, #8a3a12 55%, #e07a2a);
  --panel: rgba(255,255,255,.09); --panel2: rgba(255,255,255,.16);
  --border: rgba(255,255,255,.15); --text: #fff4ea; --muted: rgba(255,230,210,.7); --side: rgba(20,8,2,.45); --blur: 14px;
}
[data-theme="rain"], [data-prev="rain"] {
  --bg: linear-gradient(135deg, #0b1f28, #1f5f70 60%, #46a3b3);
  --panel: rgba(255,255,255,.09); --panel2: rgba(255,255,255,.16);
  --border: rgba(255,255,255,.15); --text: #eefbff; --muted: rgba(225,245,250,.7); --side: rgba(4,16,22,.45); --blur: 14px;
}
[data-theme="custom"], [data-prev="custom"] {
  --bg: linear-gradient(135deg, var(--c1), var(--c2));
  --panel: rgba(255,255,255,.14); --panel2: rgba(255,255,255,.22);
  --border: rgba(255,255,255,.22); --text: #fff; --muted: rgba(255,255,255,.75); --side: rgba(0,0,0,.25); --blur: 16px;
}

/* ================= НАВІГАЦІЯ ================= */
.nav { position: sticky; top: 12px; z-index: 50; margin: 12px auto 0; max-width: 1180px; width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 16px; border-radius: 22px; background: var(--side); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 8px; }
.brand b { font-size: 17px; }
.brand i { font-style: normal; color: var(--accent); font-weight: 600; font-size: 17px; }
.logo { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c3aed)); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); flex: none; }
.logo.big { width: 64px; height: 64px; border-radius: 20px; font-size: 32px; margin: 0 auto 14px; }
.links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.links::-webkit-scrollbar { display: none; }
.nl { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 13px; color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; transition: .15s; }
.nl:hover { background: var(--panel); color: var(--text); }
.nl.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.nav-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ib { width: 38px; height: 38px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: .15s; font: inherit; }
.ib:hover, .ib.on { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); }
.ib.sm2 { width: 30px; height: 30px; border-radius: 10px; }
.chip-u { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border-radius: 15px; background: var(--panel); border: 1px solid var(--border); }
.avatar { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #7c3aed); display: grid; place-items: center; font-weight: 700; color: #fff; overflow: hidden; font-size: 13px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.u-n { font-size: 13px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.page { max-width: 1180px; margin: 0 auto; padding: 30px 18px 70px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 0 30px; }
.notice { max-width: 1180px; margin: 14px auto 0; width: calc(100% - 24px); padding: 11px 16px; border-radius: 15px; font-size: 13px; background: color-mix(in srgb, var(--accent) 18%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

/* ================= КНОПКИ ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; font: inherit; font-size: 13.5px; font-weight: 600; height: 40px; padding: 0 18px; border-radius: 13px; cursor: pointer; color: var(--text); background: var(--panel2); transition: .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.ghost { background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(var(--blur)); }
.btn.xl { width: 100%; height: 50px; font-size: 15px; border-radius: 16px; }
.btn.xl2 { height: 52px; padding: 0 26px; font-size: 15px; border-radius: 17px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 11px; }
.btn.sq { width: 34px; padding: 0; flex: none; }
.chipbtn { border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; padding: 0 16px; height: 40px; border-radius: 999px; cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 8px; }
.chipbtn:hover { filter: brightness(1.15); }
.chipbtn.on { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.chipbtn .cnt { font-size: 11px; background: var(--panel2); color: var(--text); padding: 1px 8px; border-radius: 20px; }

/* ================= ГЕРОЙ ================= */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 38px; margin-bottom: 36px; border-radius: 30px; border: 1px solid var(--border); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 30%, transparent), var(--panel) 70%); backdrop-filter: blur(var(--blur)); }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 14px 0 12px; letter-spacing: -.5px; }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 520px; margin-bottom: 24px; }
.acts { display: flex; gap: 12px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; background: var(--accent); color: var(--on-accent); }
.stack { position: relative; height: 230px; }
.mini { position: absolute; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px; background: var(--panel2); border: 1px solid var(--border); backdrop-filter: blur(18px); box-shadow: 0 18px 40px rgba(0,0,0,.2); min-width: 250px; }
.mini b { display: block; font-size: 15px; }
.mini span { font-size: 12px; color: var(--muted); }
.m0 { top: 0; left: 20px; transform: rotate(-3deg); }
.m1 { top: 78px; right: 0; transform: rotate(2deg); }
.m2 { top: 156px; left: 6px; transform: rotate(-1.5deg); }

/* ================= КАРТКИ ================= */
.sec-h { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; justify-content: space-between; }
.sec-h h3 { font-size: 19px; }
.sec-h.big { margin-bottom: 18px; }
.sec-h.big h2 { font-size: 30px; }
.more { text-decoration: none; color: var(--accent); font-size: 20px; font-weight: 700; }
.lead { color: var(--muted); margin: -6px 0 20px; max-width: 640px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; margin-bottom: 34px; }
.card { padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(var(--blur)); display: flex; flex-direction: column; gap: 12px; transition: .2s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.c-top { display: flex; gap: 13px; align-items: center; }
.ico { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h) 80% 58%), hsl(calc(var(--h) + 50) 75% 45%)); }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.c-t { min-width: 0; }
.c-t b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-t span { font-size: 12.5px; color: var(--muted); }
.c-d { font-size: 13.5px; color: var(--muted); line-height: 1.5; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-m { display: flex; gap: 6px; flex-wrap: wrap; }
.c-f { display: flex; gap: 8px; margin-top: auto; min-height: 34px; }
.c-f .btn:first-child:not(.sq) { flex: 1; }
.chip { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: var(--panel2); color: var(--muted); display: inline-block; }
.chip.st-pending { background: rgba(245,166,35,.3); color: var(--text); }
.chip.st-approved { background: rgba(34,197,94,.3); color: var(--text); }
.chip.st-rejected { background: rgba(229,72,77,.3); color: var(--text); }
.vbadge { color: #3b9cff; display: inline-flex; vertical-align: -3px; margin-left: 6px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14.5px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; padding: 0 16px; height: 44px; background: var(--panel); border: 1px solid var(--border); border-radius: 15px; backdrop-filter: blur(var(--blur)); }
.search svg { display: none; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }

/* ================= ФОРМИ ================= */
.box { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; padding: 22px; margin-bottom: 22px; backdrop-filter: blur(var(--blur)); max-width: 760px; }
.box.center { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.box h4 { font-size: 15px; margin-bottom: 14px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.inp { width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); color: var(--text); padding: 0 14px; font: inherit; font-size: 14px; outline: 0; transition: .15s; }
textarea.inp { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
select.inp option { color: #111; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.st-line { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sub { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.sub a { color: var(--accent); }

/* ================= НАЛАШТУВАННЯ ================= */
.lbl { font-size: 12px; color: var(--muted); margin: 18px 0 10px; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.box:has(.themes), .box:has(.langs) { max-width: none; }
.tile { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 18px; padding: 10px; cursor: pointer; font: inherit; font-size: 12.5px; display: flex; flex-direction: column; gap: 9px; align-items: center; transition: .15s; }
.tile:hover { transform: translateY(-2px); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.tprev { width: 100%; height: 58px; border-radius: 12px; background: var(--bg); position: relative; border: 1px solid rgba(128,128,128,.25); overflow: hidden; }
.tprev i { position: absolute; left: 10px; bottom: 10px; width: 46%; height: 11px; border-radius: 8px; background: var(--accent); }
.tprev::before { content: ""; position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; border-radius: 8px; background: var(--panel2); }
.accents { display: flex; gap: 12px; align-items: center; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--c); transition: .15s; }
.dot:hover { transform: scale(1.12); }
.dot.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--c); }
.dot.rainbow { background: conic-gradient(#ff5f6d, #ffc371, #47e891, #3aa8ff, #b46bff, #ff5f6d); position: relative; overflow: hidden; display: block; }
.dot.rainbow input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.colors { display: flex; gap: 12px; align-items: center; }
.colors input { width: 46px; height: 34px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lang { border: 0; padding: 12px; border-radius: 999px; font: inherit; font-size: 13.5px; background: var(--panel2); color: var(--text); cursor: pointer; transition: .15s; }
.lang:hover { filter: brightness(1.15); }
.lang.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* ================= АДМІНКА ================= */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.row { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--border); margin-bottom: 10px; backdrop-filter: blur(var(--blur)); }
.row.center-y { align-items: center; }
.row .ico { width: 46px; height: 46px; border-radius: 14px; font-size: 19px; }
.row-m { flex: 1; min-width: 0; }
.row-m p { font-size: 13.5px; margin-top: 8px; color: var(--muted); line-height: 1.5; }
.row-a { display: flex; gap: 8px; flex: none; }
.row-top { margin-bottom: 14px; }

/* ================= МОДАЛКА / ВХІД ================= */
.modal-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); overflow-y: auto; }
.modal-bg[hidden] { display: none; }
.modal { position: relative; width: 100%; max-width: 440px; padding: 30px 28px 24px; border-radius: 28px; background: var(--bg), var(--panel); background-color: #14161d; border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: pop .3s ease; color: var(--text); }
[data-theme="light"] .modal, [data-theme="glass2"] .modal, [data-theme="sun"] .modal { background-color: #fff; }
.modal::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--panel); pointer-events: none; }
.modal > * { position: relative; }
.m-x { position: absolute !important; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 11px; border: 0; background: var(--panel2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.m-head { text-align: center; margin-bottom: 18px; }
.m-head h2 { font-size: 22px; margin-bottom: 6px; }
.m-head p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.m-h { font-size: 20px; margin-bottom: 16px; }
.m-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.oauth { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.err { display: block; color: #ff6b6b; min-height: 16px; font-size: 12.5px; margin-top: 10px; text-align: center; }
.modal:has(#progForm) { max-width: 560px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: #1b1d26; color: #fff; padding: 12px 22px; border-radius: 14px; font-size: 13.5px; transition: .25s; pointer-events: none; z-index: 200; border: 1px solid rgba(255,255,255,.14); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 26px; }
  .stack { display: none; }
  .brand span:last-child { display: none; }
  .nav { flex-wrap: wrap; }
  .links { order: 3; width: 100%; flex: none; }
  .u-n { display: none; }
  .two { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
}
