/* Стилі для бенчмарку в стилі Elfsight */
:root {
    --accent-color: #e67e22; /* Помаранчевий */
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --fb-blue: #1877f2;
}

.ranking-section { 
    max-width: 900px; 
    margin: 50px auto; 
    background: white; 
    padding: 30px; 
    border-radius: 20px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
}

.ranking-title { text-align: center; color: #2f3640; margin-bottom: 30px; }

/* Перемикачі категорій (Тригери) */
.ranking-tabs {
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px; 
    border: 2px solid var(--accent-color); 
    border-radius: 25px;
    background: white; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s;
    color: var(--accent-color);
}

.tab-btn.active { 
    background: var(--accent-color); 
    color: white; 
}

/* Контейнер списку */
.ranking-container { display: flex; flex-direction: column; gap: 15px; }

/* Картка учасника */
.rank-card {
    display: flex; 
    align-items: center; 
    background: #fff;
    padding: 15px; 
    border-radius: 12px; 
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.rank-card:hover { 
    transform: translateX(10px); 
    border-color: var(--accent-color); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Фото/Мініатюра відео */
.rank-photo {
    width: 100px; /* Трохи ширше для відео-мініатюри */
    height: 60px; 
    border-radius: 8px; /* Прямокутник із закругленими кутами */
    object-fit: cover; 
    margin-right: 20px;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.rank-details { flex-grow: 1; }

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

.rank-name { font-weight: bold; font-size: 1.1rem; color: #2f3640; }

.metric-info { font-size: 1rem; color: #2f3640; font-weight: 800; }

/* Прогрес-бар */
.progress-wrapper { 
    background: #f0f0f0; 
    border-radius: 20px; 
    height: 14px; 
    overflow: hidden; 
}

.progress-fill { 
    height: 100%; 
    background: linear-gradient(90deg, #e67e22, #f1c40f); 
    width: 0; 
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

/* Підсвічування переможців (ТОП-3) */
.rank-card.top-0 { border: 2px solid var(--gold); background: #fffdf0; transform: scale(1.03); }
.rank-card.top-1 { border: 2px solid var(--silver); background: #fcfcfc; }
.rank-card.top-2 { border: 2px solid var(--bronze); background: #fffaf5; }

.medal { 
    font-size: 1.8rem; 
    min-width: 40px; 
    text-align: center;
    margin-right: 10px;
    font-weight: bold;
}

/* Кнопка "Дивитись" */
.btn-watch {
    padding: 10px 18px; 
    background: var(--fb-blue); 
    color: white !important; 
    border-radius: 8px;
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: bold; 
    margin-left: 15px;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-watch:hover { 
    background: #145dbf; 
    transform: translateY(-2px);
}

/* Адаптація для мобільних */
@media (max-width: 600px) {
    .rank-card { flex-wrap: wrap; justify-content: center; text-align: center; }
    .rank-photo { margin-bottom: 10px; margin-right: 0; }
    .rank-details { width: 100%; margin-bottom: 15px; }
    .btn-watch { width: 100%; margin-left: 0; }
    .medal { width: 100%; margin-bottom: 10px; margin-right: 0; }
}
