
#main-container {
    display: flex;
    gap: 20px;
}

#palette-area {
    display: flex;
    gap: 30px;
    width: 65%;
    position: relative;
    align-items: self-end;
}

/* Палитра */
#palette {
    display: grid;
    grid-template-columns: repeat(6, 145px);
    grid-auto-rows: 85px;
    gap: 9px;
    max-height: 650px;
    min-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    border: none;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    scrollbar-width: none;
}

#palette::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

#palette-area h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: -35px;
    margin-left: 20px;
    margin-top: 15px;
}

.color-box {
    width: 145px;
    height: 85px;
    border: 1px solid #c5bebe;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.1s;
    border-radius: 5px;
}

.color-box:hover {
    transform: scale(1.02);
}

.color-box.selected {
    border: 3px solid #fff;
    transform: scale(1.3);
}

/* Хоризонтален скрол с категориите */
#horizontal-scroll {
    margin: 0 0 20px;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    user-select: none;
    background: #f0f0f0;
    padding: 40px 20px 20px;
    border-radius: 8px;
    width: 107%;
}

.scroll-color-box {
    flex: 0 0 75px;
    height: 45px;
    width: 75px;
    min-width: 75px;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s;
}

.scroll-color-box.selected {
    border-color: #fff;
}

/* Вертикален скрол (градиент) */
#vertical-scroll {
    width: 30px;
    min-width: 30px;
    height: 84.2%;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to bottom, #fff, #fff);
    cursor: pointer;
    position: relative;
}

/* Скриваме отделните box-ове в вертикалния скрол */
#vertical-scroll .scroll-color-box {
    display: none;
}

/* Детайли за избрания цвят */
#color-details {
    flex-grow: 1;
    border: 1px solid #ddd;
    padding: 0;
    border-radius: 30px;
    background: #fff;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    user-select: none;
    font-size: 1.1em;
    color: #333;
    position: relative;
}

.color-txt {
    position: absolute;
    bottom: 50px;
    color: #fff;
}

#color-display {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    border-radius: 30px;
}

#file-name {
    margin-bottom: 6px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

#color-name {
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
    font-size: 40px;
}

#color-code {
    font-family: monospace;
    text-align: center;
    font-size: 25px;
    font-weight: 500;
}

#color-details.empty {
    opacity: 0.5;
}

#scroll-marker {
    position: absolute;
    left: -10px;
    width: 50px;
    height: 50px;
    background-color: #dadada;
    border-radius: 30px;
    pointer-events: none;
    transition: top 0.2s ease;
    top: 0;
    border: 5px solid #ffffff;
    box-shadow: 0 0 10px #a7a7a7;
}


@media (max-width: 1560px) {
    #palette-area {
        width: 66%;
    }

}

@media (max-width: 1450px) {
    #palette {
        grid-template-columns: repeat(5, 145px);
        grid-auto-rows: 85px;
        gap: 9px;
        max-height: 650px;
        min-height: 650px;
    }

    #color-name {
        font-size: 30px;
    }
}

@media (max-width: 1280px) {
    #palette {
        grid-template-columns: repeat(5, 135px);
        grid-auto-rows: 75px;
        gap: 9px;
        max-height: 650px;
        min-height: 650px;
    }

    .color-box {
        width: 135px;
        height: 75px;
    }

}

@media (max-width: 1200px) {

    #palette {
        grid-template-columns: repeat(5, 120px);
        grid-auto-rows: 60px;
        gap: 9px;
        max-height: 650px;
        min-height: 650px;
    }

    .color-box {
        width: 120px;
        height: 60px;
    }
    #palette-area {
        width: 68%;
    }

    .scroll-color-box {
        flex: 0 0 65px;
        height: 45px;
        width: 65px;
        min-width: 65px;
    }

    #palette-area {
        width: 65%;
    }

}


@media (max-width: 1199px) {

    #horizontal-scroll {
        width: 110%;
    }

    #palette {
        grid-template-columns: repeat(5, 100px);
        grid-auto-rows: 50px;
        gap: 9px;
        max-height: 530px;
        min-height: 530px;
    }

    .color-box {
        width: 100px;
        height: 50px;
    }
    #palette-area {
        width: 68%;
    }

    .scroll-color-box {
        flex: 0 0 50px;
        height: 35px;
        width: 50px;
        min-width: 50px;
    }

    #palette-area {
        width: 65%;
    }

    .color-txt {
        position: absolute;
        bottom: 50px;
        transform: scale(0.7);
    }

    #vertical-scroll {
        width: 20px;
        min-width: 20px;
        height: 82.2%;
    }

    #scroll-marker {
        position: absolute;
        left: -8px;
        width: 35px;
        height: 35px;
        border: 3px solid #ffffff;

    }


}

