:root {
    --bg: #0b0f14;
    --card: #121922;
    --card-2: #0f141b;
    --text: #cdd6e3;
    --muted: #91a1b9;
    --brand: #5aa5ff;
    --brand-2: #7df9c9;
    --border: #1f2a37;
    --link: #9ac7ff;
    --danger: #ff6b6b;
}
* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
        "Noto Sans KR", Arial, sans-serif;
    line-height: 1.85;
    -webkit-text-size-adjust: 100%;
}
p {
    line-height: 1.9;
    margin: 0 0 14px;
}
li {
    margin: 6px 0;
}
ul,
ol {
    padding-left: 1.25rem;
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-links {
    display: flex;
    gap: 20px;
    font-weight: 600;
}
.nav-links a {
    padding: 8px 10px;
    border-radius: 10px;
}
.nav-links a:hover {
    background: var(--card);
    text-decoration: none;
}

.hero {
    padding: 72px 0 48px;
    background: radial-gradient(
            1200px 600px at 20% -10%,
            rgba(90, 165, 255, 0.15),
            transparent 60%
        ),
        radial-gradient(
            900px 500px at 80% 0%,
            rgba(125, 249, 201, 0.12),
            transparent 60%
        );
    border-bottom: 1px solid var(--border);
}
.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
}
.h1 {
    margin: 16px 0 8px;
    font-size: clamp(28px, 5vw, 44px);
    letter-spacing: -0.02em;
}
.h2 {
    font-size: 24px;
    margin: 0 0 12px;
}
.h3 {
    font-size: 18px;
    margin: 18px 0 10px;
    color: var(--muted);
    font-weight: 600;
}
.lead {
    color: var(--muted);
    max-width: 900px;
    line-height: 1.8;
}

.cta-row {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
}
.btn.primary {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--brand) 60%, #000 40%),
        color-mix(in srgb, var(--brand) 40%, #000 60%)
    );
    border: none;
}
.btn.secondary {
    background: var(--card);
}
.btn.small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 24px;
}
.grid.features {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 28px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
}
.card h3 {
    margin-top: 0;
}
.mono {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
        "Liberation Mono", monospace;
    font-size: 13px;
    color: #b8c4d6;
}

section {
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}
section.alt {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--card-2) 80%, transparent)
    );
}
.two-col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}
@media (max-width: 960px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

.kbd {
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 6px;
    background: #0c121a;
}
pre,
code {
    background: #0c121a;
    color: #d7e0ee;
}
pre {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    white-space: pre;
}
pre > code {
    display: block;
    min-width: 0;
}

footer {
    padding: 40px 0 60px;
    color: var(--muted);
}
.small {
    font-size: 13px;
    color: var(--muted);
}
.tag {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    margin-right: 6px;
}
.pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #102033;
    color: #b7d4ff;
    border: 1px solid #1f3350;
    font-size: 12px;
}

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.tabs button {
    background: none;
    border: 1px solid var(--border);
    border-bottom: none;
    color: var(--muted);
    padding: 8px 10px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
}
.tabs button.active {
    color: var(--text);
    background: var(--card);
}
.tabpanel {
    display: none;
}
.tabpanel.active {
    display: block;
}

.note {
    padding: 12px 14px;
    border-left: 4px solid var(--brand);
    background: #0e1621;
    border-radius: 8px;
}
.warn {
    padding: 12px 14px;
    border-left: 4px solid var(--danger);
    background: #1a1212;
    border-radius: 8px;
}

.top-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 0;
    border-bottom: 1px solid var(--border);
}
.top-tabs button {
    background: none;
    border: 1px solid var(--border);
    border-bottom: none;
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: 600;
}
.top-tabs button.active {
    color: var(--text);
    background: var(--card);
}
.pane {
    display: none;
}
.pane.active {
    display: block;
}
.sep {
    opacity: 0.5;
    margin: 0 8px;
}
.hidden {
    display: none !important;
}

footer .container.small img {
    height: 3.5em;
    width: auto;
    margin-right: 8px;
    vertical-align: -0.15em;
}

#btnTop {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 70%, transparent);
    backdrop-filter: blur(6px);
    cursor: pointer;
    z-index: 60;
}
#btnTop:hover {
    border-color: var(--link);
}
#btnTop svg {
    display: block;
}

@media (max-width: 600px) {
    #btnTop {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        right: calc(12px + env(safe-area-inset-right, 0px));
        width: 40px;
        height: 40px;
    }
}

section,
.hero,
#server-overview {
    scroll-margin-top: 80px;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

@media (max-width: 820px) {
    nav {
        height: auto;
        padding: 8px 0;
        gap: 8px;
        align-items: flex-start;
    }
    .nav-links {
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .cta-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .hero {
        padding: 56px 0 36px;
    }

    .h2 {
        font-size: clamp(18px, 4.5vw, 24px);
    }
    .h3 {
        font-size: clamp(16px, 3.8vw, 18px);
    }
    .lead {
        font-size: clamp(14px, 2.9vw, 16px);
    }

    .btn {
        padding: 11px 14px;
    }
    .card {
        padding: 18px;
    }

    .tabs,
    .top-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar,
    .top-tabs::-webkit-scrollbar {
        display: none;
    }
    .tabs button,
    .top-tabs button {
        flex: 0 0 auto;
    }

    #demo .grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
    pre {
        font-size: 12px;
    }
    .small {
        font-size: 12px;
    }
    .nav-links a {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 16px;
    }
}

details > summary.mono {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.mono {
    overflow-wrap: anywhere;
    word-break: break-word;
}
pre .mono,
pre code {
    overflow-wrap: normal;
    word-break: normal;
}
@media (max-width: 820px) {
    header .pill,
    header .small {
        display: none;
    }
}

.media-card {
    padding: 0;
    overflow: hidden;
}
.media-card > img,
.media-card > video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.media-card iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}
.ratio-16x9 {
    aspect-ratio: 16 / 9;
}
@media (max-width: 720px) {
    #demo .grid {
        grid-template-columns: 1fr !important;
    }
}
