/* ============================================================
   SERVERLISTE – GRID & RESPONSIVE
   ============================================================ */

.server-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px;
}

/* Tablet */
@media (max-width: 1100px) {
    .server-container {
        grid-template-columns: repeat(2, minmax(320px, 1fr));
    }
}

/* Mobile */
@media (max-width: 700px) {
    .server-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SERVERBOX – BASIS
   ============================================================ */

.server-box {
    display: flex;
    justify-content: space-between;
    align-items: stretch;

    background: rgba(30, 30, 30, 0.6);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;

    color: #f1f1f1;
    cursor: pointer;

    backdrop-filter: blur(4px);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.server-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   STATUS-BORDER
   ============================================================ */

.border-good {
    border-color: #2ecc71;
}

.border-warn {
    border-color: #f1c40f;
}

.border-offline {
    border-color: #e74c3c;
}

/* ============================================================
   CONTENT-BEREICHE
   ============================================================ */

.server-box .left {
    max-width: 65%;
    position: relative;          /* nötig für Ping unten links */
    padding-bottom: 34px;        /* Platz für Ping */
}

.server-box .right {
    position: relative;
    max-width: 30%;
    text-align: right;
    font-size: 13px;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.server-box .right > div:first-child {
    position: absolute;
    top: 0;
    right: 0;
    white-space: nowrap;       /* KEIN Zeilenumbruch */
    overflow: hidden;
    text-overflow: ellipsis;   /* optional */
    pointer-events: none;
}

/* ============================================================
   TEXT & TYPOGRAFIE
   ============================================================ */

.server-box h3 {
    margin: 0;
    font-size: 18px;
    color: #ff9f1c;
}

.subtext {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 6px;
}

.ip {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 8px;
    word-break: break-all;
}

.info {
    font-size: 13px;
    margin-bottom: 8px;
}

.checked {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

/* ============================================================
   PING-ANZEIGE – UNTEN LINKS FIXIERT
   ============================================================ */

.ping-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
}

.ping {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

/* Punkt */
.ping-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Farben */
.ping-good .ping-dot {
    background: #2ecc71;
}

.ping-warn .ping-dot {
    background: #f1c40f;
}

.ping-high .ping-dot {
    background: #e67e22;
}

.ping-offline .ping-dot {
    background: #e74c3c;
}

/* ============================================================
   SERVER-BILD – UNTEN RECHTS
   ============================================================ */

.server-image {
    margin-top: 10px;
    align-self: flex-end;
}

.server-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;   /* Bild immer komplett sichtbar */
    border-radius: 6px;
    opacity: 0.9;
}

/* ============================================================
   TRENNLINIEN (ONLINE / OFFLINE)
   ============================================================ */

.status-separator {
    grid-column: 1 / -1;
    margin: 35px 0 15px;
    padding-top: 10px;
    border-top: 1px solid #444;
    font-size: 13px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   LEGENDE / HINWEIS
   ============================================================ */

.status-legend {
    grid-column: 1 / -1;
    margin: 40px auto 10px;
    padding: 14px 26px;
    width: fit-content;
    background: rgba(30, 30, 30, 0.45);
    border: 1px solid #555;
    border-radius: 999px;
    font-size: 18px;
    opacity: 0.9;
    text-align: center;
}

/* ============================================================
   Leerfelder Stabilisierung
   ============================================================ */

.subtext {
    min-height: 16px; /* Platz reservieren */
}

.server-box .right > div {
    min-height: 16px;
}

.server-box .right {
    min-height: 120px; /* sorgt für gleichmäßige Boxen */
}

/* ============================================================
   COPY-FEEDBACK
   ============================================================ */

.server-box {
    position: relative;
}

.server-box::after {
    content: "Kopiert!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);

    background: rgba(46, 204, 113, 0.95);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.server-box.copied::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
