/* =============================================================================
   VoidCrawler 2.2.1
   DarkMatter Command Interface
   Release Theme
============================================================================= */

:root {
    color-scheme: dark;

    --void: #020304;
    --panel: #090b0e;
    --panel2: #050608;

    --red: #d10b18;
    --hot: #ff2638;
    --deep: #5b0008;

    --steel: #c8ccd1;
    --text: #e5e7ea;
    --muted: #8c939b;

    --line: rgba(209, 11, 24, 0.38);
    --radius: 10px;

    --shadow: 0 24px 70px rgba(0, 0, 0, 0.78);
}


/* =============================================================================
   GLOBAL
============================================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--void);
    scrollbar-color: var(--deep) #050607;
    scrollbar-width: thin;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;

    color: var(--text);

    font: 18px/1.55 'Oswald', sans-serif;
    letter-spacing: 0.035em;

    background:
        radial-gradient(
            circle at 50% -15%,
            rgba(209, 11, 24, 0.15),
            transparent 35rem
        ),
        linear-gradient(
            180deg,
            #020304 0%,
            #060709 52%,
            #010203 100%
        );
}

body::before {
    content: "";

    position: fixed;
    inset: 0;
    z-index: -1;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        );

    background-size: 48px 48px;
}

body::after {
    content: "";

    position: fixed;
    inset: 0;
    z-index: 50;

    pointer-events: none;
    opacity: 0.15;

    background:
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 3px,
            rgba(255, 255, 255, 0.018) 4px
        );
}

a {
    transition: 0.16s ease;
}

a:focus-visible {
    outline: 2px solid var(--hot);
    outline-offset: 4px;
}

::selection {
    color: #ffffff;
    background: var(--deep);
}


/* =============================================================================
   SYSTEM WRAPPER
============================================================================= */

.system-wrapper {
    position: relative;
    isolation: isolate;

    min-height: 100vh;
    padding: 34px 0 42px;
}

.system-wrapper::before {
    content: "";

    position: absolute;
    inset: 18px;
    z-index: -1;

    pointer-events: none;

    border: 1px solid rgba(209, 11, 24, 0.24);

    clip-path:
        polygon(
            0 22px,
            22px 0,
            calc(100% - 22px) 0,
            100% 22px,
            100% calc(100% - 22px),
            calc(100% - 22px) 100%,
            22px 100%,
            0 calc(100% - 22px)
        );

    box-shadow:
        inset 0 0 36px rgba(209, 11, 24, 0.04),
        0 0 24px #000000;
}

.system-wrapper::after {
    content: "VOIDCRAWLER // DIRECTORY INTELLIGENCE NODE";

    position: absolute;
    top: 9px;
    left: 50%;
    z-index: 1;

    padding: 0 14px;

    transform: translateX(-50%);

    color: rgba(200, 204, 209, 0.46);
    background: var(--void);

    font: 9px 'Orbitron', sans-serif;
    letter-spacing: 0.22em;
    white-space: nowrap;
}

.container {
    position: relative;
    z-index: 2;

    width: min(1180px, calc(100% - 48px));
    max-width: none;

    margin: auto;
    padding: 0;
}


/* =============================================================================
   HERO
============================================================================= */

.hero {
    position: relative;

    min-height: 410px;
    margin: 0 0 28px;

    overflow: hidden;

    border: 1px solid rgba(255, 38, 56, 0.56);
    border-radius: var(--radius);

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.86),
            rgba(0, 0, 0, 0.12) 48%,
            rgba(0, 0, 0, 0.72)
        ),
        url('/assets/images/ogimage.png') center / cover no-repeat;

    box-shadow:
        var(--shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 0 34px rgba(209, 11, 24, 0.18);
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02),
            rgba(0, 0, 0, 0.20) 58%,
            #050608 100%
        ),
        radial-gradient(
            circle at center,
            transparent,
            rgba(0, 0, 0, 0.68)
        );
}

