/* Base styles: Extra small devices (<576px) */
#chat, #top-left {
    width: 200px;
}
#right {
    width: 150px;
}
#tabButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: space-between;
}
#tabButtons button {
    width: 18px;
    height: 18px;
    padding: 0;
    background-size: cover;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
}

/* Level cards and combat options */
.level-card {
    width: calc(50% - 4px);
}
.combat-option {
    width: calc(50% - 10px);
}

/* Tooltip styles */
.level-tooltip,
.spell-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 240px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Small devices (≥576px) */
@media (min-width: 576px) {
    #chat, #top-left {
        width: 240px;
    }
    #right {
        width: 180px;
    }
    #tabButtons button {
        width: 22.29px;
        height: 22.29px;
    }
}

/* Medium devices (≥768px) */
@media (min-width: 768px) {
    #chat, #top-left {
        width: 280px;
    }
    #right {
        width: 210px;
    }
    #tabButtons button {
        width: 26.57px;
        height: 26.57px;
    }
}

/* Large devices (≥992px) */
@media (min-width: 992px) {
    #chat, #top-left {
        width: 320px;
    }
    #right {
        width: 240px;
    }
    #tabButtons button {
        width: 30.86px;
        height: 30.86px;
    }
    .level-card {
        width: calc(33% - 4px);
    }
}

/* Extra large devices (≥1400px) */
@media (min-width: 1400px) {
    #chat {
        width: 350px;
    }
    #right {
        width: 250px;
    }
    #tabButtons button {
        width: 32.29px;
        height: 32.29px;
    }
}


#spellBook {

}

.spell-option {
    width: calc((100% - 4 * 6px) / 6); /* Default: 5 per row */
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.5;
    box-sizing: border-box;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.spell-option.active {
    opacity: 1;
}
.spell-option.active img {
    background: rgba(122,122,122,0.2);
    border: #2c2c2c 1px solid;
    border-radius: 5px;
}
.spell-option.unavailable {
    opacity: 0.25;
}




/* Responsive layout: adjust number of icons per row */
@media (max-width: 575px) {
    .spell-option {
        width: calc((100% - 2 * 6px) / 4); /* 3 per row */
    }
    .shop-item-wrapper {
        width: calc(100% / 5)
    }
}
@media (min-width: 576px) and (max-width: 767px) {
    .spell-option {
        width: calc((100% - 3 * 6px) / 5); /* 4 per row */
    }
    .shop-item-wrapper {
        width:  calc(100% / 8);
    }
}
@media (min-width: 768px) {
    .spell-option {
        width: calc((100% - 4 * 6px) / 6); /* 5 per row */
    }
    .shop-item-wrapper {
        width:  calc(100% / 15);
    }
}
