/* ==========================================================================
   VYRON WIKI - a style.css tokenjeire epul, csak a /wiki oldal tolti be.
   A CSP tiltja az inline stilust, ezert minden itt van, style attributum nelkul.
   ========================================================================== */

:root {
    --rank-orok: #AA00AA;
    --rank-asztral: #FFAA00;
    --rank-feny: #FFFF55;
    --rank-arny: #00AA00;
    --rank-felf: #AAAAAA;
    --rank-tulaj: #00AAAA;
    --nav-offset: 88px;
}

[hidden] { display: none !important; }

.wiki-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr) 208px;
    gap: 40px;
    width: min(1360px, 100%);
    margin: 0 auto;
    padding: 28px 20px 72px;
    align-items: start;
}

/* ===== Oldalsav ====================================================== */
.wiki-side {
    position: sticky; top: var(--nav-offset);
    max-height: calc(100vh - var(--nav-offset) - 16px);
    overflow-y: auto; overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

.wiki-search { position: relative; margin-bottom: 18px; }
.wiki-search svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
.wiki-search input {
    width: 100%; min-height: 44px; padding: 10px 40px 10px 40px;
    font: inherit; font-size: 15px; color: var(--text);
    background: var(--card); border: 1px solid var(--line); border-radius: 11px;
}
.wiki-search input::placeholder { color: var(--muted); }
.wiki-search input::-webkit-search-cancel-button { display: none; }
.wiki-search input:focus-visible { outline: 2px solid var(--violet-400); outline-offset: 2px; }
.wiki-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font: 12px "JetBrains Mono", Consolas, monospace; color: var(--muted);
    padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px;
}

.wiki-menu-btn { display: none; }

.wiki-nav h2 {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 0 6px; font-size: 12px; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase; color: var(--violet-300);
}
.wiki-nav h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.wiki-nav ul { list-style: none; margin: 0; padding: 0; }
.wiki-nav a {
    position: relative; display: block;
    padding: 6px 10px 6px 14px; border-radius: 8px;
    color: var(--muted); font-size: 15px; font-weight: 500;
    transition: color .16s ease, background-color .16s ease;
}
.wiki-nav a:hover { color: var(--text); background: rgba(168, 85, 247, .09); text-decoration: none; }
/* Az aktiv elemet a logo eke jeloli, mint a Pulton */
.wiki-nav a[aria-current="page"] { color: var(--text); background: rgba(168, 85, 247, .13); }
.wiki-nav a[aria-current="page"]::before {
    content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
    background: var(--violet-400); clip-path: polygon(0 0, 100% 18%, 100% 82%, 0 100%);
}

/* ===== Cikk ========================================================== */
.wiki-body { min-width: 0; }
.wiki-article { max-width: 780px; }
.wiki-article > :first-child { margin-top: 0; }
/* JS nelkul minden cikk latszik, JS-sel egyszerre egy */
.wiki-ready .wiki-article { display: none; }
.wiki-ready .wiki-article.active { display: block; animation: wiki-in .22s ease-out; }
@keyframes wiki-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.wiki-crumb {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 16px; padding: 0; list-style: none;
    font-size: 13.5px; color: var(--muted);
}
.wiki-crumb li + li::before { content: "/"; margin-right: 8px; color: var(--dim); }

