.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.server-card {
    background: #2c2c2c;
    border: 3px solid #3ca374;
    border-radius: 6px;
    overflow: hidden;
    cursor: default;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 300px;
    width: 100%;
}

.server-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 8px #3ca374;
}

.server-banner {
    width: 100%;
    height: 50px;
    object-fit: cover;
    image-rendering: pixelated;
}

.server-info {
    display: flex;
    flex-direction: row;
    padding: 0.5rem;
    gap: 0.5rem;
}

.tags {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 60px;
}

.tags span {
    background: #2a2a2a;
    border: 1px solid #3ca374;
    border-radius: 3px;
    padding: 0.2rem 0.3rem;
    font-size: 0.7rem;
}

.separator-vertical {
    width: 2px;
    background: #3ca374;
}

.description {
    flex: 1;
    font-size: 0.7rem;
    line-height: 1rem;
}

.separator-horizontal {
    height: 2px;
    background: #3ca374;
    margin: 0.5rem 0;
}

.btn-info {
    display: block;
    width: 90%;
    margin: 0.5rem auto;
    padding: 0.4rem;
    font-size: 0.85rem;
    background: #3ca374;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease-in-out;
}

.btn-info:hover {
    background: #2fa060;
    box-shadow: 0 0 6px #3ca374;
}

#popup-card.hidden {
    display: none;
}

#popup-card {
    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: 100;
}

.popup-content {
    background: #1e1e1e;
    border: 3px solid #3ca374;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px #3ca374;
    animation: popupIn 0.2s ease-out;
}

@keyframes popupIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-banner {
    width: 100%;
    height: 120px;
    object-fit: cover;
    image-rendering: pixelated;
    position: relative;
}

.popup-content .server-pdp {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: absolute;
    bottom: auto;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.popup-inner {
    padding: 2rem 1rem 1rem;
    margin-top: 10px;
    text-align: left;
}

.top-section {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tags-column {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    gap: 0.3rem 0.6rem;
}
.tags-column span {
    background:#2a2a2a;
    border:1px solid #3ca374;
    border-radius:3px;
    padding:0.2rem 0.4rem;
    font-size:0.8rem;
}


.info-column {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #ddd;
    flex: 1;
}

.separator-vertical {
    width: 2px;
    background: #3ca374;
    align-self: stretch;
}

.main-desc {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.3rem;
    color: #ddd;
}

.extra-info {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #ccc;
}

.extra-info a {
    color: #3ca374;
    text-decoration: none;
}

.extra-info a:hover {
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #3ca374;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    z-index: 2;
}

.btn-join {
    background: #3ca374;
    border: none;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
    transition: all 0.15s ease-in-out;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-join:hover {
    background: #2fa060;
    box-shadow: 0 0 8px #3ca374;
}

@media(max-width: 600px) {
    .top-section {
        flex-direction: column;
    }
    .tags-column {
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .separator-vertical {
        display: none;
    }
}