:root {
    color-scheme: dark;
    --bg: #0e1117;
    --panel: #191f2a;
    --border: #303b4e;
    --text: #edf2f9;
    --muted: #aab6c7;
    --accent: #65b3ff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 Arial, sans-serif;
}

a { color: var(--accent); }

a:hover { color: #a7d8ff; }

header {
    border-bottom: 1px solid var(--border);
    background: #141922;
}

nav {
    max-width: 960px;
    margin: auto;
    padding: 17px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.brand {
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
}

.nav-link { text-decoration: none; }

main {
    max-width: 960px;
    margin: auto;
    padding: 60px 22px 80px;
}

.hero { text-align: center; margin-bottom: 40px; }

h1 {
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.2;
    margin: 0 0 20px;
}

h2 { margin-top: 0; }

.subtitle { color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 22px;
}

.server-link {
    display: block;
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, transform .2s;
}

.server-link:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    color: var(--text);
}

.tag {
    color: var(--accent);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connection {
    text-align: center;
    margin: 28px 0;
    padding: 25px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #101722;
}

.address {
    font-size: clamp(20px, 4vw, 29px);
    font-weight: bold;
    color: var(--accent);
    overflow-wrap: anywhere;
}

.port { color: var(--muted); margin: 12px 0; }

button {
    background: #287bd0;
    border: 0;
    border-radius: 7px;
    padding: 11px 18px;
    color: white;
    font: inherit;
    cursor: pointer;
    margin: 5px;
}

button:hover { background: #3997ed; }
button:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.links { padding-left: 22px; }
.links li { margin: 12px 0; }

.muted { color: var(--muted); }
.back { margin-top: 30px; }

footer {
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding: 25px;
    font-size: 14px;
}

@media (max-width: 600px) {
    main { padding-top: 35px; }
    .card { padding: 21px; }
}
