.compare-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.compare-column {
    flex: 1;
}

.compare-labels {
    width: 80px;
    margin-top: 155px; /* Khớp với vị trí bắt đầu của Stats */
    text-align: center;
    font-weight: bold;
    color: #94a3b8;
}

.label-item, .stat-row {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

/* Container chứa search để dropdown không làm vỡ layout */
/* Style cho ô Input Search */
.search-container input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 40px; /* Chừa chỗ cho icon kính lúp */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 20px;
}

.search-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background-color: #fff;
}

/* Style cho Dropdown kết quả */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px); /* Cách ô input một khoảng nhỏ */
    left: 0;
    right: 0;
    background: white;
    z-index: 1001;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    padding: 8px; /* Tạo khoảng trống bên trong dropdown */
}

/* Tùy chỉnh thanh cuộn cho dropdown */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Item kết quả */
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: none; /* Bỏ border bottom để trông sạch hơn */
    margin-bottom: 2px;
}

.search-item:hover {
    background-color: #f1f5f9;
}

.search-item strong {
    color: #1e293b;
    font-size: 0.9rem;
}

.search-item .item-rate {
    background: #f8fafc;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.search-item:hover .item-rate {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* UI Card So Sánh */
.compare-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    color: white;
    text-align: center;
    position: relative;
}

.rating-badge {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.stats-list {
    padding: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s;
}

/* Hiệu ứng so sánh */
.stat-item.winner { background: #f0fdf4; border-right: 3px solid #22c55e; }
.stat-item.loser { opacity: 0.8; }

.stat-label { width: 40px; font-size: 0.7rem; font-weight: bold; color: #64748b; }

.stat-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill { height: 100%; transition: width 0.5s ease-out; }
.stat-value { width: 25px; text-align: right; font-weight: bold; }

/* Lưới thông tin chi tiết cầu thủ */
.player-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia làm 2 cột */
    gap: 8px;
    padding: 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    color: #475569;
}

.info-item span {
    color: #94a3b8;
}

.info-item strong {
    color: #1e293b;
    font-weight: 600;
}

/* Căn chỉnh lại Header một chút */
.edition {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: bold;
}

.compare-chart-container {
    width: 350px; /* Độ rộng biểu đồ */
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    align-self: center;
    text-align: center;
}

#chart-placeholder {
    padding: 100px 20px;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}

/* Responsive cho mobile */
@media (max-width: 1024px) {
    .compare-grid {
        flex-direction: column;
        align-items: center;
    }
    .compare-chart-container {
        order: -1; /* Đưa biểu đồ lên đầu trên mobile */
        width: 100%;
        max-width: 400px;
    }
}