/* Oldal-CSS-ek ne írják felül a html/body/:root szabályokat – a saját stílusukat a saját konténerükre (pl. #meoo) szűkítsék. */

:root {
    --c-bg:          #060d14;
    --c-bg2:         #07121d;
    --c-bg3:         #0b1a28;
    --c-surface:     rgba(8, 20, 32, 0.88);
    --c-surface2:    rgba(47, 51, 64, 0.92);
    --c-card:        rgba(4, 12, 22, 0.86);
    --c-panel:       rgba(0, 0, 0, 0.36);
    --c-input:       rgba(4, 14, 26, 0.92);
    --c-border:      rgba(255, 255, 255, 0.10);
    --c-border-dim:  rgba(0, 173, 238, 0.16);
    --c-border-cyan: rgba(0, 173, 238, 0.30);
    --c-cyan:        #00adee;
    --c-cyan-rgb:    0, 173, 238;
    --c-cyan-hi:     #33c4f2;
    --c-cyan-dim:    rgba(0, 173, 238, 0.15);
    --c-glow:        rgba(0, 173, 238, 0.28);
    --c-glow-strong: rgba(0, 173, 238, 0.50);
    --c-text:        #cce4f0;
    --c-text-hi:     #e0f4ff;
    --c-text-dim:    #8fb8cc;
    --c-muted:       #7a9aaa;
    --c-success:     #3ddc84;
    --c-warn:        #fbbf24;
    --c-error:       #e74c3c;
    --c-error-rgb:   231, 76, 60;
    --c-danger:      #f87171;
    --c-gold:        #ffd700;

    --f-display:     'Orbitron', 'Segoe UI', sans-serif;
    --f-body:        'Rajdhani', 'Segoe UI', system-ui, sans-serif;
    --f-logo:        'Audiowide', 'Orbitron', sans-serif;
    --f-serif:       'Rajdhani', Georgia, serif;
    --f-mono:        ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;

    --gap-sm:        8px;
    --gap-md:        20px;
    --gap-lg:        40px;

    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --trans-fast:    all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --trans:         all 0.30s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow:    all 1.2s ease;

    --r-sm:          8px;
    --r-md:          15px;
    --r-lg:          25px;

    --line-cyan:     linear-gradient(to right, transparent, rgba(0,173,238,0.55) 40%, rgba(0,173,238,0.85));
    --line-cyan-rev: linear-gradient(to left,  transparent, rgba(0,173,238,0.55) 40%, rgba(0,173,238,0.85));
    --line-glow:     linear-gradient(to right, transparent, rgba(0,173,238,.45) 40%, rgba(0,173,238,.85) 50%, rgba(0,173,238,.45) 60%, transparent);

    scroll-behavior: smooth;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* FONTOS: a body NE kapjon fix height:100%-ot (csak min-height-ot). */
html {
    height: 100%;
}

body {
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image: url("/img/bg.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(3, 8, 14, 0.62) 0%, rgba(3, 8, 14, 0.72) 45%, rgba(3, 8, 14, 0.82) 100%);
}

body > *:not(header) { position: relative; z-index: 1; }

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, video { max-width: 100%; }

:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.sx-skip-link { position: fixed; top: -80px; left: 12px; z-index: 100000; padding: 10px 16px; border-radius: 8px; background: var(--c-cyan); color: #04222a; font-weight: 700; text-decoration: none; }
.sx-skip-link:focus { top: 12px; }
#sx-main:focus { outline: none; }

::selection { background: rgba(0, 173, 238, 0.35); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: #3a5870 #06080d; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: linear-gradient(180deg, #0a0e16, #06080d); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a5870, #223447);
    border-radius: 6px;
    border: 1px solid rgba(120, 160, 190, 0.25);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #4b6a85, #2b425a); }

/* MathJax-képlet (techs, exp, buildings): a fordításban hosszabb képlet ne lógjon ki a dobozból */
mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }

@media (prefers-reduced-motion: reduce) {
    :root { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
