/* Base styles inspired by bettermotherfuckingwebsite.com */
:root {
    --sans-font:
        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --header-bg: #6eb3ff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--sans-font);
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header styles */
header {
    background-color: var(--header-bg);
    padding: 1.25rem calc(1.5rem + env(safe-area-inset-right, 0px)) 1.25rem
        calc(1.5rem + env(safe-area-inset-left, 0px));
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    background: linear-gradient(135deg, #fa5c5c, #f96bc6);
}

.header-download:hover {
    background: linear-gradient(135deg, #e54a4a, #d55ba8);
}

.header-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.25rem;
}

.header-icon {
    width: 32px;
    height: 32px;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.header-nav a:hover {
    text-decoration: underline;
}

/* Main content centered layout */
main {
    max-width: 650px;
    margin: 2rem auto;
    padding: 0 calc(1rem + env(safe-area-inset-right, 0px)) 0
        calc(1rem + env(safe-area-inset-left, 0px));
}

/* Override main constraints for pages with sidebar */
main:has(.page-container) {
    max-width: none;
    padding: 0;
}

/* Page container for docs/release-notes with sidebar */
.page-container {
    padding: 0 calc(1rem + env(safe-area-inset-right, 0px)) 0
        calc(1rem + env(safe-area-inset-left, 0px));
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
    justify-content: center;
}

.page-content {
    max-width: 650px;
    width: 100%;
}

.page-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.page-sidebar .toc {
    position: sticky;
    top: 1rem;
}

.page-sidebar .toc h2 {
    font-size: 1rem;
    margin-top: 0;
}

.page-sidebar .toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.page-sidebar .toc ul ul {
    padding-left: 1rem;
}

.page-sidebar .toc a {
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    color: #6eb3ff;
}

.page-sidebar .toc a:hover {
    text-decoration: underline;
}

.page-sidebar .toc a:visited {
    color: #d76eff;
}

/* Footer styles */
footer {
    margin-top: 4rem;
    padding: 1.5rem calc(1rem + env(safe-area-inset-right, 0px))
        calc(1.5rem + env(safe-area-inset-bottom, 0px))
        calc(1rem + env(safe-area-inset-left, 0px));
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid #ddd;
}

.footer-icons {
    display: flex;
    gap: 1rem;
}

.footer-icons a {
    color: #333;
    font-size: 1.5rem;
}

.footer-icons a:hover {
    color: #000;
}
