html {
    font-size: 14px;
    min-height: 100%;
    position: relative;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body { margin-bottom: 60px; }

/* Brand: colours and fonts come from berrevoets-bootstrap.css, which loads last. Use its variables, not hex values. */

.navbar-brand { line-height: 0; }

.brand-logo {
    height: 44px;
    width: auto;
}

.only-dark { display: none; }

[data-bs-theme="dark"] .only-light { display: none; }

[data-bs-theme="dark"] .only-dark { display: inline-block; }

.home-hero {
    margin: 2rem 0;
    max-width: 44rem;
}

.game-card-img {
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.game-card-art {
    align-items: center;
    aspect-ratio: 16 / 7;
    background-color: var(--bs-tertiary-bg);
    display: flex;
    justify-content: center;
}

.game-card-art img {
    height: 6rem;
    width: auto;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }

/* API Documentation styles */

.api-section { padding: 1rem 0; }

.api-intro {
    background-color: var(--bs-tertiary-bg);
    border-left: 4px solid var(--bs-link-color);
    border-radius: 0.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.api-info { margin-bottom: 2rem; }

.tag-section {
    border-top: 1px solid var(--bs-border-color);
    padding-top: 1rem;
}

/* Game-specific API documentation styles */

.game-banner img {
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

/* Code and parameter styling */

pre {
    background-color: var(--bs-tertiary-bg);
    border-radius: 0.25rem;
    margin: 1rem 0;
    overflow-x: auto;
    padding: 1rem;
}

code {
    background-color: var(--bs-tertiary-bg);
    border-radius: 0.25rem;
    color: var(--bs-code-color);
    font-family: var(--bs-font-monospace);
    font-size: 0.875em;
    padding: 0.2rem 0.4rem;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.card-header code {
    font-size: 1rem;
    word-break: break-word;
}

.badge {
    font-size: 0.85rem;
    min-width: 60px;
    text-align: center;
}

#api-docs-container { counter-reset: section; }

.tag-section h3:before {
    content: counter(section) ". ";
    counter-increment: section;
}

@media print {
    .navbar, .footer, #exportPdf { display: none !important; }

    body {
        margin: 0;
        padding: 0;
    }

    .container {
        margin: 0;
        max-width: 100%;
        padding: 0;
        width: 100%;
    }
}

/* API documentation code blocks in dark mode: .bg-light and .bg-dark are fixed colours in Bootstrap */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .bg-dark {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

/* Theme toggle button styles */

#theme-toggle {
    align-items: center;
    border-radius: 50%;
    display: flex;
    height: 40px;
    justify-content: center;
    padding: 0.25rem;
    width: 40px;
}

#theme-toggle i { font-size: 1.25rem; }

/* Custom confirm modal styling */

.modal-content {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-xl);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.5rem;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
}

/* Add some animation */

.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog { transform: scale(1); }

/* API Documentation theme-aware styles */
.api-example-box {
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-body-color, #212529);
}

.api-curl-box {
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-body-color, #212529);
}

/* Theme-specific overrides */
[data-bs-theme="dark"] .api-example-box .api-curl-box {
    background-color: var(--bs-dark, #212529);
    color: var(--bs-light, #f8f9fa);
    border-color: var(--bs-border-color, #495057) !important;
}

[data-bs-theme="light"] .api-example-box .api-curl-box {
    background-color: var(--bs-light, #f8f9fa);
    color: var(--bs-dark, #212529);
    border-color: var(--bs-border-color, #dee2e6) !important;
}

/* Ensure code blocks have proper contrast */
.api-example-box pre,
.api-curl-box pre {
    color: inherit;
    background: transparent;
}