:root {
    --green: #5cbb63;
    --green-bright: #7bd77f;
    --green-dark: #2f7838;
    --bg: #111318;
    --surface: #1a1d24;
    --surface-soft: #20242d;
    --text: #f2f4f3;
    --muted: #9ea4ae;
    --border: #303540;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 0%, rgba(92, 187, 99, 0.08), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.55;
}

button, input { font: inherit; }
button { cursor: pointer; }

.topbar {
    height: 72px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    display: grid;
    grid-template-columns: 220px 1fr 140px;
    align-items: center;
    gap: 20px;
    background: rgba(17, 19, 24, 0.94);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    width: 24px;
    height: 24px;
    display: block;
    background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    box-shadow: 0 0 18px rgba(92, 187, 99, 0.25);
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.tab-nav button,
.lang-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 8px;
    font-weight: 700;
}

.tab-nav button {
    padding: 9px 14px;
}

.tab-nav button:hover,
.lang-btn:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.tab-nav button.active {
    color: var(--green-bright);
    background: rgba(92, 187, 99, 0.12);
}

.lang-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.lang-btn { padding: 8px; font-size: 0.78rem; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.tabcontent {
    display: none;
    animation: reveal 0.24s ease-out;
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    min-height: 290px;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: end;
    gap: 32px;
    padding: 46px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(120deg, rgba(92, 187, 99, 0.12), transparent 55%),
        var(--surface);
}

.eyebrow,
.section-kicker,
.panel-label {
    color: var(--green-bright);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 8px 0 4px;
    font-size: clamp(3.2rem, 8vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 560px;
    margin: 16px 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.status-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    background: #151a18;
    border: 1px solid #29432e;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #777;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(92, 187, 99, 0.8); }
.status-dot.offline { background: #f05252; box-shadow: 0 0 10px rgba(240, 82, 82, 0.55); }

.server-panel {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(17, 19, 24, 0.72);
}

.link-row + .link-row {
    margin-top: 12px;
}

.link-row .ip-box {
    margin-top: 5px;
}

.compatibility-note {
    grid-column: 1 / -1;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #3a4d3c;
    border-radius: 10px;
    background: rgba(92, 187, 99, 0.07);
}

.compatibility-note strong {
    color: var(--green-bright);
}

.compatibility-note p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.compatibility-note.compact {
    margin: 18px 0 0;
}

.ip-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 10px;
}

.ip-box input {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.82rem;
}

.ip-box input:focus { border-color: var(--green); }

.ip-box button,
.primary-button {
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #081108;
    font-weight: 850;
}

.ip-box button { height: 44px; padding: 0 16px; }
.ip-box button:hover,
.primary-button:hover { background: var(--green-bright); }

.ip-box button:disabled {
    cursor: not-allowed;
    background: var(--border);
    color: var(--muted);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.commands-card { padding: 26px; }

.section-heading h2,
.quick-card h2,
.page-heading h2 {
    margin: 3px 0 18px;
    letter-spacing: -0.025em;
}

.commands-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
}

.commands-list li {
    min-height: 58px;
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border);
}

.commands-list li:first-child { border-top: 0; }
.commands-list code {
    color: var(--green-bright);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.9rem;
}
.commands-list span { color: var(--muted); }

.quick-card {
    padding: 24px;
    position: sticky;
    top: 92px;
}
.quick-card p { color: var(--muted); }
.primary-button {
    width: 100%;
    padding: 11px 14px;
    margin-top: 8px;
}

.page-heading {
    padding: 24px 4px 18px;
}
.page-heading h2 { font-size: 2.1rem; }
.page-heading p { margin: 0; color: var(--muted); }

.guide-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding: 28px;
    margin-bottom: 20px;
}

.step-badge,
.rule-number {
    color: var(--green-bright);
    font-weight: 900;
}
.step-badge {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(92, 187, 99, 0.12);
}
.guide-content h3 { margin: 4px 0 14px; font-size: 1.25rem; }
.join-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
    padding: 5px;
    width: fit-content;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.join-tab {
    border: 0;
    border-radius: 7px;
    padding: 8px 14px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}
.join-tab:hover { color: var(--text); }
.join-tab.active {
    background: rgba(92, 187, 99, 0.12);
    color: var(--green-bright);
}
.join-panel { display: none; }
.coming-soon-card { grid-template-columns: 1fr; }
.coming-soon-card p { color: var(--muted); }
.launch-link {
    display: inline-block;
    margin: 4px 0 14px;
    color: var(--green-bright);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 215, 127, 0.45);
}
.launch-link:hover {
    color: #a4e9a7;
    border-bottom-color: #a4e9a7;
}
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--green);
    color: #081108;
    font-weight: 850;
    text-decoration: none;
}
.download-button:hover { background: var(--green-bright); }
.download-format {
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(8, 17, 8, 0.12);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}
.instruction-list { margin: 0 0 0 18px; color: var(--muted); }
.instruction-list li { padding: 4px 0; }
.responsive-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.small-img { max-height: 82px; width: auto; }

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}
.auth-box {
    min-height: 220px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}
.auth-box h4 { margin: 0 0 12px; }
.auth-box code {
    display: block;
    padding: 10px;
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--green-bright);
    overflow-wrap: anywhere;
}
.auth-box p { color: var(--muted); font-size: 0.9rem; }

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.rule-card { padding: 24px; }
.rule-card h3 { margin: 8px 0 6px; }
.rule-card p { margin: 0; color: var(--muted); }
.rule-number { font-size: 0.82rem; }

.alternative-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.alternative-card,
.fallback-card {
    padding: 24px;
}

.alternative-card h3,
.fallback-card h3 {
    margin: 7px 0 14px;
}

.fallback-card {
    margin-top: 20px;
}

.fallback-card p {
    color: var(--muted);
}

.fallback-card .fallback-warning {
    margin: 14px 0 0;
    font-size: 0.88rem;
}

@media (max-width: 820px) {
    .topbar {
        height: auto;
        min-height: 72px;
        grid-template-columns: 1fr auto;
        padding: 12px 16px;
    }
    .tab-nav {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
    }
    .lang-toggle { grid-column: 2; grid-row: 1; }
    .hero { grid-template-columns: 1fr; align-items: start; padding: 30px 24px; }
    .content-grid { grid-template-columns: 1fr; }
    .quick-card { position: static; }
    .auth-grid, .rules-grid, .alternative-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .container { padding: 20px 12px 48px; }
    .topbar { grid-template-columns: 1fr auto; }
    .tab-nav button { white-space: nowrap; padding: 8px 10px; }
    .hero h1 { font-size: 3.4rem; }
    .ip-box { grid-template-columns: 1fr; }
    .ip-box button { width: 100%; }
    .commands-card { padding: 18px; }
    .commands-list li {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 12px 0;
    }
    .guide-card { grid-template-columns: 38px 1fr; padding: 20px 14px; }
}