/*

2025.css - cool responsive theme for perdach.com website

Fuck Copyright ( C======& ) 2025 PERDUN PERDAKOVICH

*/

html {
    font-size: 18px;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

.panel {
    display: flex;
    justify-content: center;
    top: 0;
    left: -0px;

    height: 44px;
    margin: 0;
    position: sticky;
    width: 100%;
    z-index: 1000;
    overflow: hidden;
    /*
    вроде прикольно, но вообще и так много чёрного

    background: rgb(0, 0, 0);
    */
    background: #151515;
}

.panel>a,
.panel>.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 30px;
    box-sizing: border-box;
    font-weight: 700;
    color: #eee;
    text-decoration: none;
    transition: 0.2s all;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.panel button.icon::-moz-focus-inner {
    border: 0;
    padding: 0;
}

@media(hover: hover) and (pointer: fine) {

    .panel>a:hover,
    .panel>.icon:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #eee;
    }
}




/* DEFINE FONT SIZES (k=1.125) */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.027rem;
}

h2 {
    font-size: 1.802rem;
}

h3 {
    font-size: 1.602rem;
}

h4 {
    font-size: 1.424rem;
}

h5 {
    font-size: 1.266rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    font-size: 1rem;
    line-height: 1.5;
    /* margin-top: 1.25rem; */
    /* margin-bottom: 1.25rem; */
}

.small {
    font-size: 0.889rem;
}

.micro {
    font-size: 0.79rem;
}

/* -------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
}

.centered {
    text-align: center;
}

p {
    font-weight: 450;
}

p.quote {
    font-style: italic;
    font-weight: 400;
    background: repeating-linear-gradient(-45deg,
            #121212,
            #121212 10px,
            #151515 10px,
            #151515 20px);
    /* background-color: #1a1a1a; */
    padding: 10px;
    border-left: lime 3px solid;
}

.page-container {
    position: relative;
    min-height: 100vh;
}

.content-wrap {
    padding-bottom: 5rem;
}



footer {
    margin-top: 2rem;
    background-color: #151515;
    padding: 1rem 0 1rem 0;
    text-align: center;

    position: absolute;
    bottom: 0;
    width: 100%;
}

