h1 {
    font-size: 40px;
    font-weight: 600;
    line-height: 60px;
}

.container.tool-working {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-direction: column;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    background-color: var(--secondary-color);
    margin: 0 !important;
    width: 100%;
    max-width: 100% !important;
    border: none !important;
    box-shadow: 0 0 0 1px #e2e0e0;
}

.form-section:has(.font__cards) {
    min-height: 422px;
    padding: 0;
    min-width: 0;
}

.form-section:has(.font__cards-empty:not(.d-none)) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 100% !important;
    min-height: 64px;
    padding: 12px 50px 12px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 0 0 1px #E2E0E0;
}

.fontchange {
    flex: 1 1 auto;
    width: 100%;
    height: 24px;
    min-height: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: #2A3241;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.form-section #clear-text {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 16px;
    padding: 0;
    line-height: 0;
}

#clear-text img {
    transition: 0.5s all linear;
}

#clear-text img:hover {
    filter: brightness(0) saturate(50%);
}

.surprise-and-counter {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.word-counter {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0%;
    color: #717273;
}

.surprise-button {
    background-color: transparent;
    border: none;
    outline: none;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #000000;
    cursor: pointer;
}

.select-font-mode {
    display: flex;
    align-items: center;
    width: 100%;
    box-shadow: 0 1px 0 0 #E2E0E0;
}

.font-mode-list {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 24px;
    list-style: none;
}

.font-mode-element {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: #717273;
    padding-bottom: 12px;
    cursor: pointer;

    &.active {
        color: #000000;
        box-shadow: 0 2px 0 0 #000000;
    }
}

.main-working-area {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

.font-categories {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: flex-start;
    padding: 16px;
    gap: 16px;
    width: 213px;
    flex: 0 0 213px;
    background: #fbfbfb;
    border: 1px solid #e2e0e0;
    border-radius: 12px;
    position: sticky;
    top: 100px;
    z-index: 11;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    position: sticky;
    top: 0;
}

.select-font {
    display: flex;
}

h3 {
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 35px !important;
}

.select-font-text {
    margin: 0 !important;
    width: auto !important;
    height: 20px !important;
    font-family: "Poppins", sans-serif !important;
    font-style: normal !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #000000 !important;
}

.select-font-tapOnCard {
    display: none;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #717273;
}

.font-categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.font-tab {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    gap: 10px;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 0 0 1px #e2e0e0;
    border-radius: 6px;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #3a3a3a;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border: none;
}

.font-tab-active {
    background: #000000;
    box-shadow: 0 0 0 1px #0000;
    color: #ffffff;
}

.font__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    max-height: 800px;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding-right: 10px;
}

.font__card.active-card {
    background-color: #F6F6F6;
    box-shadow: 0 0 0 1px #000000;
}

.font__cards::-webkit-scrollbar {
    width: 6px;
}

.font__cards::-webkit-scrollbar-thumb {
    background: #A0A2AB;
    border-radius: 20px;
}

.font__cards::-webkit-scrollbar-track {
    background: transparent;
}

.font__card {
    word-break: break-word;
    padding: 10px 20px;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px #e2e0e0;
    border-radius: 5px;
    cursor: pointer;
    justify-content: space-between;
    flex: 1 1 calc(100% - 30px);
    min-width: 120px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;

}

.font_card_input {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 62px;
    width: 100%;
    align-items: start;
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.font_card_type {
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #717273;
}

.result_input {
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    line-height: 24px;
    color: #000000;
}

@font-face {
    font-family: "STIX Two Math Subset";
    src: url("../fonts/stix-two-math-subset.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0300-036F, U+210E, U+1D434-1D467;
}
.result_input--mathmark {
    font-family: "STIX Two Math Subset", "Poppins", sans-serif !important;
}

.font__card--art .font_card_input {
    min-width: 0;
    overflow: hidden;
}

.font__card--art .result_input {
    white-space: pre;
    font-family:
        "Menlo", "Consolas", "DejaVu Sans Mono", "Liberation Mono",
        "Courier New", monospace !important;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    word-spacing: 0;
    tab-size: 1;
    text-align: left;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #c5cbd6 transparent;
}

.font__card--art .result_input::-webkit-scrollbar {
    height: 6px;
}

.font__card--art .result_input::-webkit-scrollbar-track {
    background: transparent;
}

.font__card--art .result_input::-webkit-scrollbar-thumb {
    background-color: #c5cbd6;
    border-radius: 999px;
}

.copy-and-favorite {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    cursor: default;
    height: 24px;
    min-width: fit-content;
}

.add-to-favorite {
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 1.2002L15.3374 8.31048L22.8 9.45066L17.4 14.9852L18.6748 22.8002L12 19.1105L5.32523 22.8002L6.6 14.9852L1.2 9.45066L8.66261 8.31048L12 1.2002Z' stroke='%238E93A6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    height: 24px;
    width: 24px;
    cursor: pointer;
    transition: background-image 0.3s;
}

.add-to-favorite:hover,
.add-to-favorite.active {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 1.2002L15.3374 8.31048L22.8 9.45066L17.4 14.9852L18.6748 22.8002L12 19.1105L5.32523 22.8002L6.6 14.9852L1.2 9.45066L8.66261 8.31048L12 1.2002Z' fill='black' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.font__cards .tooltip {
    width: auto;
}

.copy_font {
    gap: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;

    .tooltiptext {
        bottom: 160% !important;
        padding: 6px 8px !important;
        font-weight: 400;
        font-size: 12px;
        line-height: 16px;
        text-align: center;

    }
}

.font__cards .tooltip .tooltiptext::after {
    content: '';
    border: 8px solid transparent;
    border-top: 6px solid black;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0%);
    border-bottom: none;
    border-bottom-width: 0;
}

.copy_font img {
    transition: 0.5s all linear;
}

.copy_font img:hover {
    filter: brightness(0) saturate(50%);
}

h2 {
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 48px !important;
}

.content-row img {
    max-width: 100%;
}

.list-img-box {
    min-height: 300px;
    width: 100%;
    border-radius: 12px;
    background-color: #FBFBFB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-img-box img {
    min-height: 245px;
    max-height: 245px;
}

.w-100 {
    width: 100%;
}

.font__cards-empty {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: #717273;
}

@media (max-width: 768px) {
    .content-row {
        flex-direction: column;
        gap: 24px;
    }

    .content-row img {
        min-height: auto;
    }

    .content-cards .content-row .text-center {
        order: 2;
    }

    .list-img-box {
        min-height: 196px;
    }

    .main-working-area {
        flex-direction: column;
        gap: 16px;
    }

    .font-categories {
        width: 100%;
        gap: 8px;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        border-radius: 0;
        flex: none;
        position: static;
    }

    .font-categories-list {
        flex-direction: row;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: #A0A2AB transparent;
        justify-content: flex-start;
        padding: 1px;
        mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 40px), rgba(0, 0, 0, 0) 100%);
        scrollbar-width: none;
    }

    .font-categories-list::-webkit-scrollbar {
        height: 4px;
    }

    .font-tab {
        padding: 6px 12px;
        font-weight: 500;
        font-size: 12px;
        line-height: 20px;
        width: fit-content;
        white-space: nowrap;
    }

    .select-font-tapOnCard {
        display: block;
    }

    .select-font-text {
        display: none;
    }

    .copy__font {
        display: none;
    }
    .form-section:has(.font__cards) {
        min-height: 80px;
    }
}

@media (max-width: 600px) {
    .font__card {
        flex: 1 1 calc(100% - 30px);
    }
}

@media(max-width: 450px) {

    .font__cards-empty,
    .word-counter {
        font-size: 14px !important;
    }
}

@media (max-width: 360px) {
    .font__card {
        padding: 10px 5px;
    }
}