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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.header-provided {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    opacity: 0.95;
}

.provided-by {
    font-size: 0.9rem;
    white-space: nowrap;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.wtf-logo {
    height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.logo-fallback {
    font-weight: 700;
    font-size: 1.5rem;
}

.promo-code {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 5px;
}

.header-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    font-style: italic;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #2196F3;
    color: white;
}

.btn-secondary:hover {
    background: #0b7dda;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #ff9800;
    color: white;
}

.btn-small:hover {
    background: #e68900;
}

.select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.filter-group input,
.filter-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.stats-container {
    padding: 20px;
}

.loading, .error {
    text-align: center;
    padding: 20px;
    font-size: 18px;
}

.error {
    color: #f44336;
    background: #ffebee;
    border-radius: 6px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f5f5f5;
    position: sticky;
    top: 0;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
}

th.sortable:hover {
    background-color: #f0f0f0;
}

.sort-indicator {
    position: absolute;
    right: 8px;
    font-weight: bold;
    color: #667eea;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #f9f9f9;
}

tbody tr:nth-child(even) {
    background: #fafafa;
}

tbody tr:nth-child(even):hover {
    background: #f5f5f5;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

#pageInfo {
    font-weight: 600;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

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

.tab-button {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e0e0e0;
    color: #333;
}

.tab-button.active {
    background: #667eea;
    color: white;
    border-bottom-color: #667eea;
}

#chartContainer {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#comparisonChart {
    max-height: 400px;
    max-width: 100%;
}

.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-note {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.footer-note a {
    color: #667eea;
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* Stats Tags Container */
.stats-tags-container {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 0;
}

.stats-tags-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
    font-size: 0.9rem;
}

.stats-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.stats-tag {
    padding: 6px 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stats-tag:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stats-tag:active {
    transform: translateY(0);
}

/* Column Header with X Button */
.header-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.remove-column-btn {
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.6;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.remove-column-btn:hover {
    color: #dc3545;
    opacity: 1;
    font-weight: bold;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

