body {
    font-family: system-ui, Roboto, sans-serif;
    margin: 0;
    padding: 2rem;
    overflow-x: hidden;
}

.content-container {
    width: 95vw;
    max-width: 64rem;
    margin: 0 auto;
}

header {
    margin-bottom: 2rem;
}

.filter-container {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select, .filter-options select {
    padding: 0.5rem;
    background: #eeeeee;
    border: none;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.compat-table tr.filtered-out {
    display: none;
}

#compatibility-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compat-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    border: 4px solid white;
}

.compat-table th,
.compat-table td {
    padding: 0.5rem;
}

.compat-table th {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.compat-table thead th:not(:first-child) {
    width: 120px;
    text-align: center;
    vertical-align: top;
}

.compat-table thead th:not(:first-child) i {
    display: block;
    font-size: 2em;
    margin: 0 auto 0.5rem auto;
}

.compat-table thead th:not(:first-child) {
    padding: 1rem 0.5rem;
}

.platform-score {
    font-size: 0.75rem;
    font-weight: normal;
    color: #666;
    margin-top: 0.25rem;
}

.compat-table td:not(:first-child) {
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
}

.support-cell {
    cursor: pointer;
    position: relative;
    transition: opacity 0.2s ease;
}

.support-cell:hover {
    opacity: 0.6;
}

.support-cell.status-supported {
    background-color: #4caf50;
    color: white;
}

.support-cell.status-partial {
    background-color: #ff9800;
    color: white;
}

.support-cell.status-unsupported {
    background-color: #f44336;
    color: white;
}

.support-cell.status-unknown {
    background-color: #eeeeee;
}

.support-cell.status-supported.selected {
    background-color: white;
    color: #4caf50;
}

.support-cell.status-partial.selected {
    background-color: white;
    color: #ff9800;
}

.support-cell.status-unsupported.selected {
    background-color: white;
    color: #f44336;
}

.support-cell.status-unknown.selected {
    background-color: white;
}

.category-header {
    background-color: #eeeeee !important;
}

.details-row {
    display: none;
    background-color: white;
}

.details-row.expanded {
    display: table-row;
}

.details-content {
    padding: 1rem;
    font-size: 0.8rem;
    border-left: 4px solid var(--bar-color);
    word-wrap: break-word;
    white-space: normal;
}

.details-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.details-content p {
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .filter-options {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .content-container {
        width: calc(100vw - 2rem);
        margin: 0 1rem;
        padding: 0;
        box-sizing: border-box;
    }

    header {
        margin-bottom: 1.5rem;
    }

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

    header p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .compat-table thead th:not(:first-child) {
        width: 60px;
        padding: 0.75rem 0.25rem;
    }

    .compat-table thead th:not(:first-child) .platform-text {
        display: none;
    }

    .compat-table thead th:not(:first-child) .platform-score {
        display: none;
    }

    .compat-table thead th:not(:first-child) i {
        font-size: 1.5em;
        margin-bottom: 0;
    }

    .compat-table td:first-child {
        font-size: 0.9rem;
        min-width: 8rem;
        padding: 0.75rem 0.5rem;
    }

    .compat-table td:not(:first-child) {
        padding: 0.75rem 0.25rem;
    }

    .details-content {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .content-container {
        width: calc(100vw - 1rem);
        margin: 0 0.5rem;
        padding: 0;
        box-sizing: border-box;
    }

    header h1 {
        font-size: 1.25rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .compat-table thead th:not(:first-child) {
        width: 50px;
        padding: 0.5rem 0.125rem;
    }

    .compat-table thead th:not(:first-child) i {
        font-size: 1.25em;
    }

    .compat-table td:first-child {
        font-size: 0.85rem;
        min-width: 6rem;
        padding: 0.5rem 0.25rem;
    }

    .compat-table td:not(:first-child) {
        padding: 0.5rem 0.125rem;
    }

    .compat-table th,
    .compat-table td {
        min-height: 44px;
    }

    .support-cell {
        min-width: 44px;
        min-height: 44px;
    }

    .support-cell i {
        font-size: 1.2em;
    }

    .details-content {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .details-content h4 {
        font-size: 0.9rem;
    }
}