.comparison-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.player-card {
    background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.player-card:hover {
    border-color: #DC143C;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.rank-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #DC143C;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.player-flag {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.player-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #003893;
    margin: 1rem 0;
}

.stat-item {
    margin: 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.stat-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #DC143C;
    margin-top: 0.3rem;
}

/* ===== COMPARISON CONTAINER ===== */
.comparison-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.comparison-header {
    text-align: center;
    margin-bottom: 3rem;
}

.comparison-header h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.comparison-header p {
    color: #666;
    font-size: 1.1rem;
}

/* ===== SELECTOR SECTION ===== */
.selector-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.selector-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #DC143C;
    padding-bottom: 0.5rem;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.selector-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    user-select: none;
}

.selector-card:hover {
    border-color: #4CAF50;
    background: #f0f9f0;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.selector-card.selected {
    border-color: #4CAF50;
    background: #f0f9f0;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.selector-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.selector-card.disabled:hover {
    border-color: #eaeaea;
    background: #f5f5f5;
    box-shadow: none;
}

.selector-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.selector-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
    margin: 0;
    padding: 0;
    z-index: 10;
    position: relative;
    pointer-events: all;
}

.selector-checkbox label {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.selector-name {
    font-weight: 600;
    color: #333;
    text-align: center;
    font-size: 0.95rem;
}

.selector-stat {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.compare-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #DC143C, #003893);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.3);
}

/* ===== COMPARISON RESULTS ===== */
.comparison-results {
    animation: slideUp 0.5s ease;
}

.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: #e0e0e0;
    color: #DC143C;
}

.tab-toggle {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #DC143C;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: slideUp 0.3s ease;
}

/* ===== COMPARISON GRID ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ===== PLAYER COMPARISON CARD ===== */
.player-comparison-card,
.team-comparison-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.player-comparison-card:hover,
.team-comparison-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #003893 0%, #001f4d 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-header h3 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
}

.card-header a {
    color: white;
}

.player-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.25rem 0 0 0;
}

.stats-table {
    padding: 1rem;
}

.stat-group-title {
    font-weight: 700;
    color: #DC143C;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.stat-group-title:first-child {
    margin-top: 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.95rem;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
    font-weight: 600;
}

.stat-value {
    color: #003893;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ===== BEST VALUE HIGHLIGHTING ===== */
.stat-row.best-stat {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.08) 0%, transparent 100%);
    border-left: 4px solid #4CAF50;
    padding-left: 0.5rem;
}

.stat-row.best-stat .stat-value {
    color: #2E7D32;
    font-weight: 800;
    text-shadow: 0 0 4px rgba(76, 175, 80, 0.2);
}

.stat-row.best-stat .stat-label {
    color: #2E7D32;
    font-weight: 700;
}

.stat-row.low-stat {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.08) 0%, transparent 100%);
    border-left: 4px solid #2196F3;
    padding-left: 0.5rem;
}

.stat-row.low-stat .stat-value {
    color: #1565C0;
    font-weight: 800;
}

.stat-row.low-stat .stat-label {
    color: #1565C0;
    font-weight: 700;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .comparison-container {
        padding: 1rem;
    }

    .comparison-header h1 {
        font-size: 1.8rem;
    }

    .selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

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

    .tab-toggle {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
    }

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

    .stats-table {
        padding: 0.75rem;
    }

    .stat-row {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
}

/* ===== PLAYER SEARCH INPUT FIELDS ===== */
.input-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field-wrapper {
    position: relative;
}

.input-field-wrapper label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-field-wrapper input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-field-wrapper input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background: #f9f9f9;
    color: #4CAF50;
    padding-left: 1rem;
}

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

.result-name {
    font-weight: 600;
    color: #333;
    display: block;
}

.search-result-item small {
    font-size: 0.8rem;
    color: #999;
    display: block;
    margin-top: 0.25rem;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.selected-item {
    margin-top: 0.75rem;
    min-height: 32px;
}

.selected-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.remove-badge {
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.remove-badge:hover {
    background: rgba(255, 107, 107, 0.8);
    transform: scale(1.1);
}

/* Scrollbar styling for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}