/* KBot Theme Colors */
:root {
    --bg: #16181d;
    --board-bg: #202229;
    --text-outline: #0f1114;
    --off-white: #e9e9ea;
    --gray: #9aa0a6;
    --white: #ffffff;
    --lavender: #b79bff;
    --purple: #7c5cff;
    
    /* Rarity Colors */
    --rarity-6: linear-gradient(90deg, #ff7a7a, #ffb266, #ffe680, #7ce081, #7fd7ff, #6f8bff, #d58bff, #ff7a7a);
    --rarity-5: #292929;
    --rarity-4: #ed4242;
    --rarity-3: #fbc02d;
    --rarity-2: #e040fb;
    --rarity-1: #2196f3;
    --rarity-0: #b2f252;
    --rarity--1: #d3d3d3;
}

@font-face {
    font-family: 'FFFORWA';
    src: url('FFFORWA.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    background: var(--bg);
    color: var(--white);
    min-height: 100vh;
    padding: 20px;
}

/* Header */
.header {
    background: var(--board-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--white);
}

.kbot-text {
    color: var(--purple);
}

.browser-text {
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discord-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(88, 101, 242, 0.2);
    border: 2px solid rgba(88, 101, 242, 0.5);
    border-radius: 8px;
    color: #5865f2;
    text-decoration: none;
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    cursor: pointer;
}

.discord-link:hover {
    background: rgba(88, 101, 242, 0.3);
    border-color: #5865f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-icon {
    font-size: 18px;
    line-height: 1;
}

.discord-text {
    color: #5865f2;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--rarity-2);
    color: var(--white);
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    /* 3D shadow effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3),
                0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(224, 64, 251, 0.4),
                0 3px 6px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-inventory {
    background: var(--purple);
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
}

.btn-inventory:hover {
    box-shadow: 0 6px 12px rgba(124, 92, 255, 0.4),
                0 3px 6px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: var(--purple);
}

.btn-primary:hover {
    box-shadow: 0 6px 12px rgba(124, 92, 255, 0.4),
                0 3px 6px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--purple);
    opacity: 0.8;
}

.btn-secondary:hover {
    opacity: 1;
    box-shadow: 0 6px 12px rgba(124, 92, 255, 0.4),
                0 3px 6px rgba(0, 0, 0, 0.3);
}

.btn-export {
    background: var(--rarity-1);
}

.btn-clear {
    background: var(--rarity-4);
}

.btn-prev, .btn-next {
    background: var(--board-bg);
    border: 2px solid var(--rarity-2);
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--board-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid var(--board-bg);
    border-radius: 6px;
    background: var(--bg);
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--rarity-2);
}

.filter-select:focus {
    outline: none;
    border-color: var(--rarity-2);
}

/* Search */
.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--board-bg);
    border-radius: 8px;
    background: var(--board-bg);
    color: var(--white);
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--rarity-2);
}

/* Stats */
.stats {
    text-align: center;
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 14px;
}

/* Grid - Fixed to prevent overlap */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

/* Ensure cards don't shrink below their minimum width */
.card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive breakpoints with more granular control */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 18px;
        padding: 0 8px;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 0 6px;
    }
}

@media (max-width: 640px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 0 4px;
    }
}

@media (max-width: 360px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 0 3px;
    }
}

