:root {
    --blue: #FF1E2E;
    --blue-2: #FF5B67;
    --glow: rgba(255, 30, 46, 0.45);
    --bg: #0C0809;
    --card: #1C1414;
    --card-2: #281C1D;
    --line: rgba(255, 91, 103, 0.16);
    --line-2: rgba(255, 91, 103, 0.34);
    --text: #FFE9EB;
    --muted: #8A94B8;
    --yellow: #FFC53D;
    --heading: 'Rajdhani', 'Inter', sans-serif;
    --mono: 'JetBrains Mono', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { min-height: 100vh; background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 30, 46, 0.22), transparent), var(--bg); font-family: 'Inter', system-ui, sans-serif; color: var(--text); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 70px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(12, 8, 9, 0.94); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 12px var(--glow)); }
.brand small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 2px; color: var(--blue-2); text-transform: uppercase; }
.brand b { font: 700 22px var(--heading); }
.tabs { display: flex; gap: 6px; margin-left: auto; }
.tabs a { padding: 9px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--text); border-color: var(--line-2); }
.tabs a.active { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(255, 30, 46, 0.35); }
.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); font-size: 18px; cursor: pointer; }

.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr) 240px; max-width: 1400px; margin: 0 auto; }
.side { position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto; padding: 22px 14px 30px 24px; border-right: 1px solid var(--line); }
.search input { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: #120D0D; outline: none; font-size: 14px; }
.search input:focus { border-color: var(--blue); }
.cat { margin: 20px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.page { display: flex; gap: 8px; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: #F2C9CC; text-decoration: none; }
.page:hover { background: var(--card); color: #fff; }
.page.active { background: rgba(255, 30, 46, 0.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.page .num { min-width: 20px; font: 700 12.5px var(--mono); color: var(--blue-2); }
.empty { margin: 20px 8px; color: var(--muted); font-size: 13px; }

.content { padding: 44px 56px 90px; min-width: 0; }
.loading { color: var(--muted); }
.crumbs { font-size: 13px; font-weight: 600; color: var(--muted); }
.crumbs b { color: var(--blue-2); }
h1.title { margin-top: 8px; font: 700 46px var(--heading); line-height: 1.05; }
.meta { margin-top: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 46px; }
.pager a { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; }
.pager a:hover { border-color: var(--blue); }
.pager small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.pager b { font-size: 15px; }
.pager .next { grid-column: 2; text-align: right; }

.toc { position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto; padding: 50px 24px 20px 0; }
.toc-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.toc a { display: block; margin-top: 9px; padding-left: 11px; border-left: 2px solid var(--line); font-size: 13px; line-height: 1.35; color: #DCAEB1; text-decoration: none; }
.toc a.l3 { padding-left: 22px; font-size: 12.5px; }
.toc a:hover { border-color: var(--blue); color: #fff; }

/* text formatat (la fel ca in joc) */
.article { margin-top: 24px; max-width: 860px; font-size: 16px; line-height: 1.75; color: #F5D4D6; }
.article h2 { margin: 34px 0 10px; font: 700 28px var(--heading); color: #fff; }
.article h3 { margin: 26px 0 8px; font: 700 21px var(--heading); color: #fff; }
.article h4 { margin: 18px 0 6px; font-size: 16px; color: #fff; }
.article h2:first-child, .article h3:first-child { margin-top: 0; }
.article p { margin: 10px 0; }
.article ul, .article ol { margin: 10px 0 10px 4px; padding-left: 24px; }
.article li { margin: 6px 0; padding-left: 4px; }
.article ol li::marker { font-weight: 700; color: var(--blue-2); }
.article ul li::marker { color: var(--blue); }
.article strong { color: #fff; }
.article code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: #1A1212; font: 500 0.88em var(--mono); color: #FFA9AF; }
.article a { color: var(--blue-2); text-underline-offset: 3px; }
.article hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.article .callout { margin: 16px 0; padding: 14px 18px; border: 1px solid var(--line-2); border-left: 4px solid var(--blue); border-radius: 10px; background: rgba(255, 30, 46, 0.09); }
.article .callout.important { border-color: rgba(255, 197, 61, 0.35); border-left-color: var(--yellow); background: rgba(255, 197, 61, 0.08); }
.article .table { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article th { padding: 11px 14px; background: var(--card-2); text-align: left; font-size: 12px; letter-spacing: 0.5px; color: var(--blue-2); text-transform: uppercase; white-space: nowrap; }
.article td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.article tr:nth-child(even) td { background: rgba(40, 28, 29, 0.45); }

@media (max-width: 1100px) {
    .layout { grid-template-columns: 260px minmax(0, 1fr); }
    .toc { display: none; }
}

@media (max-width: 760px) {
    .top { gap: 10px; padding: 0 16px; }
    .brand b { font-size: 18px; }
    .brand small { display: none; }
    .tabs a { padding: 8px 12px; font-size: 13px; }
    .menu-btn { display: block; }
    .layout { grid-template-columns: minmax(0, 1fr); }
    .side { display: none; position: fixed; inset: 70px 0 0; z-index: 9; height: auto; padding: 16px; border: 0; background: var(--bg); }
    .side.open { display: block; }
    .content { padding: 26px 16px 70px; }
    h1.title { font-size: 34px; }
    .article { font-size: 15px; }
    .pager { grid-template-columns: 1fr; }
    .pager .next { grid-column: 1; }
}

.article .wiki-link { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Bare de derulare în tema site-ului */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 8px; background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--blue-2, #FF5B67); }
