:root {
    --bg: #ffffff;
    --fg: #000000;
    --border: #d4d4d8;
    --muted: #000000;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    margin: 0;
    padding: 3rem 1.5rem 4rem;
    display: flex;
    justify-content: center;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    width: 100%;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    font-weight: normal;
}

.search-section {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

select,
input[type="text"],
button {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    border-radius: 0;
    outline: none;
    font-weight: normal;
}

input[type="text"]:focus,
select:focus,
button:focus,
button:hover {
    /* keep border at 1px on focus */
    outline: none;
    border: 1px solid var(--fg);
}

select {
    cursor: pointer;
    width: max-content;
}

input[type="text"] {
    flex-grow: 1;
}

button {
    cursor: pointer;
    width: auto;
    white-space: nowrap;
}

button:hover {
    border-color: var(--fg);
}

#statusFooter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 1rem;
    line-height: 1.4;
}

.project-group {
    display: grid;
    grid-template-columns: 16px 1fr;
    column-gap: 0.5rem;
}

.project-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.project-row:hover {
    opacity: 0.7;
}

.toggle-marker {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resolution-list {
    grid-column: 2;
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 1rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.res-item {
    display: contents;
}

.res-count {
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card:hover,
.card:focus {
    border-color: var(--fg);
    outline: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.score {
    font-weight: normal;
    color: var(--muted);
}

.card-title {
    font-size: 1.05rem;
    margin: 0;
    font-weight: normal;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    margin-top: 0.5rem;
}

.card-updated {
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: auto;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-github {
    color: var(--fg);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-github:hover {
    opacity: 0.6;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    body {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    status-bar {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .search-section {
        flex-direction: column;
        gap: 0.75rem;
    }

    select,
    button {
        width: 100%;
    }

    .card {
        padding: 1rem;
    }

    .card-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