.hero::after {
    content: "";

    position: absolute;
    inset: 12px;
    z-index: 2;

    pointer-events: none;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;

    box-shadow:
        inset 0 0 0 1px rgba(209, 11, 24, 0.14),
        inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.hero-overlay {
    position: relative;
    z-index: 3;

    display: flex;
    min-height: 410px;

    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    padding: 46px 32px 42px;

    text-align: center;
}

.hero-kicker {
    margin: 0 0 8px;

    color: var(--hot);

    font: 900 10px 'Orbitron', sans-serif;
    letter-spacing: 0.38em;
    text-transform: uppercase;

    text-shadow:
        0 0 12px rgba(255, 38, 56, 0.65);
}

.hero-title {
    margin: 0;

    color: #f2f2f2;

    font:
        900 clamp(42px, 7vw, 82px) / 0.95
        'Orbitron',
        sans-serif;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    text-shadow:
        0 3px 0 #510007,
        0 0 11px rgba(255, 255, 255, 0.16),
        0 0 27px rgba(209, 11, 24, 0.56);
}

.hero-title span {
    color: var(--hot);
}

.hero-subtitle {
    max-width: 760px;
    margin: 18px 0 0;

    color: #c7cbd0;

    font-size: clamp(15px, 2vw, 19px);
    letter-spacing: 0.12em;
    text-transform: uppercase;

    text-shadow:
        0 2px 8px #000000;
}

.hero-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;
    margin-top: 20px;
}

.status-chip {
    padding: 7px 11px;

    border: 1px solid rgba(255, 38, 56, 0.34);
    border-radius: 3px;

    color: #aeb3b9;
    background: rgba(0, 0, 0, 0.66);

    font: 9px 'Orbitron', sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    box-shadow:
        inset 0 0 12px rgba(209, 11, 24, 0.08);
}

.status-chip strong {
    color: var(--hot);
}


.version-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.version-selector label {
    color: var(--muted);
    font: 900 9px 'Orbitron', sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.version-selector select {
    min-height: 34px;
    padding: 6px 34px 6px 11px;

    border: 1px solid rgba(255, 38, 56, 0.34);
    border-radius: 3px;

    color: #c7cbd0;
    background: #050608;

    font: 10px 'Roboto Mono', monospace;
    letter-spacing: 0.06em;

    cursor: pointer;
}

.version-selector select:hover,
.version-selector select:focus {
    border-color: var(--hot);
    outline: none;

    color: #ffffff;

    box-shadow:
        0 0 12px rgba(255, 38, 56, 0.18);
}


/* =============================================================================
   DIRECTORY CONSOLE
============================================================================= */

.directory-console {
    position: relative;

    padding: 14px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--radius);

    background: rgba(3, 4, 6, 0.90);

    box-shadow: var(--shadow);
}

.directory-console::before {
    content: "";

    position: absolute;
    top: -1px;
    left: 34px;

    width: 130px;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--hot),
            transparent
        );

    box-shadow:
        0 0 14px var(--hot);
}

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
    padding: 12px 14px 18px;
}

.console-title {
    margin: 0;

    color: #d9dce0;

    font: 900 14px 'Orbitron', sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.console-title::before {
    content: "◆";

    margin-right: 10px;

    color: var(--hot);

    font-size: 10px;

    text-shadow:
        0 0 9px var(--red);
}

.console-state {
    color: var(--muted);

    font: 11px 'Roboto Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.console-state::before {
    content: "";

    display: inline-block;

    width: 7px;
    height: 7px;
    margin-right: 8px;

    border-radius: 50%;

    background: var(--hot);

    box-shadow:
        0 0 9px var(--hot);

    animation:
        pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}


/* =============================================================================
   DIRECTORY PANELS
============================================================================= */

.top-level-files,
.sub-directories {
    position: relative;

    margin: 0 0 14px;
    padding: 22px;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 7px;

    background:
        linear-gradient(
            120deg,
            rgba(209, 11, 24, 0.055),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #0f1114,
            #060709
        );

    font-family:
        'Roboto Mono',
        'Courier New',
        monospace;

    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.025),
        inset 0 0 35px rgba(0, 0, 0, 0.34),
        0 8px 24px rgba(0, 0, 0, 0.28);
}

.top-level-files:last-child,
.sub-directories:last-child {
    margin-bottom: 0;
}

.top-level-files::before,
.sub-directories::before {
    content: "";

    position: absolute;
    inset: 0 auto 0 0;

    width: 3px;

    background:
        linear-gradient(
            transparent,
            var(--red),
            transparent
        );

    box-shadow:
        0 0 10px rgba(209, 11, 24, 0.48);
}

.top-level-files h4,
.sub-directories h4 {
    display: flex;
    align-items: center;

    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 12px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);

    color: var(--steel);

    font: 900 13px 'Orbitron', sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sub-directories h4::before {
    content: "DIR";
}

.top-level-files h4::before {
    content: "GET";
}

.top-level-files h4::before,
.sub-directories h4::before {
    display: inline-grid;
    min-width: 36px;
    height: 22px;

    place-items: center;

    border: 1px solid rgba(255, 38, 56, 0.72);
    border-radius: 2px;

    color: var(--hot);
    background: rgba(209, 11, 24, 0.10);

    font: 9px monospace;
    letter-spacing: 0.06em;
}


