/* MOSS dizájn: modern, sötét alap, lilás-zöldes ragyogás, és a mesekönyves hangulat
   apró részletekben: csiga, csillámpor, kézírásos megjegyzések.
   Szándékosan más, mint az emcoda.com: ez a MOSS saját márkája. */
:root {
  --bg: #0F0D17; --bg-2: #14111E; --surface: #1A1726; --surface-2: #221E31; --field: #12101B;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .16);
  --text: #F4F1EA; --muted: #A9A3B8;
  --lilac: #B9A3F0; --mint: #8FE3B5; --honey: #F2C46A;
  --grad: linear-gradient(100deg, #C9B6FF 0%, #8FE3B5 100%);
  --glow-1: rgba(155, 127, 230, .28); --glow-2: rgba(93, 190, 138, .18);
  --btn-text: #14111E;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FAF8F3; --bg-2: #F3F0E8; --surface: #FFFFFF; --surface-2: #F3F0EA; --field: #FFFFFF;
  --line: rgba(22, 19, 31, .09); --line-strong: rgba(22, 19, 31, .18);
  --text: #16131F; --muted: #6A6478;
  --lilac: #7B5BE0; --mint: #2E9E6A; --honey: #B8760F;
  --grad: linear-gradient(100deg, #7B5BE0 0%, #2E9E6A 100%);
  --glow-1: rgba(140, 111, 224, .18); --glow-2: rgba(63, 168, 116, .14);
  --btn-text: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #FAF8F3; --bg-2: #F3F0E8; --surface: #FFFFFF; --surface-2: #F3F0EA; --field: #FFFFFF;
    --line: rgba(22, 19, 31, .09); --line-strong: rgba(22, 19, 31, .18);
    --text: #16131F; --muted: #6A6478;
    --lilac: #7B5BE0; --mint: #2E9E6A; --honey: #B8760F;
    --grad: linear-gradient(100deg, #7B5BE0 0%, #2E9E6A 100%);
    --glow-1: rgba(140, 111, 224, .18); --glow-2: rgba(63, 168, 116, .14);
    --btn-text: #FFFFFF;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 500 16px/1.6 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 12px; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
a { color: var(--text); }
.link { font-weight: 700; color: var(--lilac); text-decoration: none; }
.link:hover { text-decoration: underline; }
.small { font-size: .9rem; color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .88em; }

/* A csiga vászna: a tartalom mögött, kattintást nem fog el */
#snail-trail { position: fixed; left: 0; bottom: 0; width: 100%; height: 140px; pointer-events: none; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }

/* Fejléc: üveges sáv */
header.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.who img { width: 30px; height: 30px; border-radius: 50%; }
.pill { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; font: 700 .92rem "Plus Jakarta Sans", sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .2s; }
.pill:hover { border-color: var(--lilac); }
.theme-btn { width: 40px; padding: 0; justify-content: center; }
.theme-btn svg { width: 18px; height: 18px; }
/* Sötét módban a nap ikon látszik (arra lehet váltani), világosban a hold */
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: block; }
}

main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 24px 170px; flex: 1; }
main.narrow { max-width: 820px; }
footer { border-top: 1px solid var(--line); text-align: center; padding: 26px 16px 44px; font-size: .9rem; color: var(--muted); }
footer a { color: var(--muted); }

/* Gombok */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--grad); color: var(--btn-text); border: 0; border-radius: 14px; padding: 14px 24px; font: 800 1rem "Plus Jakarta Sans", sans-serif; text-decoration: none; box-shadow: 0 10px 30px var(--glow-1); transition: transform .2s, box-shadow .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px var(--glow-1); color: var(--btn-text); }
.btn-soft { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-soft:hover { color: var(--text); border-color: var(--lilac); box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Kártyák */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; margin-bottom: 18px; }
.flash { background: color-mix(in srgb, var(--mint) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mint) 40%, transparent); border-radius: 14px; padding: 10px 14px; font-weight: 600; }

