/* ── Base — page serveurs ── */

html, body {
    overflow: hidden !important;
    height: 100% !important;
}

.main {
    min-height: unset !important;
    height: 100vh;
    overflow: hidden;
}

.content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
}

/* Card */
.server-card {
    background: rgba(10,10,10,0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 1;
}

.server-card:nth-child(1)::before { background: #7d53ff; }
.server-card:nth-child(2)::before { background: #ebaf2b; }
.server-card:nth-child(3)::before { background: #c5412b; }

.server-illu-wrap {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.server-illu {
    width: 100%;
    object-fit: cover;
    display: block;
}

.server-status {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* Body */
.server-body {
    display: flex;
    flex-direction: column;
}

.server-head {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.server-name {
    font-family: 'Bebas Neue', sans-serif;
    color: #e0e0e0;
    line-height: 1;
    text-align: center;
}

.server-sub {
    color: #444;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
}

.badge i {
    font-size: 7px;
    margin-right: 4px;
}

/* Stats */
.server-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-right {
    text-align: right;
}

.stat-key {
    color: #333;
    text-transform: uppercase;
    font-family: var(--font-display), sans-serif;
}

.stat-val {
    color: #aaa;
}

.stat-val.mono {
    font-family: monospace;
    color: #666;
}

/* Joueurs */
.players-bar {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.players-fill {
    height: 100%;
    border-radius: 4px;
}

.players-count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    color: #e0e0e0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    z-index: 1;
}

.server-card:nth-child(1) .players-fill { background: #7d53ff; }
.server-card:nth-child(2) .players-fill { background: #ebaf2b; }
.server-card:nth-child(3) .players-fill { background: #c5412b; }

/* Actions */
.server-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.server-actions .btn-copy { justify-self: start; }
.server-actions .btn-rust,
.server-actions .btn-disabled { justify-self: center; }
.server-actions .btn-map { justify-self: end; }

.btn-copy,
.btn-map {
    color: #fff;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.server-actions .btn {
    padding: 10px 18px;
    font-size: 14px;
}

.btn-map:hover:not(:disabled) { opacity: 0.85; }
.btn-copy:hover { opacity: 0.85; }

.btn-map:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Tooltips V-KORP */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display), sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    color: #e0e0e0;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

.btn-copy { background: #4caf50; }

.server-card:nth-child(1) .btn-map { background: #7d53ff; }
.server-card:nth-child(2) .btn-map { background: #ebaf2b; }
.server-card:nth-child(3) .btn-map { background: #c5412b; }

.btn-disabled {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #444;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Modal map ── */
.map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.map-modal.open { display: flex; }

.map-modal-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.map-modal-title {
    font-family: 'Bebas Neue', sans-serif;
    color: #e0e0e0;
    font-size: 22px;
    letter-spacing: 3px;
}

.map-modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #0a0a0a;
}

.map-modal-close {
    position: absolute;
    top: -40px;
    right: -8px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    font-family: 'Bebas Neue', sans-serif;
}

.map-modal-close:hover { color: #c5412b; }


/* ── 1080p ── */
@media (max-width: 2559px) {
    .content        { padding: 24px 36px; }
    .servers-grid   {
        grid-template-columns: repeat(3, 400px);
        justify-content: center;
        gap: 20px;
    }

    .server-illu    { height: 250px; }

    .server-body    { padding: 16px 20px; gap: 20px; }

    .server-head    { gap: 6px; }
    .badge          { padding: 3px 10px; font-size: 12px; letter-spacing: 1px; }
    .server-name    { font-size: 26px; letter-spacing: 2px; }
    .server-sub     { font-size: 11px; letter-spacing: 1px; }

    .server-stats   { gap: 22px; }
    .stat-key       { font-size: 12px; letter-spacing: 1px; margin-bottom: 3px; }
    .stat-val       { font-size: 15px; }
    .stat-val.mono  { font-size: 11px; }

    .server-players { display: flex; flex-direction: column; gap: 5px; }
    .players-count  { font-size: 16px; }
    .players-bar    { height: 20px; }

    .server-actions { gap: 10px; }
    .server-actions .btn {
        font-size: 14px;
        padding: 10px 18px;
    }

}

/* ── 1440p+ ── */
@media (min-width: 2560px) {
    .content        { padding: 32px 48px; }
    .servers-grid   {
        grid-template-columns: repeat(3, 600px);
        justify-content: center;
        gap: 28px;
    }

    .server-illu    { height: 375px; }

    .server-body    { padding: 24px 28px; gap: 18px; }

    .server-head    { gap: 8px; }
    .badge          { padding: 4px 14px; font-size: 16px; letter-spacing: 1px; }
    .server-name    { font-size: 34px; letter-spacing: 3px; }
    .server-sub     { font-size: 14px; letter-spacing: 1px; }

    .server-stats   { gap: 30px; }
    .stat-key       { font-size: 15px; letter-spacing: 1px; margin-bottom: 4px; }
    .stat-val       { font-size: 19px; }
    .stat-val.mono  { font-size: 14px; }

    .server-players { display: flex; flex-direction: column; gap: 7px; }
    .players-count  { font-size: 22px; }
    .players-bar    { height: 20px; }

    .server-actions { gap: 14px; }
    .server-actions .btn {
        font-size: 18px;
        padding: 14px 24px;
    }

}
