@font-face {
    font-family: 'minecraft_rusregular';
    src: url('minecraft-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #020d26;
    --fg: #fff;
    --accent: #f7ff7f;
    --card: #07163d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    line-height: 1.3;
    background-color: var(--bg);
    color: var(--fg);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'minecraft_rusregular', sans-serif;
}

a { color: inherit; }

.header {
    text-align: center;
    font-size: min(260px, 10vw);
    color: var(--accent);
}
.header a { text-decoration: none; color: inherit; }

.nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0 0;
    font-size: 31px;
}
.nav a { color: var(--fg); text-decoration: none; }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current] { color: var(--accent); }

.logo {
    display: block;
    width: min(512px, 80vw);
    height: auto;
    image-rendering: pixelated;
}

.contacts { text-align: center; padding: 10px 16px 30px; }
.contacts a {
    display: block;
    font-size: 31px;
    color: var(--fg);
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* ---------- страница софта ---------- */
.page { width: min(1500px, 100%); padding: 0 16px 40px; }
.page .header { font-size: min(160px, 16vw); }

.lead {
    text-align: center;
    font-size: 22px;
    opacity: .8;
    margin: 0 0 40px;
}

.soft-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.soft-list > * { min-width: 0; }

.soft {
    background: var(--card);
    border: 3px solid var(--fg);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: center;
}

.soft h2 { margin: 0 0 8px; font-size: 30px; font-weight: normal; color: var(--accent); }
.soft p  {
    margin: 0 0 10px;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: #e8ecff;
}
.soft p.meta { font-size: 14px; color: #aab4e0; margin: 0; }

/* для чего программа: метка под описанием */
.soft p.for { margin: 0 0 10px; }
.soft p.for span { display: inline-block; padding: 2px 10px; font-size: 14px; color: var(--accent); border: 2px solid rgba(247, 255, 127, .3); }

.buttons { display: flex; flex-direction: column; gap: 10px; }

.btn {
    display: block;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    color: var(--bg);
    background: var(--fg);
    border: 3px solid var(--fg);
    box-shadow: 3px 3px 0 #000;
}
.btn.alt { color: var(--fg); background: transparent; }
.btn:hover, .btn:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

footer { text-align: center; padding: 20px; font-size: 16px; opacity: .6; }

@media (max-width: 760px) {
    .soft { grid-template-columns: 1fr; }
    .nav { font-size: 24px; }
}

/* ---------- страница гепла ---------- */
.video-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -5;
    object-fit: cover;
    opacity: 260;
}
@media (prefers-reduced-motion: reduce) { .video-background { display: none; } }

body.gepl { justify-content: flex-start; }
.gepl .page .header { font-size: min(160px, 16vw); }
.gepl .soft-list { gap: 24px; }

.block {
    background: rgba(7, 22, 61, .92);
    border: 3px solid var(--fg);
    padding: 16px 20px;
}
.block h2 { margin: 0 0 10px; font-size: 30px; font-weight: normal; color: var(--accent); }
.block h3 { margin: 0 0 8px; font-size: 22px; font-weight: normal; color: var(--accent); }
.block p, .block li {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: #e8ecff;
}
.block p { margin: 0 0 10px; }
.block ul { margin: 0 0 10px; padding-left: 22px; }
.block .gold { color: var(--accent); font-weight: 600; }
.block .note { color: #aab4e0; font-size: 14px; }

.apples { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.apples figure { margin: 0; text-align: center; }
.apples img {
    width: 160px; height: 160px;
    image-rendering: pixelated;
    border: 3px solid var(--fg);
    background: rgba(0, 0, 0, .5);
}
.apples figcaption { margin-top: 8px; font-size: 20px; color: var(--accent); }

.player { text-align: center; }
.player audio { width: 100%; max-width: 500px; margin: 6px 0 4px; }

.recipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.recipe { border: 3px solid var(--fg); padding: 12px 16px; background: rgba(2, 13, 38, .6); }
.grid3 {
    display: grid; grid-template-columns: repeat(3, 48px); gap: 0;
    margin: 8px 0 12px; width: max-content;
}
.grid3 i {
    width: 48px; height: 48px; display: block;
    background: #8b8b8b url(textures/gold_ingot.png) center / 32px 32px no-repeat;
    border: 2px solid; border-color: #373737 #fff #fff #373737;
    image-rendering: pixelated;
}
.grid3 i.blk { background-image: url(textures/gold_block.png); }
.grid3 i.apl { background-image: url(textures/apple.png); }

.craft { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.craft .grid3 { margin: 0; }
.craft .arrow { font-size: 36px; color: var(--accent); }
.res {
    width: 56px; height: 56px; display: block; position: relative;
    background: #8b8b8b url(textures/golden_apple.png) center / 40px 40px no-repeat;
    border: 2px solid; border-color: #373737 #fff #fff #373737;
    image-rendering: pixelated;
}
/* текстуры версии 1.8.9 */
.v189 .grid3 i { background-image: url(textures/1.8.9/gold_ingot.png); }
.v189 .grid3 i.blk { background-image: url(textures/1.8.9/gold_block.png); }
.v189 .grid3 i.apl { background-image: url(textures/1.8.9/apple.png); }
.v189 .res { background-image: url(textures/1.8.9/golden_apple.png); }
/* блик зачарования (enchanted_item_glint из 1.8.9) поверх иконки */
.res.ench::after {
    content: ''; position: absolute; inset: 0;
    background: url(textures/1.8.9/enchanted_item_glint.png) 0 0 / 160px 160px;
    -webkit-mask: url(textures/1.8.9/golden_apple.png) center / 40px 40px no-repeat;
    mask: url(textures/1.8.9/golden_apple.png) center / 40px 40px no-repeat;
    mix-blend-mode: screen; opacity: .85; image-rendering: pixelated;
    animation: glint 6s linear infinite;
}
@keyframes glint { to { background-position: 160px 80px; } }
@media (prefers-reduced-motion: reduce) { .res.ench::after { animation: none; } }

.effects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.effect { border: 3px solid var(--fg); padding: 12px 16px; background: rgba(2, 13, 38, .6); }
.effect ul { margin: 0; }

.gepl .header, .gepl .nav a, .gepl .lead, .gepl footer { text-shadow: 3px 3px 0 #000, 0 0 12px #000; }
.gepl .lead { opacity: 1; }
.gepl footer { opacity: 1; }

.video-background { filter: brightness(.455); }

.rain {
    position: fixed; top: -80px; width: 48px; height: 48px; z-index: 50;
    image-rendering: pixelated; pointer-events: none;
    animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(115vh) rotate(360deg); } }
#notch img { cursor: pointer; }
#notch img.glow { box-shadow: 0 0 24px 6px #c86bff; }

/* ---------- страница анализа файла ---------- */
.drop {
    display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
    padding: 36px 16px; cursor: pointer;
    border: 3px dashed var(--fg); background: rgba(2, 13, 38, .6);
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: rgba(247, 255, 127, .08); }
.drop-title { font-size: 24px; color: var(--accent); }

.kv, .grid { border-collapse: collapse; width: 100%; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; }
.kv th { text-align: left; white-space: nowrap; padding: 5px 14px 5px 0; vertical-align: top; color: #aab4e0; font-weight: normal; width: 1%; }
.kv td { padding: 5px 0; overflow-wrap: anywhere; }
.grid th, .grid td { text-align: left; padding: 5px 12px; border-bottom: 1px solid rgba(255,255,255,.2); }
.scroll { overflow-x: auto; }
.mono, td.mono { font-family: Consolas, 'Courier New', monospace; font-size: 14px; overflow-wrap: anywhere; }
td.copy { cursor: pointer; }
td.copy:hover { color: var(--accent); }
td.copied { color: #7dff9a; }
.hex {
    margin: 0; padding: 10px; max-height: 340px; overflow: auto;
    font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 1.45; color: #e8ecff;
    background: rgba(0, 0, 0, .45); border: 2px solid rgba(255,255,255,.3);
    white-space: pre; tab-size: 4;
}
#entCanvas { width: 100%; height: auto; border: 2px solid var(--fg); display: block; margin: 8px 0; }
.warn, td.warn { color: #ff8a8a; }
.ok { color: #7dff9a; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; }
.cmp { display: block; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; margin-top: 10px; }
.cmp input {
    display: block; width: 100%; margin-top: 6px; padding: 10px;
    font-family: Consolas, monospace; font-size: 14px; color: #fff;
    background: rgba(0,0,0,.45); border: 2px solid var(--fg);
}
.cmp input:focus { outline: 2px solid var(--accent); }
.effect p { font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; margin: 0 0 12px; color: #e8ecff; }
#results[hidden] { display: none; }

.yara-text { width: 100%; max-height: 360px; resize: vertical; white-space: pre; }
.yara-btns { flex-direction: row; flex-wrap: wrap; margin: 10px 0; }
.yara-btns .btn { cursor: pointer; font-family: inherit; width: auto; min-width: 200px; }
button.btn { font-family: 'minecraft_rusregular', sans-serif; }
.cat { border: 3px solid var(--fg); padding: 10px 14px; margin: 10px 0; background: rgba(2, 13, 38, .6); }
.cat h3 { margin: 0 0 6px; font-size: 20px; }
.cat p { margin: 0 0 6px; }
.cat.sev-high { border-color: #ff6b6b; }
.cat.sev-high h3 { color: #ff8a8a; }
.cat.sev-medium { border-color: #ffb454; }
.cat.sev-medium h3 { color: #ffc27a; }
.cat.sev-low { border-color: #9ad0ff; }
.cat.sev-low h3 { color: #b6dcff; }

/* ---------- сворачиваемые блоки ---------- */
details.block > summary, details.cat > summary, details.hist > summary { cursor: pointer; list-style: none; position: relative; }
details > summary::-webkit-details-marker { display: none; }
details.block > summary { padding-left: 28px; }
details.block > summary h2 { display: inline; margin: 0; }
details.block > summary::before, details.cat > summary::before {
    content: ''; position: absolute; left: 4px; top: 50%; margin-top: -5px;
    border-left: 8px solid var(--accent); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
    transition: transform .1s;
}
details.block[open] > summary::before, details.cat[open] > summary::before { transform: rotate(90deg); }
details.block > .body { margin-top: 12px; }
details.block > summary:hover h2, details.block > summary:focus-visible h2 { color: #fff; }
details.cat > summary { padding-left: 24px; }
details.cat > summary h3 { display: inline; margin: 0; }

details.hist { border: 2px solid rgba(255,255,255,.4); padding: 8px 12px; margin: 8px 0; background: rgba(2,13,38,.6); font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; }
details.hist > summary { overflow-wrap: anywhere; }
details.hist[open] > summary { margin-bottom: 8px; color: var(--accent); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.toolbar .btn { width: auto; padding: 6px 14px; font-size: 16px; cursor: pointer; font-family: 'minecraft_rusregular', sans-serif; }
.chk { display: block; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; margin: 8px 0; cursor: pointer; }
.chk input { margin-right: 8px; accent-color: #f7ff7f; }

.svc-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.svc-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border: 3px solid var(--fg); padding: 10px 14px; background: rgba(2, 13, 38, .6);
}
.svc-list li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.svc-list strong { font-family: 'minecraft_rusregular', sans-serif; font-weight: normal; font-size: 22px; color: var(--accent); }
.svc-list span { font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; }
.svc-list .btn { width: 200px; flex: 0 0 auto; padding: 8px 12px; font-size: 18px; }
@media (max-width: 560px) { .svc-list .btn { width: 100%; } }
.svc-list .btn { font-family: 'minecraft_rusregular', sans-serif; }

.preview { text-align: center; margin-bottom: 12px; }
.preview img, .preview video { max-width: 100%; max-height: 380px; border: 2px solid var(--fg); background: #000; }
.preview audio { width: 100%; max-width: 520px; }

/* ---------- просмотр изображения на весь экран ---------- */
.preview img.zoomable { cursor: zoom-in; }
.preview img.zoomable:hover, .preview img.zoomable:focus-visible { border-color: var(--accent); outline: none; }
.fs-btn { width: auto; display: inline-block; margin-top: 8px; padding: 8px 16px; cursor: pointer; }
html.vw-lock, html.vw-lock body { overflow: hidden; }
.vw { position: fixed; inset: 0; z-index: 1000; background: #020d26; }
.vw[hidden] { display: none; }
.vw-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.vw-stage.grab { cursor: grabbing; }
.vw-img { position: absolute; left: 0; top: 0; max-width: none; max-height: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.vw-bar {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
    padding: 8px 10px; background: rgba(2, 13, 38, .92); border: 3px solid var(--fg); max-width: calc(100% - 24px);
}
.vw-btn {
    font-family: 'minecraft_rusregular', sans-serif; font-size: 18px; color: var(--bg); background: var(--fg);
    border: 3px solid var(--fg); padding: 4px 12px; cursor: pointer; box-shadow: 3px 3px 0 #000; min-width: 44px; min-height: 40px;
}
.vw-btn:hover, .vw-btn:focus-visible { background: var(--accent); border-color: var(--accent); outline: none; }
.vw-zoom { min-width: 64px; text-align: center; font-size: 18px; color: var(--accent); }

/* ---------- загрузка файла в любом месте страницы ---------- */
.drop-all {
    position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
    background: rgba(2, 13, 38, .88); pointer-events: none; padding: 16px;
}
.drop-all[hidden] { display: none; }
.drop-all-box {
    border: 4px dashed var(--accent); padding: 48px 32px; max-width: 760px; width: 100%; text-align: center;
    font-size: 32px; color: var(--accent); background: rgba(247, 255, 127, .08);
}
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100% - 32px); }
.fab[hidden], .fab-st[hidden] { display: none; }
.fab .btn { width: auto; cursor: pointer; box-shadow: 4px 4px 0 #000; }
.fab-st {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 14px; color: #e8ecff;
    background: rgba(2, 13, 38, .92); border: 2px solid var(--fg); padding: 4px 10px;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 760px) { .drop-all-box { font-size: 24px; padding: 32px 16px; } }
.file footer { padding-bottom: 96px; }
.file .page { width: min(1500px, 100%); }
@media (min-width: 1100px) { .file .page { padding-left: 32px; padding-right: 32px; } }

/* компактный список онлайн-сервисов */
.svc-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.svc-list li { border: 0; padding: 0; background: none; display: block; }
.svc-list .btn { width: auto; padding: 5px 14px; font-size: 17px; }
@media (max-width: 560px) { .svc-list .btn { width: auto; } }
@media (min-width: 1100px) { .page { padding-left: 32px; padding-right: 32px; } }

/* строка энтропии секции */
.ebar { display: inline-block; width: 90px; height: 8px; background: rgba(255,255,255,.15); vertical-align: middle; margin-left: 6px; }
.ebar i { display: block; height: 100%; background: #7fd4ff; }
.ebar.hi i { background: #ff8a8a; }

/* красный режим при совпадении правил YARA высокой серьёзности */
.alert-bar { border: 3px solid #ff6b6b; background: rgba(120, 10, 20, .85); color: #fff; padding: 12px 16px; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 16px; }
.alert-bar[hidden] { display: none; }
:root.alert { --bg: #2a0509; --fg: #ffe3e3; --accent: #ff7b7b; --card: #3d0a12; }
.alert .block, .alert .drop, .alert .svc-list .btn.alt { background-color: rgba(61, 10, 18, .92); }
.alert .drop { background: rgba(61, 10, 18, .6); }
.alert .cat { background: rgba(42, 5, 9, .6); }
.alert .hex, .alert textarea.hex { background: #1d0307; }
.alert .btn { color: #2a0509; }
.alert .btn.alt { color: var(--fg); }
.alert .fab-st { background: rgba(42, 5, 9, .92); }

/* выводы по файлу */
.summary { border-width: 4px; }
.sum-verdict { font-size: 26px; margin: 6px 0 10px; }
.sum-list { margin: 0 0 10px; padding-left: 20px; font-family: 'Segoe UI', system-ui, Arial, sans-serif; font-size: 15px; color: #e8ecff; }
.sum-list li { margin: 4px 0; }
.sum-list b { font-family: 'minecraft_rusregular', sans-serif; font-weight: normal; margin-right: 4px; text-transform: uppercase; }
.sum-high { border-color: #ff6b6b; } .sum-high .sum-verdict, .sum-list li.sum-high b { color: #ff8a8a; }
.sum-medium { border-color: #ffb454; } .sum-medium .sum-verdict, .sum-list li.sum-medium b { color: #ffc27a; }
.sum-low { border-color: #9ad0ff; } .sum-low .sum-verdict, .sum-list li.sum-low b { color: #9ad0ff; }
.sum-ok { border-color: #7fe08a; } .sum-ok .sum-verdict, .sum-list li.sum-ok b { color: #9cf0a5; }

/* упаковщики, дизассемблер */
.dp-list{margin:6px 0 0;padding-left:20px}
.dp-list li{margin:4px 0}
.dis-ctl{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:8px 0}
.dis-ctl input,.dis-ctl select{font:inherit;color:inherit;background:var(--card,#06163a);border:1px solid rgba(255,255,255,.25);border-radius:6px;padding:6px 8px}
.dis-ctl input{width:130px}

/* страница gepl: прежняя ширина */

.login-link { position: absolute; top: 14px; left: 18px; font-size: 22px; color: var(--fg); text-decoration: none; opacity: .75; z-index: 2; }
.login-link:hover, .login-link:focus-visible { color: var(--accent); opacity: 1; }