/* Űrlapok */
label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
select, textarea, input[type="text"] { display: block; width: 100%; margin-top: 7px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); font: inherit; font-weight: 500; color: var(--text); transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; }
select:focus, textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 4px var(--glow-1); }
::placeholder { color: var(--muted); opacity: .7; }
.toggle { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 700; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.switch { width: 50px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); position: relative; flex: none; transition: background .25s; }
.switch::after { content: "🐌"; position: absolute; top: 0; left: 3px; font-size: 16px; line-height: 26px; transform: scaleX(-1); transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.toggle input:checked + .switch { background: var(--grad); border-color: transparent; }
.toggle input:checked + .switch::after { transform: translateX(21px) scaleX(-1); }
.toggle input:focus-visible + .switch { box-shadow: 0 0 0 4px var(--glow-1); }

/* Lenyíló lista (dropdown.js) */
.pick { position: relative; margin-top: 7px; }
.pick select { position: absolute; inset: 0; opacity: 0; pointer-events: none; margin: 0; }
.pick-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font: inherit; font-weight: 500; color: var(--text); background: var(--field); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; cursor: pointer; }
.pick-btn:focus-visible, .pick.open .pick-btn { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 4px var(--glow-1); }
.pick-btn svg { flex: none; transition: transform .2s; color: var(--muted); }
.pick.open .pick-btn svg { transform: rotate(180deg); }
.pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); max-height: 260px; overflow-y: auto; font-weight: 500; }
.pick-list[hidden] { display: none; }
.pick-list li { padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.pick-list li.active { background: color-mix(in srgb, var(--lilac) 18%, transparent); }
.pick-list li[aria-selected="true"] { font-weight: 800; }

/* Discord-szerű előnézetek */
/* Előnézetek a MOSS saját színeiben (szándékosan nem a Discord felületét utánozzák) */
.preview { background: var(--bg-2); color: var(--text); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.discord-mock { background: var(--bg-2); color: var(--text); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); font-weight: 500; }
.preview .bot-name { font-size: .8rem; color: var(--muted); }
.preview p { margin: 4px 0 0; white-space: pre-wrap; }
.mention { background: color-mix(in srgb, var(--lilac) 22%, transparent); color: var(--lilac); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.discord-mock p { margin: 0; }
.dm-name { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px !important; }
.dm-name img { width: 30px; height: 30px; background: #1A1726; border-radius: 50%; padding: 3px; }
.app-tag { font-size: .62rem; background: var(--grad); color: var(--btn-text); border-radius: 999px; padding: 1px 7px; font-weight: 800; }
.dm-sub { font-size: .8rem; color: var(--muted); margin: 2px 0 10px !important; }
.dm-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-buttons span { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px 12px; font-size: .88rem; font-weight: 700; }
.dm-embed { border-left: 4px solid var(--lilac); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.dm-embed p { margin: 4px 0 8px; }
.dm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .88rem; }
.dm-fields b { display: block; }

/* ---------- Kezdőlap ---------- */
.landing { position: relative; }
.landing::before { content: ""; position: absolute; inset: -140px -200px auto; height: 820px; z-index: -1; pointer-events: none;
  background: radial-gradient(520px 340px at 30% 28%, var(--glow-1), transparent 70%), radial-gradient(480px 320px at 72% 42%, var(--glow-2), transparent 70%); }
.hero { text-align: center; padding: 56px 0 10px; max-width: 900px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: .88rem; margin-bottom: 24px; }
.eyebrow b { background: var(--grad); color: var(--btn-text); border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); letter-spacing: -.045em; line-height: 1.02; margin-bottom: 22px; }
.hero > p { font-size: 1.18rem; color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.hero .actions { justify-content: center; }
.hero .safe { font-size: .88rem; color: var(--muted); margin: 14px 0 0; }
.note { display: inline-flex; align-items: center; gap: 6px; font: 700 1.45rem "Gaegu", cursive; color: var(--honey); transform: rotate(-3deg); margin-top: 18px; }
.note svg { width: 38px; height: 30px; flex: none; }
.shot { position: relative; margin: 56px auto 0; max-width: 1080px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); padding: 8px; box-shadow: 0 40px 120px var(--glow-1), 0 10px 40px rgba(0,0,0,.25); }
.shot-bar { display: flex; gap: 6px; padding: 6px 8px 10px; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.shot img { display: block; width: 100%; border-radius: 10px; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 48px; margin: 48px 0 0; color: var(--muted); font-weight: 600; text-align: center; }
.trust b { color: var(--text); font-size: 1.7rem; display: block; letter-spacing: -.03em; font-weight: 800; }
.section { margin-top: 110px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.kicker { display: block; font: 700 1.4rem "Gaegu", cursive; color: var(--honey); margin-bottom: 4px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { margin: 0; position: relative; overflow: hidden; padding: 24px; display: flex; flex-direction: column; gap: 4px; transition: border-color .25s, transform .25s; }
.tile:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tile p { color: var(--muted); margin: 0; }
.tile .art { margin-top: auto; padding-top: 18px; }
.tile .art img { width: 100%; display: block; border-radius: 12px; }
.t-wide { grid-column: span 4; }
.t-side { grid-column: span 2; }
.t-third { grid-column: span 2; }
.tile::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border-radius: 50%; background: radial-gradient(var(--glow-1), transparent 70%); pointer-events: none; }
.tile:nth-child(even)::after { background: radial-gradient(var(--glow-2), transparent 70%); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 10px; }
.swatches { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; }
.swatches span { flex: 1; height: 54px; border-radius: 12px; border: 1px solid var(--line); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.theme-card { margin: 0; padding: 10px; }
.theme-card img { width: 100%; border-radius: 12px; display: block; }
.theme-card figcaption { display: grid; gap: 2px; padding: 12px 6px 4px; }
.cta { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 110px; padding: 40px; text-decoration: none; border-color: var(--line-strong);
  background: radial-gradient(420px 220px at 0% 0%, var(--glow-1), transparent 70%), radial-gradient(420px 220px at 100% 100%, var(--glow-2), transparent 70%), var(--surface); }
.cta h3 { font-size: 1.8rem; letter-spacing: -.03em; }
.cta p { margin: 0; color: var(--muted); }

/* ---------- Dashboard: oldalsáv + tartalom ---------- */
.dash { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 84px; padding: 14px; }
.side-guild { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 6px 6px 16px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-guild img, .initial { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.initial { display: grid; place-items: center; background: var(--grad); color: var(--btn-text); font-weight: 800; }
.side nav { display: grid; gap: 2px; }
.side nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.side nav a:hover { background: var(--surface-2); color: var(--text); }
.side nav a.active { background: color-mix(in srgb, var(--lilac) 14%, transparent); color: var(--text); }
.side nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.side nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-left: auto; }
.side nav .dot.on { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.side .back { display: block; margin: 12px 6px 2px; font-size: .9rem; }
.panel[hidden] { display: none; }
.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 1.9rem; margin-bottom: 4px; }
.panel-head p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { margin: 0; position: relative; overflow: hidden; }
.stat b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-weight: 600; font-size: .92rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.checklist li:hover { background: var(--surface-2); }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; flex: none; border: 1px solid var(--line-strong); }
.checklist .tick.done { background: var(--grad); border-color: transparent; color: var(--btn-text); font-weight: 800; }
.checklist .go { margin-left: auto; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.theme-option { margin: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--field); font-weight: 500; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.theme-option input { position: absolute; opacity: 0; }
.theme-option img { width: 100%; border-radius: 10px; display: block; }
.theme-option > span { display: grid; gap: 2px; padding: 10px 6px 4px; }
.theme-option strong { font-weight: 800; }
.theme-option:has(input:checked) { border-color: var(--lilac); box-shadow: 0 0 0 3px var(--glow-1); }
.theme-option:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--glow-1); }
.question { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; background: var(--bg-2); }
.question summary { font-weight: 800; padding: 2px 0; cursor: pointer; }
.question[open] summary { margin-bottom: 12px; }
.answers { display: grid; grid-template-columns: 84px 1fr 1fr; gap: 8px; align-items: center; }
.answers input[type="text"], .answers .pick { margin-top: 0; }
.rr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list { list-style: none; padding: 0; margin: 0; }
.card.list { padding: 4px 22px; }  /* a kártyán belül kell oldalsó hely, különben a szöveg a szélhez tapad */
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.link-btn { background: none; border: 0; padding: 4px 8px; font: 700 .92rem "Plus Jakarta Sans", sans-serif; color: var(--lilac); cursor: pointer; }
.save-bar { position: sticky; bottom: 18px; display: flex; justify-content: flex-end; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.server { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; margin: 0; transition: border-color .2s, transform .2s; }
.server:hover { border-color: var(--lilac); transform: translateY(-2px); }
.server img { width: 42px; height: 42px; border-radius: 12px; }
.invite-row { display: flex; justify-content: space-between; gap: 12px; }
.group { margin: 36px 0 12px; font-size: 1.2rem; }
.prose h2 { margin-top: 24px; font-size: 1.3rem; }
.prose ul { padding-left: 20px; }

@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .t-wide, .t-side, .t-third { grid-column: span 2; }
  .theme-grid, .theme-pick { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .side { position: static; }
  .side nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .side nav a.active::before { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .answers { grid-template-columns: 64px 1fr; }
  .answers > div { grid-column: 1 / -1; }
  .answers > span:nth-child(3) { display: none; }
  .who-name, .top-servers { display: none; }
  .top-in { padding: 10px 16px; }
  main { padding-left: 16px; padding-right: 16px; }
  .cta { padding: 26px; }
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--lilac); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Emojiválasztó */
.emoji-field { cursor: pointer; text-align: center; font-size: 1.2rem; }
.emoji-pop { position: absolute; z-index: 50; width: min(340px, calc(100vw - 24px)); max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.emoji-title { margin: 8px 2px 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { background: none; border: 0; border-radius: 8px; padding: 4px 0; font-size: 1.25rem; line-height: 1.4; cursor: pointer; }
.emoji-grid button:hover, .emoji-grid button:focus-visible { background: color-mix(in srgb, var(--lilac) 22%, transparent); outline: none; }
.emoji-grid img { width: 24px; height: 24px; vertical-align: middle; }
.emoji-clear { display: block; margin: 8px auto 2px; }
