/* =====================================================
   AKANEBOOK NAV // Hybrid archive and control deck
   ===================================================== */
:root {
    --sidebar-width-open: 320px;
    --deck-cyan: #23f4ff;
    --deck-magenta: #ff2bd6;
    --deck-violet: #8b4dff;
    --deck-mint: #72ffd4;
    --deck-ink: #08060d;
}

.cg-sidebar {
    counter-reset: nav-file;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100090;
    box-sizing: border-box;
    width: var(--sidebar-width-open);
    height: 100dvh;
    display: block;
    padding: 0 0 max(16px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(255, 43, 214, 0.08), transparent 32%, rgba(35, 244, 255, 0.035)),
        linear-gradient(rgba(139, 77, 255, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 77, 255, 0.09) 1px, transparent 1px),
        #090711;
    background-size: auto, 20px 20px, 20px 20px, auto;
    border: 0;
    border-right: 2px solid var(--deck-cyan);
    border-radius: 0;
    box-shadow: 10px 0 0 rgba(0, 0, 0, 0.72), 18px 0 34px rgba(10, 0, 22, 0.7);
    scrollbar-color: var(--deck-violet) #07050c;
    scrollbar-width: thin;
}

.cg-sidebar::before {
    content: "";
    position: absolute;
    inset: 0 7px 0 auto;
    width: 1px;
    background: linear-gradient(transparent, var(--deck-magenta) 12%, var(--deck-violet) 48%, var(--deck-cyan) 84%, transparent);
    box-shadow: 0 0 10px rgba(255, 43, 214, 0.45);
    pointer-events: none;
}

.cg-sidebar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(var(--deck-magenta), transparent 28%, transparent 72%, var(--deck-violet));
    opacity: 0.58;
    pointer-events: none;
}

.cg-sidebar-header {
    position: relative;
    box-sizing: border-box;
    min-height: 174px;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 10px;
    margin: 0;
    padding: 24px 24px 14px;
    overflow: hidden;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 43, 214, 0.16), transparent 42%),
        linear-gradient(110deg, rgba(139, 77, 255, 0.22), transparent 52%);
    border: 0;
    border-bottom: 1px solid rgba(35, 244, 255, 0.45);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.38);
}

.cg-sidebar-header::before {
    content: "AKANEBOOK_NAV";
    display: block;
    order: -2;
    padding: 5px 8px 4px;
    color: #16031c;
    background: #fff;
    border: 2px solid var(--deck-violet);
    box-shadow: 3px 3px 0 var(--deck-magenta);
    font-family: var(--font-terminal);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.cg-sidebar-header::after {
    content: "C:/Users/Akane/Desktop/CheatGuys/";
    display: block;
    width: min(230px, 100%);
    padding: 6px 8px;
    overflow: hidden;
    color: var(--deck-mint);
    background: rgba(3, 8, 12, 0.78);
    border: 1px dashed rgba(114, 255, 212, 0.6);
    font-family: var(--font-terminal);
    font-size: 11px;
    line-height: 1;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cg-sidebar-brand-logo {
    order: -1;
    display: block;
    width: min(158px, 100%);
    height: auto;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 10px rgba(255, 43, 214, 0.6));
}

.cg-sidebar-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 100120;
    box-sizing: border-box;
    width: 50px;
    height: 50px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    color: var(--deck-violet);
    background: #0a0711;
    border: 2px solid var(--deck-magenta);
    border-radius: 2px;
    box-shadow: 5px 5px 0 #000, 0 0 13px rgba(255, 43, 214, 0.34);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.cg-sidebar-toggle span {
    width: 24px;
    height: 3px;
    background: currentColor;
    box-shadow: none;
    transition: transform 180ms ease, opacity 120ms ease;
}

.cg-sidebar-toggle:hover,
.cg-sidebar-toggle:focus-visible,
.cg-sidebar-toggle.is-open {
    color: #fff;
    background: var(--deck-magenta);
    border-color: #fff;
    outline: none;
    box-shadow: 5px 5px 0 #000, 0 0 18px rgba(255, 43, 214, 0.48);
    transform: none;
}

