* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.brand h1 {
    font-size: 1.25rem;
    color: #2c3e50;
    white-space: nowrap;
}

.brand .subtitle {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
    justify-content: center;
}

.search-box input {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    min-width: 200px;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-box button {
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover:not(:disabled) {
    background: #2980b9;
}

.search-box button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.last-updated {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

.top-bar-meta .data-note {
    font-size: 0.7rem;
    color: #999;
    white-space: nowrap;
}

.github-link {
    color: #333;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.github-link:hover {
    color: #3498db;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
}

.error {
    background: #fee;
    color: #c0392b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.not-in-cache {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

.results {
    width: 100%;
}

.results h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.distro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

@media (min-width: 900px) {
    .distro-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .distro-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.distro-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #95a5a6;
}

.distro-card.status-fixed {
    border-left-color: #27ae60;
}

.distro-card.status-affected {
    border-left-color: #e74c3c;
}

.distro-card.status-not-affected {
    border-left-color: #3498db;
}

.distro-card.status-unknown {
    border-left-color: #95a5a6;
}

.distro-card.status-wontfix,
.distro-card.status-deferred {
    border-left-color: #f39c12;
}

.distro-header-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.distro-header-link:hover .distro-name {
    color: #3498db;
    text-decoration: underline;
}

.distro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    transition: background 0.15s;
}

.distro-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.distro-name::after {
    content: ' ↗';
    font-size: 0.8rem;
    opacity: 0.4;
}

.distro-header-link:hover .distro-name::after {
    opacity: 1;
}

.distro-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #ecf0f1;
}

.severity {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.releases {
    margin: 0.75rem 0;
}

.releases-list {
    padding-left: 1rem;
    border-left: 2px solid #eee;
}

.release-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f5f5f5;
}

.release-item:last-child {
    border-bottom: none;
}

.release-name {
    font-weight: 500;
    min-width: 100px;
}

.release-status {
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.release-status.status-fixed {
    background: #d4edda;
    color: #155724;
}

.release-status.status-affected {
    background: #f8d7da;
    color: #721c24;
}

.release-status.status-not-affected {
    background: #cce5ff;
    color: #004085;
}

.release-status.status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.release-fixed {
    color: #27ae60;
    font-family: monospace;
    font-size: 0.85rem;
}

footer {
    padding: 1rem;
}

@media (max-width: 800px) {
    .top-bar {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .brand {
        order: 1;
    }

    .top-bar-right {
        order: 2;
    }

    .search-box {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .brand h1 {
        font-size: 1rem;
    }

    .brand .subtitle {
        display: none;
    }

    .search-box input {
        min-width: 100px;
    }

    .distro-grid {
        grid-template-columns: 1fr;
    }

    .top-bar-meta {
        display: none;
    }
}
