/* ------------------------------
   GLOBAL FONT + BASE STYLE
------------------------------ */
body {
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #e8ffe8;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------
   LOADING OVERLAY
------------------------------ */
.loading-overlay {
    position: fixed;
    inset: 0;
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ------------------------------
   CONTROLS (SUCHEN + SORTIEREN)
------------------------------ */
.controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

#searchInput,
#sortSelect {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #dddddd;
    background: #1a1a1a;
    color: #e8ffe8;
}

#searchInput {
    flex: 1;
}

/* ------------------------------
   GRID
------------------------------ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* ------------------------------
   DEVICE CARD
------------------------------ */
.card {
    background-color: #122417;
    border: 1px solid #4cae50;
    border-radius: 10px;
    padding: 15px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border-color: #5edb63;
}

.card h3 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 600;
    color: #c8ffc8;
}

.card .info {
    font-size: 14px;
    opacity: 0.9;
}

/* ------------------------------
   POPUP
------------------------------ */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-content {
    background: #1a1a1a;
    border: 1px solid #dddddd;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: white;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.card.offline {
    border-color: #ff4444;
    background: #3a0f0f;
}