/* =============================================================================
   DIRECTORY LISTS
============================================================================= */

ul,
ol {
    margin: 0;
}

ul.list-unstyled,
.top-level-files ul,
.sub-directories ul,
.collapse > ul {
    padding-left: 0;
    list-style: none;
}

li {
    position: relative;
    margin: 5px 0;
}

.collapse > ul {
    margin: 6px 0 8px 17px;
    padding: 7px 0 5px 14px;

    border-left:
        1px solid rgba(209, 11, 24, 0.24);
}


/* =============================================================================
   FOLDERS
============================================================================= */

.folder {
    display: flex;
    min-height: 38px;

    align-items: center;

    padding: 8px 12px;

    border: 1px solid transparent;
    border-radius: 4px;

    color: #e0e2e5;

    font-weight: 700;
    text-decoration: none !important;

    word-break: break-word;
}

.folder::before {
    content: "▸";

    flex: 0 0 auto;

    margin-right: 10px;

    color: var(--hot);

    font-size: 14px;

    text-shadow:
        0 0 8px rgba(255, 38, 56, 0.64);

    transition:
        transform 0.18s ease;
}

.folder[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.folder::after {
    content: "DIRECTORY";

    margin-left: auto;
    padding-left: 14px;

    color: rgba(146, 152, 159, 0.48);

    font: 9px monospace;
    letter-spacing: 0.12em;
}

.folder:hover {
    border-color:
        rgba(255, 38, 56, 0.23);

    color: #ffffff;
    background: rgba(21, 8, 10, 0.97);

    box-shadow:
        inset 3px 0 var(--red);

    transform: translateX(2px);
}


/* =============================================================================
   FILE LINKS
============================================================================= */

.file-link {
    display: flex;
    min-height: 36px;

    align-items: center;

    padding: 7px 12px;

    border: 1px solid transparent;
    border-radius: 4px;

    color: var(--hot);
}

.file-link:hover {
    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        rgba(255, 255, 255, 0.025);
}

.file-link a {
    color: #b9bec4;

    text-decoration: none !important;
    word-break: break-word;
}

.file-link a:hover {
    color: #ffffff;

    text-shadow:
        0 0 9px rgba(255, 38, 56, 0.34);
}

.file-link a::after {
    content: "  ↗";

    color:
        rgba(255, 38, 56, 0.66);
}

pre {
    margin: 0;

    color: var(--hot);

    font-family:
        'Roboto Mono',
        monospace;

    white-space: pre-wrap !important;
    word-break: break-word !important;
}


/* =============================================================================
   FOOTER
============================================================================= */

footer {
    width: min(1180px, calc(100% - 48px));

    margin: 26px auto 0;
    padding: 17px 20px;

    border-top:
        1px solid rgba(209, 11, 24, 0.25);

    text-align: center;
}

footer a {
    color: #777e85;

    font: 10px 'Orbitron', sans-serif;
    font-style: normal;

    letter-spacing: 0.20em;
    text-decoration: none !important;
    text-transform: uppercase;
}

footer a:hover {
    color: var(--hot);

    text-shadow:
        0 0 12px rgba(255, 38, 56, 0.45);
}


/* =============================================================================
   MOBILE
============================================================================= */

@media (max-width: 768px) {

    body {
        font-size: 16px;
    }

    .system-wrapper {
        padding: 20px 0 28px;
    }

    .system-wrapper::before {
        inset: 8px;
    }

    .system-wrapper::after {
        display: none;
    }

    .container,
    footer {
        width: min(100% - 24px, 1180px);
    }

    .hero,
    .hero-overlay {
        min-height: 300px;
    }

    .hero-overlay {
        padding: 34px 18px 28px;
    }

    .hero-title {
        font-size: clamp(34px, 12vw, 54px);
    }

    .hero-subtitle {
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .status-chip:nth-child(n + 3) {
        display: none;
    }

    .directory-console {
        padding: 8px;
    }

    .console-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 5px;
        padding: 11px 10px 14px;
    }

    .top-level-files,
    .sub-directories {
        padding: 16px 12px;
    }

    .folder::after {
        display: none;
    }

    .folder,
    .file-link {
        padding-right: 8px;
        padding-left: 8px;
    }

    .collapse > ul {
        margin-left: 9px;
        padding-left: 9px;
    }
}


/* =============================================================================
   REDUCED MOTION
============================================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}