.cg-sidebar-toggle:hover span,
.cg-sidebar-toggle:focus-visible span,
.cg-sidebar-toggle.is-open span {
    background: #fff;
    box-shadow: none;
}

.cg-sidebar-toggle.is-open span:nth-child(1) {
    opacity: 1;
    transform: translateY(9px) rotate(45deg);
}

.cg-sidebar-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.cg-sidebar-toggle.is-open span:nth-child(3) {
    opacity: 1;
    transform: translateY(-9px) rotate(-45deg);
}

.cg-sidebar-section {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: block;
    margin: 0;
    padding: 19px 8px 8px 0;
    border: 0;
}

.cg-sidebar-section-title {
    position: relative;
    z-index: 2;
    width: max-content;
    display: block;
    margin: 0 0 7px 18px;
    padding: 4px 7px 3px;
    color: #17031e;
    background: #fff;
    border: 2px solid var(--deck-violet);
    box-shadow: 3px 3px 0 var(--deck-magenta);
    font-family: var(--font-terminal);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.cg-sidebar-section-title::before {
    margin-right: 5px;
    color: #17031e;
}

.cg-sidebar-navigation .cg-sidebar-section-title::before { content: "01 //"; }
.cg-sidebar-media .cg-sidebar-section-title::before { content: "02 //"; }
.cg-sidebar-system .cg-sidebar-section-title::before { content: "03 //"; }

.cg-sidebar-section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 7px);
    width: 210px;
    height: 1px;
    background: linear-gradient(90deg, var(--deck-magenta), transparent 75%);
    pointer-events: none;
}

.cg-sidebar-navigation {
    padding-top: 17px;
}

.cg-sidebar-link {
    counter-increment: nav-file;
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 20px);
    min-height: 58px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0 10px 6px;
    padding: 7px 12px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(105deg, rgba(139, 77, 255, 0.14), transparent 32%),
        rgba(10, 7, 16, 0.88);
    border: 1px solid rgba(216, 178, 255, 0.42);
    border-radius: 4px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.62);
    text-decoration: none;
    transform: none;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, translate 150ms ease;
}

.cg-sidebar-link::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    height: auto;
    background: var(--deck-violet);
    box-shadow: none;
    opacity: 0.78;
    transform: none;
}

.cg-sidebar-link::after {
    content: "0" counter(nav-file);
    position: absolute;
    top: 8px;
    right: 9px;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    color: rgba(255, 255, 255, 0.3);
    background: none;
    box-shadow: none;
    font-family: var(--font-terminal);
    font-size: 10px;
}

.cg-sidebar-link:hover,
.cg-sidebar-link:focus-visible {
    color: #fff;
    background: rgba(139, 77, 255, 0.2);
    border-color: var(--deck-cyan);
    outline: none;
    box-shadow: 4px 4px 0 rgba(255, 43, 214, 0.5);
    transform: none;
    translate: 3px 0;
}

.cg-sidebar-link.active {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(139, 77, 255, 0.34), rgba(255, 43, 214, 0.12)),
        #0d0917;
    border-color: var(--deck-violet);
    box-shadow: 0 5px 0 var(--deck-magenta), 5px 5px 0 rgba(0, 0, 0, 0.74);
    transform: none;
}

.cg-sidebar-link.active::before {
    width: 6px;
    background: var(--deck-magenta);
    box-shadow: 0 0 12px rgba(255, 43, 214, 0.72);
    opacity: 1;
}

.cg-sidebar-link.active::after {
    color: var(--deck-cyan);
    background: var(--deck-magenta);
    padding: 1px 4px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
}

.cg-sidebar-icon {
    --icon-bg: transparent;
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    color: var(--deck-violet);
    background: rgba(139, 77, 255, 0.2);
    border: 2px solid rgba(216, 178, 255, 0.82);
    border-radius: 3px;
    box-shadow: 3px 3px 0 rgba(139, 77, 255, 0.48);
    filter: none;
}

