:root {
    --grad-main: linear-gradient(135deg, #4a0090, #880083);
    --border-main: rgb(147, 0, 205);
    --inner-bg: linear-gradient(135deg, #36005f, #5a0056);
    --border-light: rgb(190, 120, 255);
}


body {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* background-color: #1F1F1F; */
    font-family: Arial, sans-serif;
    padding-bottom: 20vh;
}

.number-input {
    border-radius: 10px;
    border: 2px solid #555555;
    background: #2B2B2B;
    color: #E0E0E0;
    font-size: 16px;
    width: 160px;
    text-align: left;
    padding: 3px;
    height: 45px;
    max-height: 75px;
    outline: none;
    resize: none;
    font-family: sans-serif;
    box-sizing: border-box;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.number-input::-webkit-scrollbar {
    display: none;
}

.number-input {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

label[for="calc-speed"] {
    color: #E0E0E0;
    font-family: Arial, Helvetica, monospace;
    font-weight: 500;
    margin-top: 20px;
}

.speed-value {
    color: #E0E0E0;
    font-family: Arial, Helvetica, monospace;
    font-weight: 500;
    margin-top: 0px;
}

.text-results h3:first-of-type {
    color: #E0E0E0;
    font-family: monospace;
}

.settings-area h2 {
    color: #E0E0E0;
}

.fontSizeSetting label[for="fontSize"] {
    color: #E0E0E0;
    font-family: Arial, Helvetica, monospace;
    font-size: 18px;
    font-weight: 500;
}

.fontRangeArea p {
    color: #E0E0E0;
    font-family: Arial, Helvetica, monospace;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.fontRangeArea span {
    margin: 0 auto;
}

.btn-img {
    width: 32px;
    height: 32px;
    margin: 2px -1px 0 0;
}

.main-controllers-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.results-calculation-area {
    border: 1px solid black;
    background: rgb(246, 246, 119);
    max-width: 300px;
    width: 100vh;
    height: 469px;
    scroll-behavior: smooth;
}

.text-results {
    display: flex;
    flex-direction: column;
    gap: -10px;
    font-family: monospace;
    scroll-behavior: smooth;
    margin-top: 20px;
}

.two-large-blocks {
    display: flex;
    flex-direction: row;
    gap: 0px;
}

.blocks {
    width: 150px;
    max-width: 160px;
    height: 152px;
    max-height: 160px;
    border: 1px solid black;
    aspect-ratio: 1/1;
    padding: 5px;
}

.currentNumber {
    font-size: 1.45em;
    height: 14.5em;
    max-width: 140px;
    min-width: 60px;
    overflow: auto;
    white-space: break-word;
    line-break: anywhere;
}

.currentNumberBlock {
    background: rgb(173, 216, 230);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
}

.firstNumberStatsBlock {
    background: rgb(144, 238, 144);
    padding: 5px;
    border-radius: 0px 20px 0px 0px;
}

.sblock::-webkit-scrollbar {
    display: none;
}

.sblock {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@supports (scrollbar-color: auto) {
    .sblock {
        scrollbar-width: thin;
        scrollbar-color: rgb(115, 255, 115) none;
    }
}

.firstNumber {
    word-break: break-all;
    white-space: normal;
    overflow-wrap: break-word;
    overflow: auto;
}

.stat-p {
    font-size: 1.1em;
    font-weight: 600;
}

.stat-v {
    font-size: 1.2em;
    max-width: 100vw;
    max-height: 30px;
}

.calcResultsBlock {
    background: rgb(197, 112, 247);
    overflow-y: auto;
    line-break: anywhere;
    border-radius: 0px 0px 20px 0px;
}

.calcResultsBlock {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.calcResultsBlock::-webkit-scrollbar {
    width: 4px;
}

.calcResultsBlock::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6a0dad, #4b0082);
    border-radius: 30px;
    border: 3px solid #6a0dad;
}

.calcResultsBlock::-webkit-scrollbar-track {
    background: rgba(197, 112, 247, 0.05);
    border-radius: 30px;
    border: 1px solid #6a0dad;
}

.calcResultsBlock {
    scrollbar-width: thin;
    scrollbar-color: #6a0dad rgba(197, 112, 247, 0.05);
}

@supports (scrollbar-color: red blue) {
    .calcResultsBlock {
        scrollbar-width: thin;
        scrollbar-color: #6a0dad rgba(197, 112, 247, 0.05);
    }
}

.results-calculation-area {
    overflow: auto;
    padding: 10px;
    font-family: monospace;
    font-weight: 560;
    border-radius: 20px 0px 0px 20px;
}   

@supports not (font-weight: 560) {
    .results-calculation-area {
        font-weight: 600;
    }
}

.results-calculation-area p {
    margin-top: 0;
    margin-bottom: 7px;
}

.fontSizeSetting {
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, monospace;
    font-size: 18px;
    font-weight: 500;
    gap: 5px;
}

#fontSizeSet {
    width: 100%;
    max-width: 250px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 260px;
    height: 6px;

    background: var(--inner-bg);
    border-radius: 999px;
    border: 2px solid var(--border-light);
    outline: none;
    box-sizing: border-box;
}

.fontRangeArea {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    margin-top: 13px;
}

.immediatly {
    border-radius: 30px;
    border: 2px solid #555555;
    background-color: #2B2B2B;
    color: #E0E0E0;
    padding: 5px 10px;
    cursor: pointer;
}

.start {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    transition: none;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    outline: none;
}

@supports not (aspect-ratio: 1 / 1) {
    .start {
        width: 45px;
        height: 45px;
    }
}


.controllers {
    position: fixed;
    bottom: 10px;
    background: linear-gradient(135deg, #4a0090, #880083);
    border: 3px solid rgb(147, 0, 205);
    border-radius: 30px;
    box-shadow: 0 0 5px rgba(23, 23, 23, 0.5);
}

.controllers-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0px;
    padding: 3px;
}

.controller {
    width: 50px;
    height: 40px;
    border-radius: 20px;  
    appearance: none;
    padding: 0;
    border: none;
    background-color: transparent;
    color: black;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    outline: none;
}

/* .controller {
    width: 56px;           
    height: 40px;
    border-radius: 20px;   
    padding: 0;            
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
} */

.controllers-wrapper .btn-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin: 0;
    padding: 0;
    z-index: 100000;
}

.start .btn-img {
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
}

.speedRangeArea {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.inp-con-img {
    width: 20px;
    height: 20px;
    aspect-ratio: 1/1;
}

.inp-controller {
    width: 36px;
    height: 36px;
    appearance: none;
    background: none;
    border: none;
    filter: invert();
    cursor: pointer;
}

.clear-input {
    filter: invert();
}

/* ===== COMPOUND INPUT SHELL ===== */

.main-controllers-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 8px;
    border-radius: 14px;

    background: none;
    border: 2px solid var(--border-main);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 4px 12px rgba(0,0,0,0.35);
}

/* убираем бордер у самого input */
.main-controllers-container .number-input {
    border: none;
    background: transparent;
    height: 34px;
    padding: 0 0 0 0;
}

/* ===== PRIMARY ROW ===== */

.inp-main-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ===== SECONDARY BUTTONS ===== */

.inp-secondary-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 0px;
}

/* ===== ICON BUTTONS INSIDE INPUT ===== */

.inp-controller,
.inp-controller-main {
    width: 28px;
    height: 28px;

    border-radius: 8px;
    background: transparent;
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.7;
    transition:
        opacity 120ms ease,
        background-color 120ms ease,
        transform 80ms ease;
}

.inp-controller:hover,
.inp-controller-main:hover {
    opacity: 1;
    background: rgba(255,255,255,0.06);
}

.inp-controller:active,
.inp-controller-main:active {
    transform: scale(1.1);
}

.clear-input {
    cursor: pointer;
}




@font-face {
    font-family: trebuchet;
    src: url("../styles/fonts/windows-xp-message-title-trebuchet-ms.otf");
}

@font-face {
    font-family: pixelFont;
    src: url("../styles/fonts/PixgamerRegular-OVD6A.ttf");
}

/* ===== WINDOW ===== */

#errorWindow {
    width: min(400px, 92vw);
    border-radius: 5px 5px 0 0;
    background: #4300E5;
    padding: 4px;
    image-rendering: pixelated;

    display: flex;
    flex-direction: column;
}

/* ===== TITLE BAR ===== */

.main-error-layer {
    font-family: trebuchet;
    color: white;
    font-weight: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 4px 6px;
}

.main-error-layer h2 {
    margin: 0;
    font-size: clamp(18px, 4vw, 22px);
    text-shadow: 2px 1px black;
}

.close-error-win {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CONTENT ===== */

.second-error-layer {
    background: #EBE9D8;
    font-family: pixelFont;

    display: flex;
    flex-direction: column;

    padding: 10px;
    gap: 12px;

    /* ВАЖНО: растёт внутрь окна */
    flex-grow: 1;
}

/* ===== MESSAGE ===== */

.info-layer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-layer img {
    flex-shrink: 0;
}

.info-layer h3 {
    margin: 0;
    color: #1e1e1e;
    font-weight: 100;

    font-size: clamp(14px, 3.5vw, 18px);
    line-height: 1.2;
}

/* ===== BUTTON ===== */

.ok-btn-div {
    margin-top: auto; /* 🔥 КЛЮЧ */
    display: flex;
    justify-content: center;
}

.ok-btn-cover {
    border: 1px solid black;
}

.ok-btn {
    width: 80px;
    height: 25px;

    font-family: pixelFont;
    background: none;
    border: 1px solid white;
    border-right: 2px solid grey;
    border-bottom: 2px solid grey;

    cursor: pointer;
    color: #272D2A;
}

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

@media (max-width: 360px) {
    .info-layer {
        align-items: flex-start;
    }

    .info-layer img {
        width: 32px;
        height: 32px;
    }

    .ok-btn {
        width: 70px;
        height: 24px;
    }
}

.copy-btn {
    color: white;
    z-index: -999;
    height: 40px;
    width: 70px;
    appearance: none;
    border: none;
    background: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    filter: opacity(.8);
}

.copy-btn h3 {
    color: white;
    font-family: Arial;
    font-size: 16px;
}

.copy-svg {
    width: 24px;
    height: 24px;
    filter: invert();
}

.copy-btn:hover {
    filter: opacity(1)
}

.step-index {
    color: rgb(49, 49, 49);
    font-size: 12px;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}