.wiki-article h1 {
    font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -.02em;
    outline: none; text-wrap: balance;
}
.wiki-article .lead { font-size: 18px; line-height: 1.6; color: var(--text); margin: 0 0 24px; }
.wiki-article h2 {
    font-size: 25px; font-weight: 600; margin: 44px 0 12px; padding-top: 2px;
    scroll-margin-top: var(--nav-offset);
}
.wiki-article h3 {
    font-size: 18px; font-weight: 600; margin: 28px 0 8px; color: var(--violet-200);
    scroll-margin-top: var(--nav-offset);
}
.wiki-article p, .wiki-article li { color: #CFC6E0; }
.wiki-article p { margin: 0 0 14px; }
.wiki-article ul:not([class]), .wiki-article ol:not([class]) { margin: 0 0 16px; padding-left: 22px; }
.wiki-article ul:not([class]) li, .wiki-article ol:not([class]) li { margin-bottom: 6px; }
.wiki-article strong { color: var(--text); font-weight: 600; }
.wiki-article code { overflow-wrap: anywhere; }

/* Infodoboz, mint egy igazi wikin */
.infobox {
    float: right; width: 256px; margin: 4px 0 20px 28px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; font-size: 14px;
}
.wiki-article .infobox h2 {
    margin: 0; padding: 12px 16px; font-size: 14px; letter-spacing: .04em;
    background: rgba(124, 58, 237, .16); border-bottom: 1px solid var(--line); color: var(--text);
}
.infobox dl { margin: 0; padding: 4px 16px 10px; }
.infobox div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.infobox div:last-child { border-bottom: 0; }
.infobox dt { color: var(--muted); }
.infobox dd { margin: 0; text-align: right; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Tablazat: a sajat dobozaban gorog, az oldal soha */
.tbl {
    overflow-x: auto; margin: 0 0 20px; clear: both;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.infobox + p + .tbl, .tbl.flow { clear: none; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th {
    padding: 11px 16px; text-align: left; white-space: nowrap;
    font: 600 12.5px "Space Grotesk", sans-serif; letter-spacing: .06em; text-transform: uppercase;
    color: var(--violet-300); background: rgba(124, 58, 237, .1);
    border-bottom: 1px solid var(--line);
}
.tbl td {
    padding: 10px 16px; border-bottom: 1px solid var(--line-soft); color: #CFC6E0;
    vertical-align: top; text-align: left; white-space: normal; font-family: inherit;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl caption { caption-side: top; text-align: left; padding: 12px 16px 2px; color: var(--muted); font-size: 14px; }

/* Nyersanyag: a harom rangsor-szin es a kristalylila, mas szin nem kell */
.res { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text); margin-right: 8px; }
.res::before { content: ""; width: 9px; height: 9px; flex: none; transform: rotate(45deg); background: var(--c); }
.res.rez { --c: var(--bronze); }
.res.vas { --c: var(--silver); }
.res.arany { --c: var(--gold); }
.res.gyemant { --c: var(--violet-300); }

/* Rang: ugy nez ki, mint a chatben: szines zarojel, feher nev */
.rank { white-space: nowrap; font-weight: 600; color: var(--c); }
.rank b { color: #fff; font-weight: 600; }
.rank.orok { --c: #D35BD3; }
.rank.asztral { --c: var(--rank-asztral); }
.rank.feny { --c: var(--rank-feny); }
.rank.arny { --c: #2FCB5F; }
.rank.felf { --c: var(--rank-felf); }

/* Megjegyzes-dobozok: ikon es felirat, nem csak szin */
.note {
    display: flex; gap: 12px; margin: 0 0 18px; padding: 14px 16px;
    background: rgba(168, 85, 247, .08); border: 1px solid var(--line);
    border-left: 3px solid var(--violet-400); border-radius: 10px;
    font-size: 15px;
}
.note svg { flex: none; margin-top: 3px; color: var(--violet-300); }
.note p { margin: 0; color: var(--text); }
.note b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-300); }
.note.warn { border-left-color: var(--gold); background: rgba(240, 179, 91, .08); }
.note.warn svg, .note.warn b { color: var(--gold); }

/* Idovonal a meccsek menetehez */
.timeline { list-style: none; margin: 0 0 22px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 62px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 52px 1fr; gap: 28px; padding: 8px 0; position: relative; }
.timeline li::before {
    content: ""; position: absolute; left: 58px; top: 15px; width: 9px; height: 9px;
    background: var(--violet-400); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--bg);
}
.timeline time { font: 600 15px "JetBrains Mono", Consolas, monospace; text-align: right; color: var(--violet-200); font-variant-numeric: tabular-nums; }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: 15px; }

/* Lucky block eselyek */
.odds-bar {
    display: grid; grid-template-columns: 33fr 31fr 8fr 28fr; gap: 3px;
    height: 12px; margin: 4px 0 18px; border-radius: 6px; overflow: hidden;
}
.odds-bar i:nth-child(1) { background: var(--violet-300); }
.odds-bar i:nth-child(2) { background: var(--violet-500); }
.odds-bar i:nth-child(3) { background: var(--silver); }
.odds-bar i:nth-child(4) { background: var(--gold); }
.odds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.odds {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.odds h3 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 15.5px; color: var(--text); }
.odds h3 span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.wiki-article .odds ul { list-style: none; margin: 0; padding: 0; }
.wiki-article .odds li { margin: 0; display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14.5px; border-top: 1px solid var(--line-soft); }
.odds li b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Emojik */
.emoji-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px;
    list-style: none; margin: 0 0 20px; padding: 0;
}
.emoji-grid li {
    display: flex; align-items: center; gap: 10px; padding: 7px 12px; margin: 0;
    background: var(--card); border: 1px solid var(--line-soft); border-radius: 9px; font-size: 14px;
}
.emoji-grid span { font-size: 20px; line-height: 1; }

/* Kezdolap */
.wiki-hero { margin-bottom: 32px; }
.wiki-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 28px; }
.wiki-cat {
    position: relative; display: block; overflow: hidden; padding: 20px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); transition: border-color .16s ease, background-color .16s ease;
}
.wiki-cat::before {
    content: ""; position: absolute; top: -1px; left: 20px; width: 46px; height: 2px;
    background: linear-gradient(90deg, var(--violet-400), transparent);
}
.wiki-cat:hover { text-decoration: none; border-color: var(--violet-600); background: var(--card-hi); }
.wiki-cat svg { color: var(--violet-300); margin-bottom: 10px; display: block; }
.wiki-cat b { display: block; font: 600 17px "Space Grotesk", sans-serif; margin-bottom: 4px; }
.wiki-cat span { color: var(--muted); font-size: 14.5px; line-height: 1.5; display: block; }