.cg-sidebar-link.active .cg-sidebar-icon,
.cg-sidebar-link:hover .cg-sidebar-icon,
.cg-sidebar-link:focus-visible .cg-sidebar-icon {
    background: var(--deck-cyan);
    border-color: #fff;
    box-shadow: 3px 3px 0 var(--deck-magenta);
    filter: none;
    animation: none;
}

.cg-sidebar-label {
    min-width: 0;
    padding-top: 12px;
    font-family: var(--font-terminal);
    font-size: 17px;
    line-height: 1.05;
    letter-spacing: 0;
    text-align: left;
}

.cg-sidebar-label::before {
    position: absolute;
    top: 7px;
    display: block;
    color: var(--deck-mint);
    font-family: var(--font-terminal);
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
}

.cg-sidebar-link:nth-of-type(1) .cg-sidebar-label::before { content: "FILE_01.EXE"; }
.cg-sidebar-link:nth-of-type(2) .cg-sidebar-label::before { content: "FILE_02.EXE"; }
.cg-sidebar-link:nth-of-type(3) .cg-sidebar-label::before { content: "FILE_03.EXE"; }
.cg-sidebar-link:nth-of-type(4) .cg-sidebar-label::before { content: "FILE_04.EXE"; }
.cg-sidebar-link:nth-of-type(5) .cg-sidebar-label::before { content: "FILE_05.EXE"; }
.cg-sidebar-link:nth-of-type(6) .cg-sidebar-label::before { content: "FILE_06.EXE"; }

.cg-sidebar-media,
.cg-sidebar-system {
    display: block;
}

.cg-sidebar-audio {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 28px);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
        "radio radio"
        "state state"
        "button label"
        "button slider";
    align-items: center;
    gap: 4px 11px;
    margin: 0 14px 8px;
    padding: 8px;
    color: #fff;
    background: rgba(11, 7, 17, 0.9);
    border: 1px solid var(--deck-magenta);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(139, 77, 255, 0.18), 4px 4px 0 rgba(0, 0, 0, 0.58);
}

.cg-sidebar-audio::before,
.cg-sidebar-audio::after {
    display: none;
}

.cg-radio-panel-btn {
    grid-area: radio;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    color: #fff;
    background: linear-gradient(90deg, rgba(35, 244, 255, 0.14), rgba(139, 77, 255, 0.13));
    border: 1px solid rgba(35, 244, 255, 0.55);
    border-radius: 2px;
    box-shadow: inset 3px 0 0 var(--deck-cyan);
    font-family: var(--font-pixel);
    font-size: 9px;
    line-height: 1;
    text-align: left;
    transform: none;
}

.cg-radio-panel-btn::before {
    content: "III";
    color: var(--cg-radio-accent, var(--deck-cyan));
    font-family: var(--font-terminal);
    font-size: 13px;
}

.cg-radio-panel-btn::after {
    content: "OPEN";
    color: rgba(255, 255, 255, 0.46);
    font-family: var(--font-terminal);
    font-size: 10px;
}