/* Card - KBot Style */
.card {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    height: 100%;
    aspect-ratio: 0.85;
    min-height: 240px;
    max-height: 280px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card-top {
    padding: 22px 18px 0 18px; /* Increased top padding to prevent text clipping */
    flex-shrink: 0;
}

.card-title {
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    text-align: center;
    line-height: 1.1; /* Normal line height - prevents stretching */
    overflow: hidden; /* Keep hidden for ellipsis */
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 
        -2px -2px 0 var(--text-outline),
        2px -2px 0 var(--text-outline),
        -2px 2px 0 var(--text-outline),
        2px 2px 0 var(--text-outline),
        0 -2px 0 var(--text-outline),
        0 2px 0 var(--text-outline),
        -2px 0 0 var(--text-outline),
        2px 0 0 var(--text-outline);
    letter-spacing: 0.5px;
    padding-top: 4px; /* Add padding to account for text-shadow */
    padding-bottom: 2px;
    box-sizing: border-box;
}

/* Title color matches rarity (KBot aesthetic 1) - Unob is white */
.card[data-rarity="6"] .card-title {
    color: #FFFF00 !important; /* Shiny yellow from rainbow animation */
    text-shadow: 
        -2px -2px 0 var(--text-outline),
        2px -2px 0 var(--text-outline),
        -2px 2px 0 var(--text-outline),
        2px 2px 0 var(--text-outline),
        -2px 0 0 var(--text-outline),
        2px 0 0 var(--text-outline),
        0 -2px 0 var(--text-outline),
        0 2px 0 var(--text-outline);
    filter: brightness(1.1) saturate(1.2);
}

.card[data-rarity="5"] .card-title {
    color: var(--rarity-5);
}

.card[data-rarity="4"] .card-title {
    color: var(--rarity-4);
}

.card[data-rarity="3"] .card-title {
    color: var(--rarity-3);
}

.card[data-rarity="2"] .card-title {
    color: var(--rarity-2);
}

.card[data-rarity="1"] .card-title {
    color: var(--rarity-1);
}

.card[data-rarity="0"] .card-title {
    color: var(--rarity-0);
}

.card[data-rarity="-1"] .card-title {
    color: var(--rarity--1);
}

.card-type {
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 12px;
    font-weight: 900;
    color: var(--white);
    text-align: center;
    margin-top: 10px;
    margin-bottom: 8px;
    line-height: 1.2; /* Normal line height - prevents stretching */
    padding-top: 2px; /* Add padding to prevent clipping */
    padding-bottom: 2px;
    box-sizing: border-box;
}

.card-image-container {
    flex: 1;
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    max-height: 100%;
}

.card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Rainbow/Hackusate skin animation */
.rainbow-skin {
    -webkit-animation: rgbHue 0.864s steps(36) infinite;
    animation: rgbHue 0.864s steps(36) infinite;
}

@keyframes rgbHue {
    from {
        -webkit-filter: hue-rotate(10deg) brightness(2);
        filter: hue-rotate(10deg) brightness(2);
    }
    to {
        -webkit-filter: hue-rotate(360deg) brightness(2);
        filter: hue-rotate(360deg) brightness(2);
    }
}

.card-bottom {
    padding: 0 14px 14px 14px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.card-count {
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 15px;
    font-weight: 900;
    color: var(--gray);
}

.card-count .count-number {
    color: var(--white);
    margin-left: 6px;
}

/* Material Icons font fallback */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.card-lock {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    font-size: 18px;
    color: #b0b5bb;
    line-height: 1;
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
    box-sizing: border-box;
    border-width: 4px;
    border-style: solid;
}

/* Apply to both skin browser cards and inventory cards */
.card .card-border,
.inventory-card-element .card-border {
    border-width: 2.4px; /* Base border width */
    border-style: solid;
}

/* Ensure unobtainable borders are yellow - highest specificity */
.card[data-rarity="6"] .card-border.unobtainable-border,
.inventory-card-element[data-rarity="6"] .card-border.unobtainable-border,
.card-border.unobtainable-border {
    border-width: 2.4px !important; /* Base unobtainable border width */
    border-style: solid !important;
    border-color: #FFFF00 !important; /* Shiny yellow from rainbow animation */
    box-shadow: 
        0 0 8px rgba(255, 255, 0, 0.8),
        0 0 16px rgba(255, 255, 0, 0.5),
        0 0 24px rgba(255, 255, 0, 0.3) !important;
    filter: brightness(1.2) saturate(1.3) !important;
}

/* Inventory-specific unobtainable border (15% bigger) */
.inventory-card-element[data-rarity="6"] .card-border.unobtainable-border {
    border-width: 2.76px !important; /* 2.4px + 15% for inventory unobtainables */
}

.card-frame {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid var(--board-bg);
    border-radius: 11px;
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
}

/* Apply frame to inventory cards too - scaled frame will be set inline */
.inventory-card-element .card-frame {
    /* Position and size set inline based on scale, but border styling is the same */
    border: 3px solid var(--board-bg);
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
}


@keyframes rainbow-border {
    0%, 100% {
        border-color: #DC143C; /* Crimson */
    }
    20% {
        border-color: #FFA500; /* orange */
    }
    40% {
        border-color: #FFFF00; /* yellow */
    }
    60% {
        border-color: #00FF00; /* lime */
    }
    80% {
        border-color: #0000CD; /* MediumBlue */
    }
}

.card[data-rarity="6"] .card-border.unobtainable-border,
.inventory-card-element[data-rarity="6"] .card-border.unobtainable-border {
    border-color: #FFFF00 !important;
    border-width: 2.4px !important; /* Base unobtainable border width */
    border-style: solid !important;
}

/* Inventory-specific unobtainable border override (15% bigger) */
.inventory-card-element[data-rarity="6"] .card-border.unobtainable-border {
    border-width: 2.76px !important; /* 2.4px + 15% for inventory unobtainables */
}

/* Apply to both skin browser cards and inventory cards */
.card[data-rarity="5"] .card-border,
.inventory-card-element[data-rarity="5"] .card-border {
    border-color: var(--rarity-5);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="4"] .card-border,
.inventory-card-element[data-rarity="4"] .card-border {
    border-color: var(--rarity-4);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="3"] .card-border,
.inventory-card-element[data-rarity="3"] .card-border {
    border-color: var(--rarity-3);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="2"] .card-border,
.inventory-card-element[data-rarity="2"] .card-border {
    border-color: var(--rarity-2);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="1"] .card-border,
.inventory-card-element[data-rarity="1"] .card-border {
    border-color: var(--rarity-1);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="0"] .card-border,
.inventory-card-element[data-rarity="0"] .card-border {
    border-color: var(--rarity-0);
    border-width: 4px;
    border-style: solid;
}

.card[data-rarity="-1"] .card-border,
.inventory-card-element[data-rarity="-1"] .card-border {
    border-color: var(--rarity--1);
    border-width: 4px;
    border-style: solid;
}

/* Inventory-specific border width override (3px + 15% = 3.45px for non-unobtainables) */
.inventory-card-element[data-rarity="5"] .card-border,
.inventory-card-element[data-rarity="4"] .card-border,
.inventory-card-element[data-rarity="3"] .card-border,
.inventory-card-element[data-rarity="2"] .card-border,
.inventory-card-element[data-rarity="1"] .card-border,
.inventory-card-element[data-rarity="0"] .card-border,
.inventory-card-element[data-rarity="-1"] .card-border {
    border-width: 3.45px; /* 3px + 15% for inventory cards (non-unobtainables) */
}

/* Hover Overlay */
.card-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
    gap: 10px;
}

.card:hover .card-hover {
    display: flex;
}

.card-hover-id {
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 14px;
    color: var(--gray);
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.card-hover-btn {
    padding: 8px 16px;
    background: var(--rarity-3);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
}

.card-hover-btn:hover {
    background: var(--rarity-4);
    transform: scale(1.05);
}

.card-hover-btn-animated {
    background: var(--purple) !important;
    margin-top: 8px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.card-hover-btn-animated:hover {
    background: var(--lavender) !important;
    transform: scale(1.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-info {
    color: var(--gray);
    font-size: 14px;
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--board-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--rarity-4);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.inventory-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-footer {
    padding: 20px;
    padding-bottom: 30px; /* Extra padding at bottom so buttons don't sit at edge */
    border-top: 2px solid var(--bg);
}

/* Inventory Modal - Canvas display */
.inventory-modal-content {
    max-width: 98vw; /* Allow larger popup for wide layouts */
    max-height: 95vh;
    width: auto; /* Let content determine width */
}

.inventory-modal-body {
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px; /* Reduced padding to minimize extra space */
    background: transparent; /* Background set dynamically based on theme */
    min-height: 100%; /* Ensure full height coverage */
}

.inventory-grid-container {
    width: 100%;
    min-height: 400px;
    padding: 0;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.inventory-board-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    max-width: calc(100vw - 100px);
    /* Removed max-height to allow background to cover all cards */
    overflow: visible;
}

.inventory-cards-grid {
    display: grid;
    gap: 20px;
    justify-content: center;
}

.inventory-card-element {
    position: relative;
    width: 320px;
    height: 345px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s; /* Match skin browser card transition */
}

.inventory-card-element:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.inventory-card-qty-buttons {
    display: none;
    gap: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.inventory-card-qty-buttons.active {
    display: flex;
}

.inventory-card-title {
    font-family: 'FFFORWA', 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    font-size: 28px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-card-type {
    font-family: 'FFFORWA', 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    font-size: 18px;
    text-align: center;
}

.inventory-card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.inventory-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.inventory-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-card-count {
    font-family: 'FFFORWA', 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    font-size: 22px;
}

.inventory-footer {
    text-align: right;
    font-family: 'FFFORWA', 'Montserrat', Arial, sans-serif;
    font-weight: bold;
    font-size: 22px;
    color: var(--purple);
}

#inventoryCanvas {
    display: none; /* Hidden - using HTML cards now */
}

.inventory-card-overlay {
    position: fixed;
    display: none;
    gap: 8px;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1001;
}

.inventory-card-overlay.active {
    display: flex;
}

.inventory-qty-btn {
    pointer-events: all;
    width: 50px;
    height: 40px;
    border-radius: 8px;
    border: none; /* No outside borders */
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
}

.inventory-qty-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.inventory-qty-minus {
    color: var(--white); /* White text */
    border: none; /* No borders */
}

.inventory-qty-minus:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.inventory-qty-plus {
    color: var(--white); /* White text */
    border: none; /* No borders */
}

.inventory-qty-plus:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Inventory Controls */
.inventory-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.inventory-dropdowns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.inventory-select {
    padding: 8px 12px;
    background: var(--board-bg);
    border: 2px solid var(--frame);
    border-radius: 8px;
    color: var(--white);
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.inventory-select:hover {
    border-color: var(--purple);
    background: rgba(124, 92, 255, 0.1);
}

.inventory-select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.3);
}

.inventory-select option {
    background: var(--board-bg);
    color: var(--white);
}

.inventory-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.1s linear;
    stroke-linecap: round;
}

.loading-text {
    color: var(--white);
    font-family: 'FFFORWA', 'Montserrat', 'Arial', sans-serif;
    font-size: 18px;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.loading-overlay.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
}

