/* frontend/css/statistics.css */

.leaderboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.leaderboard-header h1 {
    color: var(--cornsilk);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.leaderboard-header p {
    color: var(--ash-grey);
    font-size: 1rem;
}

.leaderboards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.leaderboard-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.leaderboard-card-header {
    background: var(--cerulean);
    color: white;
    padding: 18px 20px;
    text-align: center;
}

.leaderboard-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.leaderboard-card-header p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.leaderboard-wrapper {
    max-height: 500px;
    overflow-y: auto;
}

.leaderboard-wrapper::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.leaderboard-wrapper::-webkit-scrollbar-thumb {
    background: var(--cerulean);
    border-radius: 4px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead th {
    background: var(--ash-grey);
    color: var(--ink-black);
    font-weight: 600;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leaderboard-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #eee;
}

.leaderboard-table tbody tr:hover {
    background: rgba(64, 121, 140, 0.1);
}

.leaderboard-table tbody td {
    padding: 10px 15px;
    vertical-align: middle;
    color: var(--ink-black);
}

.rank-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
}

.rank-1-badge {
    background: #FFD700;
    color: #333;
}

.rank-2-badge {
    background: #C0C0C0;
    color: #333;
}

.rank-3-badge {
    background: #CD7F32;
    color: white;
}

.current-user-row {
    background: rgba(64, 121, 140, 0.2) !important;
    border-left: 3px solid var(--cerulean);
    font-weight: 500;
}

.current-user-badge {
    background: var(--cerulean);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 8px;
}

.goals-count {
    font-weight: bold;
    font-size: 1.1rem;
}

.goals-count.high {
    color: #4CAF50;
}

.goals-count.low {
    color: #f44336;
}

.loading-state, .error-state {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 16px;
}

.loading-state {
    color: var(--cerulean);
}

.error-state {
    color: #d32f2f;
}

@media (max-width: 900px) {
    .leaderboards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.no-goals-badge {
    background: #999;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    margin-left: 8px;
}


/* Dodaj na konec Leaderboard.css */

/* Trenutni uporabnik - cela vrstica obarvana */
.current-user-row {
    background-color: rgba(64, 121, 140, 0.25) !important;
    border-left: 4px solid var(--cerulean);
    font-weight: 600;
}

.current-user-row td {
    background-color: transparent !important;
}

.current-user-row:hover {
    background-color: rgba(64, 121, 140, 0.35) !important;
}

/* Označba "Ti" */
.current-user-badge {
    background: var(--cerulean);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 8px;
    display: inline-block;
}

/* Hover efekt za vse vrstice */
.leaderboard-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.current-user-row:hover {
    background-color: rgba(64, 121, 140, 0.35) !important;
}