.cg-radio-panel-btn:hover,
.cg-radio-panel-btn:focus-visible,
.cg-radio-panel-btn.is-active {
    color: #fff;
    background: linear-gradient(90deg, color-mix(in srgb, var(--cg-radio-accent, var(--deck-cyan)) 24%, #090710), #100a1c);
    border-color: var(--cg-radio-accent, var(--deck-cyan));
    outline: none;
    box-shadow: inset 4px 0 0 var(--cg-radio-accent, var(--deck-cyan)), 0 0 11px color-mix(in srgb, var(--cg-radio-accent, var(--deck-cyan)) 22%, transparent);
    transform: none;
}

.cg-radio-panel-state {
    grid-area: state;
    width: 100%;
    padding: 0 2px;
    color: var(--cg-radio-accent, var(--deck-mint));
    font-family: var(--font-terminal);
    font-size: 11px;
    line-height: 1;
    text-align: left;
}

.cg-audio-toggle {
    grid-area: button;
    width: 46px;
    height: 44px;
    min-width: 46px;
    padding: 0;
    color: #fff;
    background: #0b0810;
    border: 1px solid rgba(216, 178, 255, 0.45);
    border-radius: 2px;
    box-shadow: inset 0 0 0 3px rgba(139, 77, 255, 0.12);
    font-family: var(--font-terminal);
    font-size: 22px;
    text-shadow: none;
}

.cg-audio-toggle::before {
    display: none;
}

.cg-audio-toggle:hover,
.cg-audio-toggle:focus-visible {
    color: #07050c;
    background: var(--deck-mint);
    border-color: #fff;
    outline: none;
    box-shadow: 3px 3px 0 var(--deck-violet);
    transform: none;
}

.cg-audio-slider-label {
    grid-area: label;
    justify-self: stretch;
    padding: 0;
    color: rgba(255, 255, 255, 0.62);
    background: none;
    border: 0;
    box-shadow: none;
    font-family: var(--font-terminal);
    font-size: 10px;
    line-height: 1;
}

.cg-audio-slider-label::after {
    content: " // MASTER";
    color: var(--deck-violet);
}

#pageVolumeSlider {
    grid-area: slider;
    width: 100%;
    height: 18px;
    accent-color: var(--deck-magenta);
    filter: none;
}

.cg-sidebar-system {
    padding-bottom: 18px;
}

.cg-sidebar-cmd {
    box-sizing: border-box;
    width: calc(100% - 28px);
    min-height: 50px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0 14px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(7, 12, 13, 0.84);
    border: 1px solid var(--deck-mint);
    border-radius: 3px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.58);
}

.cg-sidebar-cmd::after {
    content: ">";
    color: rgba(114, 255, 212, 0.52);
    font-family: var(--font-terminal);
    font-size: 17px;
}

.cg-sidebar-cmd:hover,
.cg-sidebar-cmd:focus-visible {
    color: #fff;
    background: rgba(114, 255, 212, 0.11);
    border-color: #fff;
    outline: none;
    box-shadow: 4px 4px 0 rgba(114, 255, 212, 0.3);
}

.cg-sidebar-cmd-icon {
    width: 36px;
    height: 34px;
    flex-basis: 36px;
    color: var(--deck-mint);
    background: #07060a;
    border: 1px solid currentColor;
    box-shadow: none;
    font-size: 15px;
}

.cg-sidebar-cmd:hover .cg-sidebar-cmd-icon,
.cg-sidebar-cmd:focus-visible .cg-sidebar-cmd-icon {
    color: #05070a;
    background: var(--deck-mint);
}

.cg-sidebar-cmd-copy {
    gap: 1px;
}

.cg-sidebar-cmd-copy small {
    color: rgba(114, 255, 212, 0.68);
    font-size: 9px;
}

.cg-sidebar-cmd-copy strong {
    font-size: 15px;
}

.cg-sidebar-language {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 28px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin: 9px 14px 0;
    padding: 5px;
    background: rgba(11, 7, 17, 0.9);
    border: 1px solid var(--deck-magenta);
    border-radius: 3px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.58);
}

.cg-sidebar-language::before {
    content: "LANG_SYS";
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.52);
    background: none;
    border: 0;
    box-shadow: none;
    font-family: var(--font-terminal);
    font-size: 9px;
}

.cg-language-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 0;
    background: transparent;
    border: 0;
}

.cg-language-options button {
    min-width: 0;
    min-height: 38px;
    padding: 5px 3px;
    color: rgba(255, 255, 255, 0.72);
    background: #0a0710;
    border: 1px solid rgba(216, 178, 255, 0.55);
    border-radius: 2px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    font-family: var(--font-terminal);
    font-size: 11px;
}

.cg-language-options button:hover,
.cg-language-options button:focus-visible,
.cg-language-options button.is-active {
    color: #07050c;
    background: var(--deck-cyan);
    border-color: #fff;
    outline: none;
    box-shadow: 2px 2px 0 var(--deck-magenta);
}

