body { 
    font-family: sans-serif; 
    background-color: #f9fafb; 
    color: #333; 
    margin: 0; 
    padding: 20px; 
    transition: background-color 0.3s, color 0.3s;
}

.container { 
    max-width: 1200px;
    margin: auto; 
    background: #ffffff; 
    padding: 20px 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
    transition: background-color 0.3s, color 0.3s; 
}

.nav {
    margin-bottom: 1rem;
}

.dashboard-nav {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dashboard-nav a {
    margin: 0 0.35rem;
}

.network-overview {
    margin: 28px 0 48px;
}

.network-overview h2 {
    text-align: center;
}

.network-intro,
.network-updated {
    text-align: center;
}

.network-map-style {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: fit-content;
    margin: 16px auto 0;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
}

.network-map-style select {
    padding: 0.35rem 1.8rem 0.35rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font: inherit;
}

.network-map {
    display: block;
    width: 100%;
    height: auto;
    margin: 20px auto 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f6f8fa;
}

.peer-count {
    margin: 24px 0 8px;
    color: #555;
    font-size: 0.9em;
}

.table-wrap.peer-table-wrap {
    max-width: none;
    margin: 0 auto 24px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #f4f4f4;
    overflow-x: auto;
    overflow-y: hidden;
}

.peering-table.current-peers-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    min-width: 840px;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.current-peers-table .peer-col-asn {
    width: 11%;
}

.current-peers-table .peer-col-network {
    width: 19%;
}

.current-peers-table .peer-col-organization {
    width: 30%;
}

.current-peers-table .peer-col-country {
    width: 17%;
}

.current-peers-table .peer-col-router {
    width: 23%;
}

.peering-table.current-peers-table th,
.peering-table.current-peers-table td {
    vertical-align: top;
    white-space: normal;
}

.peering-table.current-peers-table th:first-child,
.peering-table.current-peers-table td:first-child {
    white-space: nowrap;
}

.current-peers-table td:nth-child(2),
.current-peers-table td:nth-child(3) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.current-peers-table td:nth-child(5) .router-badge {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 5px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.current-peers-table td:nth-child(5) .router-badge:last-child {
    margin-bottom: 0;
}

.current-peers-table th:first-child,
.current-peers-table td:first-child {
    position: sticky;
    left: 0;
}

.current-peers-table th:first-child {
    z-index: 2;
}

.current-peers-table td:first-child {
    z-index: 1;
    background: #f4f4f4;
}

.router-badge {
    display: inline-block;
    margin: 2px 5px 2px 0;
    padding: 3px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    font-size: 0.82em;
    white-space: nowrap;
}

h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 0.5em;
    text-align: center;
}

p {
    color: #555;
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
}

footer {
    text-align: center;
    margin-top: 20px;
}

.info { 
    margin-top: 20px; 
    padding: 10px 15px; 
    border-radius: 8px; 
    font-size: 0.9em; 
    max-width: 400px; 
    margin-left: auto; 
    margin-right: auto; 
    text-align: center; 
    border: 2px solid #ddd; 
    background-color: inherit; 
    transition: color 0.3s, border-color 0.3s;
}

.connected {
    color: #28a745;
    border-color: #28a745;
}

.not-connected {
    color: #dc3545;
    border-color: #dc3545;
}

.details { 
    margin-top: 15px; 
    padding: 15px 20px; 
    border-radius: 8px; 
    background-color: #f4f4f4; 
    font-size: 0.85em; 
    border: 1px solid #ddd; 
    max-width: 400px; 
    margin-left: auto; 
    margin-right: auto; 
    transition: background-color 0.3s, border-color 0.3s;
}

.table-wrap {
    min-width: auto;
    max-width: fit-content;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

.peering-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95em;
}

.peering-table th,
.peering-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.peering-table th {
    background-color: #eeeeee;
    color: #333;
    font-weight: 600;
}

.peering-table td {
    color: #333;
}

.peering-table tr:last-child td {
    border-bottom: none;
}

.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #28a745;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.6s infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 0.45rem rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.details.special-asn {
    border-color: rgba(212, 175, 55, 0.95);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.35),
        0 0 14px rgba(212, 175, 55, 0.35),
        0 0 28px rgba(212, 175, 55, 0.18);
}

.asn-highlight {
    color: #d4af37;
    font-weight: 700;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 16px;
    }

    .peering-table {
        font-size: 0.85em;
    }

    .peering-table th,
    .peering-table td {
        padding: 10px 12px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #f0f0f0;
    }

    .container {
        background-color: #1e1e1e;
        color: #f0f0f0;
    }

    h1 {
        color: #ffffff;
    }

    p {
        color: #cccccc;
    }

    a {
        color: #66aaff;
    }

    .connected {
        color: #36c48d;
        border-color: #36c48d;
    }

    .not-connected {
        color: #c43e3e;
        border-color: #c43e3e;
    }

    .details {
        background-color: #2a2a2a;
        border-color: #444;
        color: #f0f0f0;
    }

    .details.special-asn {
        border-color: transparent;
    }

    .peering-table {
        background-color: #2a2a2a;
        border-color: #444;
    }

    .peering-table th {
        background-color: #242424;
        color: #f0f0f0;
    }

    .peering-table td {
        color: #f0f0f0;
    }

    .peering-table th,
    .peering-table td {
        border-bottom-color: #444;
    }

    .network-map {
        border-color: #444;
        background: #0d1117;
    }

    .network-map-style {
        color: #ccc;
    }

    .network-map-style select {
        border-color: #555;
        background: #242424;
        color: #f0f0f0;
    }

    .peer-count {
        color: #ccc;
    }

    .table-wrap.peer-table-wrap {
        background: #2a2a2a;
    }

    .current-peers-table td:first-child {
        background: #2a2a2a;
    }

    .router-badge {
        border-color: #555;
        background: #242424;
    }
}
.muted {
     color: #777;
     font-size: 0.9em;
}