@media (max-width: 992px) {

    #color-display {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .color-txt {
        bottom: 5px;
    }

    #horizontal-scroll {
        width: 107%;
    }

  .color-txt {
    position: absolute;
    bottom: 10px;
    transform: scale(1);
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    width: 100%;
    flex-direction: column;
}

    div#color-name {
        margin-right: 10px;
        font-size: 20px;
    }

    #color-code {
        margin-top: -3px;
    }

    #color-name, #file-name {
        margin: 0;
    }


    #main-container {
        display: flex;
        gap: 30px;
        flex-direction: column-reverse;
    }

    #palette-area {
        width: 100%;
    }

    #vertical-scroll {
        width: 20px;
        min-width: 20px;
        height: 330px;
    }

    #palette {
        grid-template-columns: repeat(6, 108px);
        grid-auto-rows: 50px;
        gap: 9px;
        max-height: 330px;
        min-height: 330px;
    }

    #palette-area > div:first-child{
        width: 100%;
    }
    
    .pallete-txt{
        font-size:14px;
    }
#color-details, #color-display{
    border-radius:8px;
}
}


@media (max-width: 600px) {

    div#color-name {
        margin-right: 10px;
        font-size: 18px;
    }

    div#file-name {
        font-size: 13px;
    }

    .color-txt {
        bottom: 10px;
    }

    #color-code {
        margin-top: -3px;
        font-size: 15px;
    }

    #palette {
        grid-template-columns: repeat(5, 93px);
        grid-auto-rows: 50px;
        gap: 9px;
        max-height: 330px;
        min-height: 330px;
    }

    .color-box {
        width: 90px;
        height: 50px;
    }

    #horizontal-scroll {
        margin: 0 0 20px;
        display: flex;
        overflow-x: auto;
        gap: 5px;
        user-select: none;
        background: #f0f0f0;
        padding: 40px 20px 20px;
        border-radius: 8px;
        width: 110%;
    }
}

@media (max-width: 445px) {

    div#color-name {
        margin-right: 0;
        font-size: 15px;
    }

  

    #color-code {
        margin-top: -3px;
        font-size: 12px;
    }

    div#file-name {
        font-size: 11px;
    }

    #palette {
        grid-template-columns: repeat(5, 63px);
        grid-auto-rows: 50px;
        gap: 5px;
        max-height: 250px;
        min-height: 250px;
    }

    #horizontal-scroll {
        margin: 0 0 20px;
        display: flex;
        overflow-x: auto;
        gap: 5px;
        user-select: none;
        background: #f0f0f0;
        padding: 40px 10px 15px;
        border-radius: 8px;
        width: 100%;
    }

    .scroll-color-box {
        flex: 0 0 30px;
        height: 30px;
        width: 30px;
        min-width: 30px;
    }

    #horizontal-scroll {
        margin: 0 0 20px;
        display: flex;
        overflow-x: auto;
        gap: 8px;
        user-select: none;
        background: #f0f0f0;
        padding: 40px 10px 15px;
        border-radius: 8px;
        width: 112%;
    }

    .scroll-color-box.selected::after, .color-box.selected::after {
        content: ' ';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 15px;
        height: 15px;
        background-color: white;
        border-radius: 50%;
        color: #d84315;
        font-size: 18px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url('../images/icons/down-arrow.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 10px 10px;
    }

    .color-box {
        width: 60px;
        height: 50px;
    }

    #vertical-scroll {
        width: 10px;
        min-width: 10px;
        height: 250px;
    }

    #scroll-marker {
        position: absolute;
        left: -7px;
        width: 25px;
        height: 25px;
        border: 2px solid #ffffff;
    }

    #palette-area h4 {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: -32px;
        margin-left: 12px;
        margin-top: 15px;
    }
}

@media (max-width: 414px) {
    #palette {
        grid-template-columns: repeat(5, 59px);
        grid-auto-rows: 50px;
        gap: 5px;
    }

    #palette-area {
        gap: 19px;
    }

    .color-txt {
        gap: 2px;
    }

    #color-display {
        padding: 12px 5px;
    }

}

@media (max-width: 365px) {

    #palette {
        grid-template-columns: repeat(5, 55px);
        grid-auto-rows: 50px;
        gap: 5px;
    }

    #palette-area {
        gap: 15px;
    }

    .color-box {
        width: 54px;
        height: 50px;
    }

    #horizontal-scroll {
        margin: 0 0 20px;
        display: flex;
        overflow-x: auto;
        gap: 5px;
        user-select: none;
        background: #f0f0f0;
        padding: 40px 10px 15px;
        border-radius: 8px;
        width: 109%;
    }

}