body.cg-sidebar-open .mitsuki-trigger-container {
    left: calc(var(--sidebar-width-open) + 16px);
    z-index: 100105;
}

@media (max-width: 700px) {
    :root {
        --sidebar-width-open: min(84vw, 320px);
    }

    .cg-sidebar,
    .cg-sidebar.is-open {
        width: var(--sidebar-width-open);
        padding: 0 0 14px;
    }

    .cg-sidebar-header {
        min-height: 168px;
        padding: 22px 18px 12px;
    }

    .cg-sidebar-brand-logo {
        width: 146px;
    }

    .cg-sidebar-header::after {
        width: min(218px, 100%);
    }

    .cg-sidebar-section {
        padding-top: 16px;
    }

    .cg-sidebar-navigation {
        padding-top: 14px;
    }

    .cg-sidebar-link {
        width: calc(100% - 16px);
        min-height: 52px;
        margin-right: 8px;
        margin-left: 8px;
    }

    .cg-sidebar-label {
        font-size: 16px;
    }

    .cg-sidebar-audio,
    .cg-sidebar-cmd,
    .cg-sidebar-language {
        width: calc(100% - 24px);
        margin-right: 12px;
        margin-left: 12px;
    }

    .cg-language-options button {
        min-height: 44px;
    }

    body.cg-sidebar-open .mitsuki-trigger-container {
        right: 4px;
        left: auto;
    }
}

@media (max-height: 920px) {
    .cg-sidebar-header {
        min-height: 156px;
        gap: 4px;
        padding-top: 14px;
        padding-bottom: 8px;
    }

    .cg-sidebar-brand-logo {
        width: 132px;
    }

    .cg-sidebar-section {
        padding-top: 12px;
    }

    .cg-sidebar-navigation {
        padding-top: 10px;
    }

    .cg-sidebar-link {
        min-height: 50px;
        margin-bottom: 3px;
    }
}

@media (max-width: 700px) and (max-height: 920px) {
    .cg-sidebar-header {
        min-height: 146px;
        gap: 3px;
        padding: 8px 16px 6px;
    }

    .cg-sidebar-brand-logo {
        width: 124px;
    }

    .cg-sidebar-section {
        padding-top: 8px;
    }

    .cg-sidebar-navigation {
        padding-top: 8px;
    }

    .cg-sidebar-link {
        min-height: 46px;
        margin-bottom: 1px;
    }

    .cg-sidebar-section-title {
        margin-bottom: 5px;
    }

    .cg-sidebar-audio {
        gap: 3px 10px;
        padding: 6px;
    }
}

@media (max-height: 720px) {
    .cg-sidebar-header {
        min-height: 128px;
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: center;
        gap: 5px 10px;
        padding: 12px 16px;
    }

    .cg-sidebar-brand-logo {
        width: 104px;
        grid-row: 1 / 3;
    }

    .cg-sidebar-header::before,
    .cg-sidebar-header::after {
        width: 100%;
        box-sizing: border-box;
    }

    .cg-sidebar-link {
        min-height: 50px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.cg-sidebar-open .cg-sidebar-link {
        animation: cg-hybrid-file-in 240ms both;
    }

    body.cg-sidebar-open .cg-sidebar-link:nth-of-type(2) { animation-delay: 24ms; }
    body.cg-sidebar-open .cg-sidebar-link:nth-of-type(3) { animation-delay: 48ms; }
    body.cg-sidebar-open .cg-sidebar-link:nth-of-type(4) { animation-delay: 72ms; }
    body.cg-sidebar-open .cg-sidebar-link:nth-of-type(5) { animation-delay: 96ms; }
    body.cg-sidebar-open .cg-sidebar-link:nth-of-type(6) { animation-delay: 120ms; }
}

@media (prefers-reduced-motion: reduce) {
    .cg-sidebar-toggle,
    .cg-sidebar-toggle span,
    .cg-sidebar-link {
        transition: none;
        animation: none;
    }
}

@keyframes cg-hybrid-file-in {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