img {
    border: lime 3px solid;
    padding: 3.5px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.gif {
    width: unset;
    height: unset;
}

.button {
    border: lime 2px solid;
    padding: 2.5px;
}

.logo {
    display: block;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;

    margin-top: 2em;
    margin-bottom: 2em;

    border: 5px solid lime;
    border-radius: 1px;
    padding: 5px;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  */
    transition: transform 0.2s;

    height: auto;
    width: revert-layer;

    box-sizing: border-box;
}

/* p>img {
    margin-bottom: 1rem;
} */

/* .logo:hover {
    transform: scale(1.05);
} */

body {
    /* padding: 0 1em 3.24em; */
    /* max-width: 40em; */
    color: #eee;
    background: #000;

    font-family: "JetBrains Mono", monospace;

}

::-moz-selection {
    color: #000;
    background: lime;
}

::selection {
    color: #000;
    background: lime;
}

pre {
    font-weight: 400;
    background: repeating-linear-gradient(-45deg,
            #121212,
            #121212 10px,
            #151515 10px,
            #151515 20px);
    padding: 15px;

    border-left: lime 3px solid;


    font-family: "JetBrains Mono", monospace;
    /*  font-size: 0.79rem;  font-size: 0.889rem; ??? */
    white-space: pre-wrap;
    word-wrap: break-word;
}

span {
    color: lime;
    transition: 0.1488s all;
    text-underline-offset: 0.2rem;
    align-content: center;
}

a {
    color: #eee;
    transition: 0.1s all;
    text-underline-offset: 0.2rem;
    align-content: center;
}

ul {
    list-style-type: square;
    list-style-position: inside;
    padding-left: 10px;
}

li {
    margin-top: 5px;
    margin-bottom: 5px;
}

li::marker {
    color: lime;
}

@media(hover: hover) and (pointer: fine) {
    a:hover {
        color: lime;
        cursor: pointer;
    }

    span:hover {
        color: lime;
    }
}

div.button_box {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* margin-bottom: 12rem; */
}

a.nogrow {
    flex-grow: 0 !important;
}

a.button {
    border: lime 2px solid;
    background: darkgreen;
    text-decoration: none;
    flex-grow: 1;
    transition: 0.1488s all;
    margin: 3px;
    text-align: center;
}

@media(hover: hover) and (pointer: fine) {
    a.button:hover {
        background: lime;
        color: #000;
    }

    a.buttod_dim:hover {
        background: #4d0029;
        color: #eee;
    }
}

.run_code_block {
    position: relative;
}

.run_span {
    display: flex;
    gap: 10px;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #fff;
    padding: 0;
    margin: 0;
}

.run_span>a {
    padding: 5px 7px;
    margin: 0;
    text-decoration: none;

    width: unset;
    height: unset;
}

textarea {
    color: #eee;
    background: repeating-linear-gradient(-45deg,
            #121212,
            #121212 10px,
            #151515 10px,
            #151515 20px);
    border: lime 3px solid;
    resize: vertical;
    width: 100%;
    min-height: 30vh;
    outline: none;
    padding: 10px;
    box-sizing: border-box;

}

.p_input_button {
    display: flex;
    flex-direction: row;
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 10px;
}

.p_input_button>* {
    padding: 10px;
}

.p_input_button>input {
    flex-grow: 1;
    font-family: 'JetBrains Mono', monospace;
    box-sizing: border-box;
    outline: none;
    border: #444 3px solid;
    background: #121212;
    color: #eee;
    box-sizing: border-box;
}

.p_input_button>button {
    box-sizing: border-box;
    outline: none;
    border: lime 2px solid;
    background: #33001b;
    text-decoration: none;
    transition: 0.1488s all;
    text-align: center;
    color: #eee;
    font-family: 'JetBrains Mono', monospace;
}

@media(hover: hover) and (pointer: fine) {
    .p_input_button>button:hover {
        background: lime;
        color: #000;

    }
}



/* RESPONSIVE FEATURES */



@media (min-width: 0px) and (max-width: 840px) {
    p {
        text-align: left;
        /* overflow-x: scroll; */
    }

    .panel {
        flex-direction: column;
    }

    .panel a:nth-of-type(1) {
        display: block;
        text-align: left;
    }

    .content {
        margin-right: 20px;
        margin-left: 20px;
    }

    .panel>a {
        display: none;
    }

    .panel>.icon {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        height: 44px;
        padding: 12px 30px;
        box-sizing: border-box;
        text-align: center;
        z-index: 10;
        flex-shrink: 0;
    }

    .panel.responsive {
        height: auto;
        position: sticky;
        display: flex;
        flex-direction: column;
    }

    .panel.responsive>a {
        float: none;
        display: block;
        text-align: left;
    }


    .run_span {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
    }

    .run_code_block>pre {
        margin-bottom: 10px !important;
    }

    .logo {
        max-width: 90%;
    }

    #logo {
        max-width: 70%;
    }

    video {
        max-width: 100%;
    }

    img {
        width: 100%;
        /* Force 100% for Zero Leak consistency */
    }
}

@media (min-width: 840px) {
    p {
        /* text-align: justify; */
        text-wrap: balance;
    }

    .content {
        margin-right: auto;
        margin-left: auto;
        max-width: 800px;
    }

    .panel>.icon {
        float: right;
        display: none;
    }
}

/* -------------------- */

.with-button {
    display: flex;
    gap: 15px;
}

.button {

    align-self: center;
    position: relative;
    /* top: 4px; */
    float: right;

    width: 88px;
    height: 31px;

    object-fit: contain;
}

/* скрыть кнопки у заголовков когда места не хватает */
@media(max-width:900px) {
    .gif.button {
        display: none;
    }
}

.spoiler-button-wrapper {
    /* margin-bottom: 2rem; */

    display: inline-flex;
    width: 16rem;
}



/* SPOILERS */
details.spoiler-native,
details.spoiler-qa {
    /* transition: background 0.1s; */
    position: relative;
}

details.spoiler-native summary,
details.spoiler-qa summary {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    user-select: none;
    outline: none;
    padding: 1ch 1rem;
    font-weight: 700;
    /* JetBrains Mono Bold */
}

details.spoiler-native summary::-webkit-details-marker,
details.spoiler-qa summary::-webkit-details-marker {
    display: none;
}

details.spoiler-native summary:focus-visible,
details.spoiler-qa summary:focus-visible {
    background: lime;
    color: #000;
}

@media(hover: hover) and (pointer: fine) {

    details.spoiler-native summary:hover,
    details.spoiler-qa summary:hover {
        background: #111;
        transition: 0.1488s;
    }
}

details[open].spoiler-native,
details[open].spoiler-qa {
    background: #111;
}

details[open].spoiler-native summary,
details[open].spoiler-qa summary {
    position: sticky;
    top: 44px;
    z-index: 10;
    background: #111;
}

/* SHOW ALL / HIDE ALL BUTTON */
.qa-toggle {
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0;
    clear: both;
}

.qa-sep {
    color: #666 !important;
    padding: 0 0.2ch;
    user-select: none;
    pointer-events: none;
}

.qa-toggle button {
    background: #000;
    border: none;
    color: #eee;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    transition: 0.1488s all;
}

.qa-toggle button:hover {
    color: lime;
    text-decoration: none;
}

/* CONTENT ALIGNMENT */
details.spoiler-native .spoiler {
    padding: 0;
    overflow-x: hidden;
}

details.spoiler-qa .spoiler {
    padding: 0ch 1rem 1% calc(1.1rem + 3ch);
}

details.spoiler-native .spoiler p,
details.spoiler-qa .spoiler p {
    margin: 1ch 0 1ch 0;
}

/* экскрементально */
p:has(strong) {
    /* text-align: center; */
    /* color: #151515; */
    background: #151515;
}

.content>*+* {
    margin-top: 1rem;
}

.content>details.spoiler-qa+details.spoiler-qa {
    margin-top: 0;
}

/* spoiler-native TEXT ALIGNMENT */
details.spoiler-native .spoiler p {
    padding-left: calc(1.1rem + 3ch);
    padding-right: calc(1.1rem + 3ch);
}

details.spoiler-native .spoiler img,
details.spoiler-native .spoiler video {
    display: block;
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto;
    margin: 0 0 0 0;
}

/* details.spoiler-native .spoiler p:last-child,
details.spoiler-qa .spoiler p:last-child,
details.spoiler-native .spoiler img:last-child,
details.spoiler-native .spoiler video:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
} */

/* spoiler-qa GUIDE LINE */
details.spoiler-qa[open]::before {
    content: "";
    position: absolute;
    left: calc(1rem + 0.5ch - 1.5px);
    top: 44px;
    bottom: 0;
    width: 3px;
    background: lime;
    z-index: 5;
    pointer-events: none;
}

/* video { */
/* margin-bottom: 1.2rem; */
/* } */

.no-border,
.no-border>img,
.no-border>video,
img.no-border,
video.no-border {
    border: 0px;
}

.no-margin {
    margin-top: 0;
    margin-bottom: 0;
}


hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

section.card {
    min-height: 34rem;
    height: 100vh;
}

.intro-img {
    position: absolute;
    left: 5%;
    z-index: 10;
}

.anchor {
    padding-top: 44px;
    margin-top: -44px;
}