/* CPU Benchmark Tool Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #00f5ff, #ff0080);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto;
}

/* Tool Container */
.tool-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(15px);
    margin-bottom: 40px;
}

/* Search Section */
.search-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 20px;
    margin-bottom: 30px;
    align-items: end;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group label {
    font-weight: 600;
    color: #00f5ff;
    font-size: 0.9rem;
}

.search-input, .filter-select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus, .filter-select:focus {
    outline: none;
    border-color: #00f5ff;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f5ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select option {
    background: #1a1a2e;
    color: white;
}

.search-btn {
    background: linear-gradient(45deg, #00f5ff, #0080ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: fit-content;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 245, 255, 0.3);
}

/* Brand Filter */
.brand-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.brand-btn {
    padding: 8px 20px;
    border: 2px solid rgba(0, 245, 255, 0.3);
    background: transparent;
    color: #00f5ff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.brand-btn:hover, .brand-btn.active {
    background: rgba(0, 245, 255, 0.2);
    border-color: #00f5ff;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 30px;
    font-weight: 600;
    color: #00f5ff;
}

.clear-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
}

/* CPU Grid */
.cpu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.cpu-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 245, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cpu-card:hover {
    border-color: #00f5ff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 245, 255, 0.2);
}

.cpu-card.selected {
    border-color: #00f5ff;
    background: rgba(0, 245, 255, 0.1);
}

.cpu-card.selected::before {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #00f5ff;
    color: #000;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.cpu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.cpu-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00f5ff;
    line-height: 1.3;
    flex: 1;
}

.cpu-brand {
    background: rgba(0, 245, 255, 0.2);
    color: #00f5ff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cpu-year {
    color: #888;
    font-size: 0.85rem;
    margin-top: 5px;
}

.cpu-specs {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-label {
    color: #ccc;
    font-size: 0.9rem;
}

.spec-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.benchmark-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.score-item {
    text-align: center;
    background: rgba(0, 245, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00f5ff;
    display: block;
}

.score-label {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 4px;
}

.cpu-use-case {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.4;
}

/* Empty State */
.empty-state, .no-results {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3, .no-results h3 {
    font-size: 1.8rem;
    color: #00f5ff;
    margin-bottom: 15px;
}

.empty-state p, .no-results p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.example-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.example-searches span {
    color: #888;
    margin-right: 10px;
}

.example-btn {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: #00f5ff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: rgba(0, 245, 255, 0.2);
    border-color: #00f5ff;
}

/* Comparison Panel */
.comparison-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00f5ff;
    border-radius: 20px;
    padding: 20px;
    max-width: 400px;
    backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 245, 255, 0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h3 {
    color: #00f5ff;
    font-size: 1rem;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.compare-btn {
    background: linear-gradient(45deg, #00f5ff, #0080ff);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.compare-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 245, 255, 0.3);
}

.compare-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.clear-selection-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-selection-btn:hover {
    background: rgba(255, 107, 107, 0.3);
}

.selected-cpus {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-cpu-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.remove-cpu {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comparison Table */
.comparison-table {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 25px;
    margin-top: 40px;
    overflow: hidden;
}

.table-header {
    background: linear-gradient(90deg, rgba(0, 245, 255, 0.2), rgba(0, 128, 255, 0.1));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    color: #00f5ff;
    font-size: 1.5rem;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.export-btn {
    background: rgba(0, 210, 106, 0.2);
    border: 1px solid rgba(0, 210, 106, 0.5);
    color: #00d26a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: rgba(0, 210, 106, 0.3);
}

.close-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 107, 107, 0.3);
}

.table-content {
    overflow-x: auto;
}

.comparison-row {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.comparison-cell {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-align: center;
}

.comparison-cell.header {
    background: rgba(0, 245, 255, 0.1);
    font-weight: 600;
    color: #00f5ff;
}

.comparison-cell.metric {
    background: rgba(0, 245, 255, 0.05);
    justify-content: flex-start;
    font-weight: 600;
}

.winner {
    color: #00d26a;
    font-weight: 700;
}

/* Performance Charts */
.performance-charts {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.chart-container h4 {
    color: #00f5ff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    min-width: 100px;
    font-size: 0.8rem;
    color: #ccc;
    text-align: right;
}

.bar-container {
    flex: 1;
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(45deg, #00f5ff, #0080ff);
    border-radius: 12px;
    transition: width 1s ease;
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #00f5ff, #0080ff);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .search-section {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .search-group:nth-child(3),
    .search-btn {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .search-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-group:nth-child(3),
    .search-btn {
        grid-column: span 1;
    }
    
    .cpu-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-panel {
        position: static;
        max-width: none;
        margin: 20px 0;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
    }
    
    .comparison-cell {
        justify-content: flex-start;
        padding: 10px;
    }
    
    .performance-charts {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 25px 20px;
    }
    
    .brand-filter {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .brand-btn {
        width: 200px;
        text-align: center;
    }
}
/* Additional styles for API integration */

/* Loading State */
.loading-state, .error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    margin: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 245, 255, 0.3);
    border-top: 4px solid #00f5ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state h3, .error-state h3 {
    color: #00f5ff;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.loading-state p, .error-state p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Error State */
.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.retry-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

/* API Status Indicator */
.api-status {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 15px;
    padding: 10px 15px;
    font-size: 0.85rem;
    color: #ccc;
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.api-status.visible {
    opacity: 1;
}

.api-status.online {
    border-color: rgba(0, 210, 106, 0.5);
    color: #00d26a;
}

.api-status.offline {
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
}

/* Enhanced search suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 0 0 15px 15px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-input-container {
    position: relative;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.suggestion-item:hover {
    background: rgba(0, 245, 255, 0.1);
}

.suggestion-icon {
    color: #00f5ff;
    font-size: 0.9rem;
}

.suggestion-text {
    flex: 1;
}

.suggestion-category {
    font-size: 0.8rem;
    color: #888;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Data source attribution */
.data-attribution {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-top: 40px;
    text-align: center;
}

.data-attribution h4 {
    color: #00f5ff;
    margin-bottom: 10px;
}

.data-attribution p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
}

.data-sources {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.source-link {
    color: #00f5ff;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.source-link:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: #00f5ff;
}

/* Cache status */
.cache-info {
    position: absolute;
    top: -30px;
    right: 0;
    background: rgba(0, 210, 106, 0.2);
    color: #00d26a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.results-info {
    position: relative;
}

/* Advanced filters toggle */
.advanced-filters {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: none;
}

.advanced-filters.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.advanced-filters-toggle {
    background: none;
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: #00f5ff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.advanced-filters-toggle:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: #00f5ff;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* Responsive adjustments for API features */
@media (max-width: 768px) {
    .api-status {
        bottom: 20px;
        left: 20px;
        right: 20px;
        text-align: center;
    }
    
    .data-sources {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .loading-state, .error-state {
        padding: 60px 15px;
        margin: 10px;
    }
}