body {
    background: #1a1a1a;
    color:white;
    font-family: "Segoe UI", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
#status {font-weight: bold;}
.status-connecting{color: #ffaa00}
.status-online{color: green}
.status-offline{color: red}

.grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.item-card{
    background: #2d2d2d;
    border: 1px solid grey;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.9);
}
.item-card:hover {
    background: #3d3d3d;
    border-color: #666;
    transform: translate(-3px);
}
.item-img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    margin-bottom: 10px;
}
.item-name {
    font-size: 13px;
    color: #aaa;
    word-wrap: break-word;
}
.item-count{
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-top: 5px;
}
.button-group {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    justify-content: center;
}
.request-btn {
    background: #666;
    border: 2px solid black;
    border-top-color: #5b5b5b;
    border-left-color: #5b5b5b;
    color:white;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background 0.1s;
}
.request-btn:hover {
    background: #8b8b8b;
    border: 2px solid white;
    border-top-color: black;
    border-left-color: black;
}
.request-btn:active {
    background: #5b5b5b;
    border: 2px solid white;
    border-top-color: black;
    border-left-color: black;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(33,33,33,0.9);
    padding: 12px 12px;
    z-index: 1000;
    pointer-events: none;
    animation: toast-animation 2s;
}
@keyframes toast-animation {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    10% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 10px;
}

.search-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

#search-input:focus {
    border-color: #888;
    background: #333;
}

#search-input::placeholder {
    color: #888;
}


@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    .item-card {
        padding: 8px;
    }

    .button-group {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 6px;
    }

    .request-btn {
        padding: 12px 5px; 
        font-size: 14px;
        min-height: 44px; 
    }

    .item-name {
        font-size: 14px;
        height: 2.4em; 
        overflow: hidden;
    }

    #search-input {
        font-size: 14px;
        padding: 10px;
    }
}