/* GYIK */
.wiki-article details {
    margin-bottom: 8px; background: var(--card);
    border: 1px solid var(--line); border-radius: 11px;
}
.wiki-article summary {
    padding: 13px 16px; min-height: 44px; cursor: pointer;
    font-weight: 600; color: var(--text); list-style-position: inside;
}
.wiki-article summary:focus-visible { outline: 2px solid var(--violet-400); outline-offset: 2px; border-radius: 10px; }
.wiki-article details p { padding: 0 16px; margin-bottom: 14px; }

/* Masolhato parancs */
.cmd {
    font: .92em "JetBrains Mono", Consolas, monospace; color: var(--violet-200);
    background: rgba(168, 85, 247, .1); border: 0; border-radius: 6px;
    padding: 3px 7px; cursor: pointer; text-align: left;
    transition: background-color .14s ease;
}
.cmd:hover { background: rgba(168, 85, 247, .22); }
.cmd.copied { background: rgba(110, 231, 168, .16); color: var(--ok); }

/* Lapozas */
.wiki-pager {
    clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    max-width: 780px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.wiki-pager a {
    display: block; padding: 12px 16px; min-height: 44px;
    border: 1px solid var(--line); border-radius: 11px; color: var(--text); font-weight: 600;
}
.wiki-pager a:hover { text-decoration: none; border-color: var(--violet-600); background: rgba(168, 85, 247, .08); }
.wiki-pager span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.wiki-pager a[rel="next"] { grid-column: 2; text-align: right; }

/* Kereses eredmenyek */
.wiki-results { max-width: 780px; }
.wiki-results h1 { font-size: 28px; }
.wiki-results ol { list-style: none; margin: 16px 0 0; padding: 0; }
.wiki-results li { margin-bottom: 10px; }
.wiki-results a {
    display: block; padding: 13px 16px; color: var(--text);
    background: var(--card); border: 1px solid var(--line); border-radius: 11px;
}
.wiki-results a:hover { text-decoration: none; border-color: var(--violet-600); }
.wiki-results b { display: block; font-family: "Space Grotesk", sans-serif; }
.wiki-results small { display: block; color: var(--violet-300); font-size: 13px; }
.wiki-results span { display: block; margin-top: 3px; color: var(--muted); font-size: 14.5px; }
mark { background: rgba(240, 179, 91, .24); color: var(--text); border-radius: 3px; padding: 0 1px; }

/* Jobb oldali tartalom */
.wiki-toc {
    position: sticky; top: var(--nav-offset);
    max-height: calc(100vh - var(--nav-offset) - 16px); overflow-y: auto;
    font-size: 14px;
}
.wiki-toc p { margin: 0 0 8px; font: 600 12px "Space Grotesk", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--violet-300); }
.wiki-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.wiki-toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; }
.wiki-toc a:hover { color: var(--text); text-decoration: none; }
.wiki-toc a.on { color: var(--text); border-left-color: var(--violet-400); }

/* ===== Reszponziv ==================================================== */
@media (max-width: 1240px) {
    .wiki-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 32px; }
    .wiki-toc { display: none; }
}

@media (max-width: 900px) {
    .wiki-shell { display: block; padding: 16px 16px 56px; }
    .wiki-side { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 20px; }
    .wiki-search { margin-bottom: 10px; }
    .wiki-search kbd { display: none; }
    .wiki-menu-btn {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; min-height: 44px; padding: 10px 14px;
        font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
        background: var(--card); border: 1px solid var(--line); border-radius: 11px;
    }
    .wiki-menu-btn svg { transition: transform .18s ease; }
    .wiki-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
    .wiki-ready .wiki-nav[data-closed] { display: none; }
    .wiki-nav a { padding-block: 10px; }
    .infobox { float: none; width: 100%; margin: 0 0 20px; }
    .wiki-article h2 { font-size: 22px; margin-top: 36px; }
    .wiki-article .lead { font-size: 17px; }
}

@media (max-width: 560px) {
    .odds-grid { grid-template-columns: 1fr; }
    .wiki-pager { grid-template-columns: 1fr; }
    .wiki-pager a[rel="next"] { grid-column: 1; }
    .timeline::before { left: 54px; }
    .timeline li { grid-template-columns: 44px 1fr; gap: 26px; }
    .timeline li::before { left: 50px; }
}

@media (prefers-reduced-motion: reduce) {
    .wiki-ready .wiki-article.active { animation: none; }
    .wiki-menu-btn svg, .wiki-nav a, .wiki-cat { transition: none; }
}
