/* For Review */
:root {
    --nav-height: 48px;
}

.site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: var(--nav-height);
    border-bottom: 2px solid black;
    box-sizing: border-box;
    flex-shrink: 0;
    font-family: sans-serif;
    position: relative;
    /* For absolute positioning of menu on mobile */
    /* Width auto and no margin by default (home page has no body padding) */
    width: 100%;
    margin: 0;
    padding: 0 1.25rem;
}

.hamburger {
    display: none;
    background: none;
    border: 1px solid black;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 2px 8px;
}

.nav-menu {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 16px;
}

.site-nav .nav-slot {
    /* Removed fixed width to normalize spacing */
    /* For Review */
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-nav .nav-theme-btn {
    background: none;
    border: 1px solid currentColor;
    cursor: pointer;
    padding: 2px 6px;
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: white;
        border-bottom: 2px solid black;
        padding: 10px;
        box-sizing: border-box;
        z-index: 1000;
        gap: 10px;
    }

    .nav-menu.show {
        display: flex;
    }

    .site-nav .nav-spacer {
        display: none;
    }


}

@media (max-width: 900px) {
    .site-nav {
        padding: 0 0.5rem;
        /* For Review */
    }
}

button {
    border-radius: 6px;
}

select,
input {
    border-radius: 0;
}

.site-nav .nav-link {
    color: black;
    text-decoration: none;
}

.site-nav .nav-link.active {
    font-weight: bold;
    text-decoration: underline;
}

.site-nav .nav-spacer {
    flex-grow: 1;
}

.site-nav .nav-user {
    font-weight: bold;
}

.site-nav .nav-user-link {
    color: black;
    text-decoration: none;
}

.site-nav .nav-user-link:hover {
    text-decoration: underline;
}

.site-nav #nav-logout {
    font-family: sans-serif;
    border: 2px solid black;
    background: white;
    color: black;
    padding: 4px 10px;
    cursor: pointer;
}

.site-nav #nav-logout:hover {
    background-color: black;
    color: white;
}

/* Dark Mode Overrides */
html.dark-mode,
html.dark-mode body {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

html.dark-mode .site-nav {
    border-bottom-color: #555 !important;
}

html.dark-mode .site-nav .nav-link {
    color: #e0e0e0 !important;
}

html.dark-mode .site-nav .nav-user-link {
    color: #e0e0e0 !important;
}

html.dark-mode .site-nav #nav-logout {
    background: #333 !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

html.dark-mode .site-nav #nav-logout:hover {
    background: #555 !important;
}

html.dark-mode .panel,
html.dark-mode .display-name-panel,
html.dark-mode .login-panel,
html.dark-mode .not-found-panel {
    border-color: #555 !important;
}

/* For Review */
html.dark-mode button,
html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea {
    border-color: #555 !important;
    background-color: #333 !important;
    color: #e0e0e0 !important;
}

html.dark-mode button:hover {
    background-color: #555 !important;
}

html.dark-mode .llm-panel,
html.dark-mode .llm-endpoint,
html.dark-mode .llm-field,
html.dark-mode .llm-prompt {
    border-color: #555 !important;
    background: #333 !important;
    color: #e0e0e0 !important;
}

html.dark-mode .code-editor-wrap pre {
    border-color: #555 !important;
    background-color: #1e1e1e !important;
}

html.dark-mode .code-editor-wrap textarea {
    caret-color: #e0e0e0 !important;
    background: transparent !important;
    color: transparent !important;
}

html.dark-mode .hl-keyword {
    color: #569cd6 !important;
}

html.dark-mode .hl-type {
    color: #4ec9b0 !important;
}

html.dark-mode .hl-preproc {
    color: #c586c0 !important;
}

html.dark-mode .hl-string {
    color: #ce9178 !important;
}

html.dark-mode .hl-char {
    color: #ce9178 !important;
}

html.dark-mode .hl-number {
    color: #b5cea8 !important;
}

html.dark-mode .hl-comment {
    color: #6a9955 !important;
}

html.dark-mode .hl-operator {
    color: #d4d4d4 !important;
}

html.dark-mode .help-overlay {
    background: #1e1e1e;
    border-color: #e0e0e0;
    color: #e0e0e0;
}

html.dark-mode .help-overlay-bar {
    border-bottom-color: #e0e0e0;
}

html.dark-mode .result-content {
    border-color: #555 !important;
}

html.dark-mode .board-container {
    border-color: #555 !important;
}

html.dark-mode .chessboard {
    border-color: #555 !important;
}

html.dark-mode .square-light {
    background-color: #555 !important;
}

html.dark-mode .square-dark {
    background-color: #333 !important;
}

html.dark-mode #leaderboard-table th,
html.dark-mode #leaderboard-table td {
    border-color: #555 !important;
}

html.dark-mode #leaderboard-table th {
    background: #222 !important;
}

html.dark-mode .suggestions {
    border-color: #555 !important;
    background: #333 !important;
}

html.dark-mode .suggestions li:hover,
html.dark-mode .suggestions li.active {
    background: #555 !important;
    color: #e0e0e0 !important;
}

html.dark-mode .login-error,
html.dark-mode .status {
    color: #ff5555 !important;
}

html.dark-mode .auth-hint {
    color: #aaa !important;
}

html.dark-mode .pgn-display {
    background-color: #333 !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

html.dark-mode .hamburger {
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

@media (max-width: 600px) {
    html.dark-mode .nav-menu {
        background: #121212 !important;
        border-bottom-color: #555 !important;
    }
}