/* Easy Multiplayer Documentation — Shared Styles */

:root {
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --bg-code: #f0f2f5;
    --text: #1a1a2e;
    --text-muted: #57606a;
    --accent: #0550ae;
    --accent-light: #ddf4ff;
    --border: #d0d7de;
    --sidebar-width: 260px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Layout */
.page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-logo a {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.sidebar-logo span {
    color: var(--accent);
}

.sidebar nav a {
    display: block;
    padding: 7px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.sidebar nav a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
}

.sidebar nav a.active {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}

.sidebar nav .section-label {
    display: block;
    padding: 16px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Main content */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    max-width: 820px;
    padding: 48px 48px 96px;
}

.content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.content h3 {
    font-size: 17px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.content p {
    margin-bottom: 16px;
}

.content ul, .content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content li {
    margin-bottom: 6px;
}

.content a {
    color: var(--accent);
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 400;
}

/* Hero (home page) */
.hero {
    padding: 32px 0 40px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 12px;
}

.hero .subtitle {
    font-size: 20px;
    margin-bottom: 24px;
}

.hero .cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    margin-right: 12px;
}

.hero .cta:hover {
    background: #033d8b;
    text-decoration: none;
}

.hero .cta-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.hero .cta-secondary:hover {
    background: var(--accent-light);
}

/* Feature grid (home page) */
.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0 32px;
}

.feature {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
}

.feature h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 15px;
}

.feature p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Code blocks */
pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* Syntax highlighting (minimal, inline) */
.kw { color: #cf222e; }   /* keywords: const, var, function, if, for, return */
.str { color: #0a3069; }  /* strings */
.fn { color: #8250df; }   /* function names */
.cm { color: #6e7781; }   /* comments */
.num { color: #0550ae; }  /* numbers */
.prop { color: #953800; } /* properties */

/* Info boxes */
.info-box {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-box.tip {
    background: #dafbe1;
    border-left: 4px solid #2da44e;
}

.info-box.warning {
    background: #fff8c5;
    border-left: 4px solid #d4a72c;
}

.info-box.note {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
}

.info-box strong {
    display: block;
    margin-bottom: 4px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
}

th {
    background: var(--bg-alt);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    .sidebar nav .section-label { display: none; }

    .sidebar nav a {
        padding: 6px 14px;
        font-size: 13px;
    }

    .page { flex-direction: column; }

    .content {
        margin-left: 0;
        padding: 24px 20px 64px;
    }

    .features { grid-template-columns: 1fr; }

    .hero h1 { font-size: 28px; }
}
