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

:root {
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --primary-darker: #bd2130;
    --secondary-color: #0E1730;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.logo-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.header-logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.header-content h1 {
    font-size: 2.2em;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #bd2130 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: 600;
}

.header-content p {
    color: #666;
    font-size: 1em;
    margin-bottom: 25px;
}

/* Tabs */
.tabs-container {
    width: 100%;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab-button {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tab-button:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.tab-button.active {
    color: #dc3545;
    border-bottom-color: #dc3545;
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Controls */
.controls {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1em;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.filter-buttons,
.view-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn,
.view-btn {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active,
.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.view-container {
    display: none;
    padding: 25px;
}

.view-container.active {
    display: block;
}

/* Table View */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    background: white;
}

.compatibility-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95em;
    background: white;
}

.compatibility-table thead {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #bd2130 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.compatibility-table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.compatibility-table th:last-child {
    border-right: none;
}

.compatibility-table tbody {
    background: white;
}

.compatibility-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f8f8f8;
    transition: all 0.2s ease;
}

.compatibility-table td:last-child {
    border-right: none;
}

.compatibility-table tbody tr {
    transition: all 0.2s ease;
}

.compatibility-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.04) 0%, rgba(220, 53, 69, 0.01) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.compatibility-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.compatibility-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.06) 0%, rgba(220, 53, 69, 0.02) 100%);
}

.sticky-col {
    position: sticky;
    left: 0;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #bd2130 100%);
    z-index: 9;
    min-width: 280px;
    max-width: 280px;
    color: white;
    font-weight: 500;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sticky-col strong {
    display: block;
    font-size: 0.95em;
    margin-bottom: 4px;
    font-weight: 600;
}

.device-col {
    text-align: center;
    min-width: 140px;
    vertical-align: middle;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.3em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.supported {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0.1) 100%);
    color: #28a745;
    border: 2px solid rgba(40, 167, 69, 0.4);
}

.status-badge.unsupported {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #dc3545;
    border: 2px solid rgba(220, 53, 69, 0.4);
}

.status-badge.partial {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
    color: #ffc107;
    border: 2px solid rgba(255, 193, 7, 0.4);
}

.status-badge.unknown {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15) 0%, rgba(108, 117, 125, 0.08) 100%);
    color: #6c757d;
    border: 2px solid rgba(108, 117, 125, 0.3);
}

.status-badge:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
    position: relative;
}

/* Cards View */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.device-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.device-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.1);
    transform: translateY(-5px);
}

.device-card h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-card .device-icon {
    font-size: 1.5em;
}

.device-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 0.9em;
}

.feature-item .status {
    font-weight: 700;
    min-width: 30px;
}

.device-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    font-size: 0.85em;
}

.device-stat {
    text-align: center;
}

.device-stat-value {
    font-weight: 700;
    font-size: 1.3em;
    color: var(--primary-color);
}

.device-stat-label {
    color: var(--gray-500);
    margin-top: 5px;
}

/* Comparison View */
.comparison-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-selector {
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.comparison-selector label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.device-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.device-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.device-checkbox:hover {
    border-color: var(--primary-color);
}

.device-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.device-checkbox input[type="checkbox"]:checked + label {
    color: var(--primary-color);
    font-weight: 600;
}

.device-checkbox label {
    cursor: pointer;
    margin: 0;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.comparison-table thead {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #bd2130 100%);
    position: sticky;
    top: 0;
}

.comparison-table th {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.comparison-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-table tbody tr:hover {
    background: rgba(220, 53, 69, 0.05);
}

.comparison-table .feature-name {
    text-align: left;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 250px;
}

/* Legend */
.legend {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
}

.legend h3 {
    margin-bottom: 15px;
    color: var(--gray-900);
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.legend-item .status-badge {
    width: 35px;
    height: 35px;
    font-size: 1em;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px 20px;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, transparent 0%, #dc3545 50%, transparent 100%) 1;
    margin-top: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 245, 245, 0.9) 100%);
}

.footer-logo-container {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8em;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box,
    .filter-buttons,
    .view-options {
        width: 100%;
    }

    .filter-btn,
    .view-btn {
        flex: 1;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .compatibility-table {
        font-size: 0.85em;
    }

    .compatibility-table th,
    .compatibility-table td {
        padding: 12px 10px;
    }

    .sticky-col {
        min-width: 200px;
        max-width: 200px;
    }

    .device-col {
        min-width: 100px;
    }

    .status-badge {
        width: 38px;
        height: 38px;
        font-size: 1.1em;
    }

    .device-checkboxes {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 0.9em;
        flex: 1;
        min-width: calc(50% - 5px);
    }
}

/* Scrollbar personalizada */
.table-wrapper::-webkit-scrollbar,
.comparison-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track,
.comparison-table-wrapper::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #e0e0e0 0%, #f1f1f1 100%);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb,
.comparison-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.comparison-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #c82333 0%, #bd2130 100%);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-container.active {
    animation: slideIn 0.3s ease;
}
