:root {
    --color-lighterer-blue: rgb(192, 217, 250);
    --color-lighter-blue: #8cacdf;
    --color-light-blue: #6488dd;
    --color-blue: #1447ae;
    --color-text: #3366FF;
    --color-list-bg: #edf2fb;
    --color-text-highlight: #000080;
    --image-small: 14;
    --image-big: 32;
    --cursor-default: url("image/cursor/default.png"), default;
    --cursor-pointer: url("image/cursor/pointer.png") 7 0, pointer;
    --cursor-not-allowed: url("image/cursor/not-allowed.png"), not-allowed;
}

* {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#listHolder {
    display: grid;
    gap: 15px;
    margin: 0 auto 20px auto;
    max-width: 768px;
    justify-content: center;
    justify-items: center;
    grid-template-columns: repeat(3, 0fr);
}

.moneyLoss {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bolder;
    letter-spacing: 4px;
    color: #ff5722;
    text-shadow: 0 0 5px #ff5722;
    animation: fireAnimation 2.5s infinite alternate ease-in-out;
    will-change: transform, text-shadow;
    margin-bottom: 20px;
    cursor: var(--cursor-default);
}

.moneyLoss::before,
.moneyLoss::after {
    content: "🔥";
    position: relative;
    opacity: 0.7;
    animation: flameAnimation 3s infinite ease-in-out;
    will-change: transform, opacity;
}

.moneyLoss::before {
    right: -15px;
    top: -5px;
    transform: scale(0.8) rotate(-20deg);
}

.moneyLoss::after {
    left: -15px;
    top: -5px;
    transform: scale(0.8) rotate(20deg);
}

@keyframes fireAnimation {
    0%, 100% {
        text-shadow: 0 0 5px #ff5722, 0 0 10px rgba(255, 87, 34, 0.7);
        transform: translateY(0);
    }

    50% {
        text-shadow: 0 0 15px #ff9800, 0 0 25px rgba(255, 152, 0, 0.7);
        transform: translateY(-4px);
    }
}

@keyframes flameAnimation {
    0%, 100% {
        opacity: 0.6;
        transform: scale(0.8) translateY(0);
    }

    25% {
        opacity: 0.8;
        transform: scale(0.9) translateY(-2px);
    }

    50% {
        opacity: 1;
        transform: scale(1) translateY(-5px);
    }

    75% {
        opacity: 0.8;
        transform: scale(0.9) translateY(-3px);
    }
}

.board {
    padding: 7px 10px 10px 10px;
    display: inline-flex;
    flex-direction: column;
    border: 1px solid var(--color-blue);
    background-color: var(--color-list-bg);
}

.imgcontainer {
    position: relative;
    margin: 10px 0 0 0;
    width: calc(16px * var(--image-small));
    height: calc(9px * var(--image-small));
    transition-duration: 0.3s;
}

.imgcontainer:hover {
    cursor: var(--cursor-pointer);
    filter: brightness(0.7);
    transition-duration: 0.3s;
}

.img-blur {
    display: none;
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(16px * var(--image-small) + 8px) !important;
    height: calc(9px * var(--image-small) + 8px) !important;
    filter: blur(2px);
    z-index: 0;
    pointer-events: none;
}

.imgcontainer img {
    position: absolute;
    z-index: 1;
    border-radius: 5px;
    width: calc(16px * var(--image-small));
    height: calc(9px * var(--image-small));
}

.board > a {
    cursor: var(--cursor-default);
    font-weight: bolder;
    color: var(--color-text);
    font-size: 10pt;
}

.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    cursor: var(--cursor-pointer);
}

.keyboard-card {
    position: relative;
    background-color: var(--color-list-bg);
    border: 1px solid var(--color-blue);
    padding: 40px 20px 15px 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    cursor: var(--cursor-default);
}

.keyboard-card::after {
    content: "board.html";
    width: 100%;
    height: 20px;
    background-color: var(--color-blue);
    top: 0px;
    left: 0px;
    position: absolute;
    color: white;
    font-size: 10pt;
    padding: 2px 0 2px 10px;
    z-index: 0;
}

