:root {
    --primary-color: #0366d6;
    --text-color: #24292e;
    --background-color: #ffffff;
    --border-color: #e1e4e8;
    --code-bg-color: rgba(27, 31, 35, 0.05);
    --pre-bg-color: #f6f8fa;
    --blockquote-color: #6a737d;
    --blockquote-border: #dfe2e5;
    --footer-color: #6a737d;
    --github-button-bg: #24292e;
    --github-button-hover: #1a1f23;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
        Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin-top: 0;
    margin-bottom: 1em;
    margin-left: 1em;
    margin-right: 1em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.5rem;
}
img {
    max-width: 780px;
}

main {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background-color: var(--code-bg-color);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 85%;
}

pre {
    background-color: var(--pre-bg-color);
    border-radius: 6px;
    padding: 16px;
    overflow: scroll;
}

pre code {
    background-color: transparent;
    padding: 0;
}

blockquote {
    padding: 0 1em;
    color: var(--blockquote-color);
    border-left: 0.25em solid var(--blockquote-border);
    margin: 0 0 16px 0;
}

footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--footer-color);
    font-size: 0.9em;
}

.repo-link {
    margin-top: 2rem;
    text-align: center;
}

.github-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--github-button-bg);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.github-button:hover {
    background-color: var(--github-button-hover);
    text-decoration: none;
}

.github-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

@media (max-width: 600px) {
    .container {
        padding: 0.25rem;
    }
    img {
        max-width: 90%;
    }
    main {
        padding: 0.75rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Hide bottom button on mobile */
    .mobile-bottom {
        display: none;
    }

    /* Style top button for mobile */
    .mobile-top {
        margin: 0 0 1rem 0;
    }

    .github-button {
        width: 90%;
        justify-content: center;
        border-radius: 6px;
    }
}

/* Hide top button on desktop */
@media (min-width: 601px) {
    .mobile-top {
        display: none;
    }
}