.close-card {
    position: absolute;
    top: -9px;
    right: 6px;
    font-size: 24px;
    cursor: var(--cursor-pointer);
    color: white;
    z-index: 1;
}

.close-card:hover {
    color: gray;
}

.carousel {
    margin: 20px 0;
    text-align: center;
}

.carousel-img-container {
    position: relative;
    display: inline-block;
    cursor: var(--cursor-pointer);
}

.carousel img {
    position: relative;
    max-width: 100%;
    max-height: 400px;
    border-radius: 5px;
    z-index: 1;
}

.carousel .img-blur {
    position: absolute;
    top: -4px;
    left: -4px;
    max-width: unset;
    max-height: unset;
    width: calc(100% + 8px) !important;
    height: calc(100% + 8px) !important;
    filter: blur(2px);
    z-index: 0;
    pointer-events: none;
}

.keyboard-description {
    color: #ddd;
    line-height: 1.6;
    text-align: justify;
}

.keyboard-description p {
    color: var(--color-text);
    font-weight: bolder;
    margin: 10px 0;
}

.card_desc_price span {
    color: #ff5722;
}

.card_desc_price {
    font-size: 12pt;
}

.numbering {
    position: relative;
    width: fit-content;
    bottom: 23px;
    left: 7px;
    margin-bottom: -13px !important;
    font-size: small;
    font-weight: bolder !important;
    z-index: 2;
    color: black !important;
    opacity: 0.5;
    user-select: none;
}

.keyboard-card h2 {
    /* text-shadow: 1px 1px 1px #000000e0; */
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-text-highlight);
    padding-bottom: 10px;
}

.carousel {
    position: relative;
    margin-bottom: 20px;
}

.carousel-img-container {
    position: relative;
    display: inline-block;
    cursor: var(--cursor-pointer);
    margin-bottom: 10px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-btn {
    padding: 0;
    width: 30px;
    height: 25px;
    cursor: var(--cursor-pointer);
    display: flex;
    border: 0;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    filter: saturate(1.3);
}

.carousel-btn.disabled {
    filter: grayscale(100%);
    cursor: var(--cursor-not-allowed);
}

.carousel-btn.prev, .carousel-btn.next {
    background-image: url("image/arrow.gif");
    background-position: 39px;
    background-size: 45px;
}

.carousel-btn.prev {
    scale: -100% 100%;
}

.carousel-counter {
    font-size: 10pt;
    color: var(--color-text);
    min-width: 50px;
    text-align: center;
}

.goBack {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    right: 38px;
    bottom: 780px;
    width: 30px;
    height: 40px;
    border-radius: 5px 0 0 5px;
    background-color: #0000009a;
    box-shadow: 0 0 5px 5px #0000009a;
    transition-duration: 0.2s;
}

.goBack a {
    margin-left: 10px;
    text-decoration: none;
    font-weight: bolder;
    color: rgba(182, 219, 251, 0.73);
}

.goBack a:hover {
    text-shadow: 0 0 3px rgba(182, 219, 251, 0.73);
}

#sortHolder {
    display: flex;
    gap: 10px;
    margin: 0px auto 20px auto;
    padding: 10px;
    border: 1px solid var(--color-blue);
    background-color: var(--color-list-bg);
    width: 768px;
    justify-content: space-between;
}

#sortHolder input {
    width: -webkit-fill-available;
    padding: 0 10px;
}

#sortHolder input:focus {
    outline: none;
}

#brandSortButton {
    display: flex;
    font-size: 10pt;
    color: var(--color-text);
    width: fit-content;
    padding: 0 10px;
    height: 30px;
    flex-shrink: 0;
    border: 1px solid var(--color-blue);
    background-color: var(--color-list-bg);
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: var(--cursor-pointer);
}

#brandSortButton:hover {
    background-color: var(--color-lighterer-blue);
}

h2 {
    display: flex;
    width: 100%;
    grid-column: 1 / -1;
    margin-bottom: 10px;
    justify-content: space-between;
}
