
        :root {
            --gold-color: #ffd700;
            --silver-color: #c0c0c0;
            --bronze-color: #cd7f32;
        }

        /* Prevent overflow and scrollbars */
        html,
        body {
            overflow-x: hidden;
            max-width: 100vw;
        }

        body {
            background: url('seba.jpg') no-repeat center center fixed;
            background-size: cover;
            min-height: 100vh;
            padding-bottom: 50px;
        }

        /* Background overlay without blur */
        .background-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent !important;
            backdrop-filter: none !important;
            z-index: -1;
        }

        /* Brand container styles */
        .brand-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .brand-logo-container {
            display: flex;
            align-items: center;
        }

        /* Navbar styling - unified black-fade top bar (see app-theme.css) */
        .leaderboard-navbar {
            padding: 1rem 0;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        }

        .leaderboard-navbar .container-fluid {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            max-width: 1200px;
            margin: 0 auto;
        }

        .leaderboard-navbar .navbar-brand {
            margin: 0 auto;
        }

        .leaderboard-navbar .brand-text {
            color: white;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
            font-size: 1.25rem;
            font-weight: 600;
            margin-left: 15px;
        }

        .leaderboard-navbar .brand-text i {
            color: white;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
        }

        /* Old sidebar elements - Hidden (replaced by tab bar) */
        .hamburger-menu-btn,
        .navbar-hamburger,
        .sidebar-menu,
        .sidebar-overlay {
            display: none !important;
        }

        .sidebar-header {
            padding: 25px 20px;
            background: #F44336;
            color: white;
            display: flex;
            align-items: center;
            gap: 15px;
            position: relative;
        }

        .sidebar-logo {
            width: 40px;
            height: 40px;
            border-radius: 8px;
        }

        .sidebar-header h5 {
            margin: 0;
            font-weight: 600;
            flex: 1;
            color: white;
        }

        .sidebar-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 8px;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: white;
        }

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

        .sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px 0;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px 25px;
            color: #2d3748;
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 4px solid transparent;
        }

        .sidebar-item:hover {
            background: #f7fafc;
            color: #667eea;
            border-left-color: #667eea;
        }

        .sidebar-item.active {
            background: #edf2f7;
            color: #667eea;
            border-left-color: #667eea;
            font-weight: 600;
        }

        .sidebar-item i {
            font-size: 20px;
            width: 25px;
            text-align: center;
        }

        .sidebar-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 15px 25px;
        }

        .sidebar-footer {
            padding: 20px 25px;
            border-top: 1px solid #e2e8f0;
            text-align: center;
        }

        /* Sidebar Overlay */
        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1090;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }



        .leaderboard-header {
            /* Frosted card - unified app look */
            background: rgba(255, 255, 255, 0.78);
            backdrop-filter: blur(16px) saturate(160%);
            -webkit-backdrop-filter: blur(16px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 20px;
            padding: 30px 30px 20px 30px;
            margin: 30px auto;
            max-width: 1200px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        }

        .leaderboard-title {
            font-size: 36px;
            font-weight: 700;
            color: #2d3748;
            text-align: center;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
        }

        .podium-section {
            /* Frosted card - unified app look */
            background: rgba(255, 255, 255, 0.78);
            backdrop-filter: blur(16px) saturate(160%);
            -webkit-backdrop-filter: blur(16px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 20px;
            padding: 40px;
            margin: 20px auto;
            max-width: 1200px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        }

        .podium-section h2 {
            color: white !important;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
        }

        .podium {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 30px;
            margin: 40px 0;
        }

        .podium-place {
            text-align: center;
            animation: fadeInUp 0.8s ease-out;
            position: relative;
        }

        .podium-place.first {
            order: 2;
        }

        .podium-place.second {
            order: 1;
        }

        .podium-place.third {
            order: 3;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

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

        .podium-crown {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 40px;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateX(-50%) translateY(0);
            }

            50% {
                transform: translateX(-50%) translateY(-10px);
            }
        }

        .podium-avatar-container {
            position: relative;
            display: inline-block;
            margin-bottom: 20px;
        }

        .podium-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 4px solid;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .podium-place:hover .podium-avatar {
            transform: scale(1.1);
        }

        .podium-place.first .podium-avatar {
            width: 140px;
            height: 140px;
            border-color: var(--gold-color);
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
        }

        .podium-place.second .podium-avatar {
            width: 110px;
            height: 110px;
            border-color: var(--silver-color);
            box-shadow: 0 0 20px rgba(192, 192, 192, 0.5);
        }

        .podium-place.third .podium-avatar {
            border-color: var(--bronze-color);
            box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
        }

        .podium-rank {
            font-size: 60px;
            margin-bottom: 15px;
        }

        .podium-name {
            font-weight: 700;
            font-size: 22px;
            color: #1a202c;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
        }

        .podium-place.first .podium-name {
            font-size: 26px;
        }

        .podium-stats {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 10px;
        }

        .stat-item {
            background: #f7fafc;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 14px;
            color: #4a5568;
        }

        .stat-item i {
            color: #667eea;
            margin-right: 5px;
        }

        .podium-base {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 25px 20px;
            border-radius: 15px;
            margin-top: 20px;
            position: relative;
        }

        .podium-place.first .podium-base {
            height: 140px;
            background: linear-gradient(135deg, var(--gold-color), #ffed4e);
            color: #2d3748;
        }

        .podium-place.second .podium-base {
            height: 110px;
            background: linear-gradient(135deg, var(--silver-color), #e8e8e8);
            color: #2d3748;
        }

        .podium-place.third .podium-base {
            height: 90px;
            background: linear-gradient(135deg, var(--bronze-color), #e89b6d);
            color: white;
        }

        .podium-position {
            font-size: 32px;
            font-weight: 700;
        }

        .ranking-list {
            /* Frosted card - unified app look */
            background: rgba(255, 255, 255, 0.78);
            backdrop-filter: blur(16px) saturate(160%);
            -webkit-backdrop-filter: blur(16px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 20px;
            padding: 40px;
            margin: 20px auto;
            max-width: 1200px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        }

        .ranking-list h3 {
            color: white !important;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
            text-align: center !important;
        }

        .ranking-list h3 {
            font-size: 24px;
            font-weight: 700;
            color: #1a202c;
            margin-bottom: 25px;
            text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
        }

        .user-card {
            display: flex;
            align-items: center;
            padding: 20px;
            background: white;
            border-radius: 15px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .user-card:hover {
            transform: translateX(10px);
            border-color: #667eea;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
        }

        .user-rank {
            font-size: 28px;
            font-weight: 700;
            color: #667eea;
            width: 60px;
            text-align: center;
        }

        .user-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            margin: 0 20px;
            object-fit: cover;
            border: 3px solid #e2e8f0;
        }

        .user-info {
            flex: 1;
        }

        .user-name {
            font-weight: 700;
            font-size: 18px;
            color: #1a202c;
            margin-bottom: 5px;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
        }

        .user-stats {
            display: flex;
            gap: 20px;
            font-size: 14px;
            color: #718096;
        }

        .user-stats span {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .user-score {
            font-size: 24px;
            font-weight: 700;
            color: #48bb78;
            margin-left: 20px;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #718096;
        }

        .empty-state i {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.5;
        }



        .loading-spinner {
            text-align: center;
            padding: 60px;
            color: white;
        }

        .loading-spinner i {
            font-size: 48px;
            color: white;
        }

        .loading-spinner p {
            color: white;
        }

        @media (max-width: 768px) {
            .leaderboard-navbar {
                padding: 0.5rem 0;
            }

            .leaderboard-navbar .container-fluid {
                padding: 0 15px !important;
                justify-content: flex-start !important;
                max-width: 100% !important;
            }

            .leaderboard-navbar .navbar-hamburger {
                position: fixed !important;
                bottom: 20px;
                right: 20px;
                left: auto !important;
            }

            .leaderboard-navbar .navbar-brand {
                margin: 0 !important;
            }

            .leaderboard-navbar .brand-container {
                justify-content: flex-start;
            }

            .leaderboard-navbar .brand-text {
                font-size: 0.9rem;
                margin-left: 8px;
            }

            .leaderboard-navbar .brand-logo-container img {
                width: 35px !important;
                height: 35px !important;
            }

            .podium {
                flex-direction: row;
                justify-content: center;
                gap: 10px;
                flex-wrap: nowrap;
            }

            .podium-place {
                width: 30%;
                min-width: 100px;
                max-width: 140px;
            }

            /* Keep the same order on mobile: 2-1-3 (leader in center) */
            .podium-place.first {
                order: 2 !important;
            }

            .podium-place.second {
                order: 1 !important;
            }

            .podium-place.third {
                order: 3 !important;
            }

            .podium-avatar {
                width: 60px !important;
                height: 60px !important;
            }

            .podium-place.first .podium-avatar {
                width: 80px !important;
                height: 80px !important;
            }

            .podium-place.second .podium-avatar,
            .podium-place.third .podium-avatar {
                width: 60px !important;
                height: 60px !important;
            }

            .podium-rank {
                font-size: 36px;
                margin-bottom: 10px;
            }

            .podium-name {
                font-size: 14px;
                margin-bottom: 5px;
            }

            .podium-place.first .podium-name {
                font-size: 16px;
            }

            .podium-stats {
                flex-direction: column;
                gap: 5px;
            }

            .stat-item {
                font-size: 11px;
                padding: 5px 8px;
            }

            .podium-base {
                padding: 15px 10px;
                margin-top: 10px;
            }

            .podium-place.first .podium-base {
                height: 100px;
            }

            .podium-place.second .podium-base {
                height: 80px;
            }

            .podium-place.third .podium-base {
                height: 65px;
            }

            .podium-position {
                font-size: 24px;
            }

            .leaderboard-title {
                font-size: 24px;
            }

            .leaderboard-header,
            .podium-section,
            .ranking-list {
                padding: 20px;
                margin: 15px auto;
            }

            .user-card {
                padding: 12px;
            }

            .user-rank {
                font-size: 18px;
                width: 35px;
            }

            .user-avatar {
                width: 45px;
                height: 45px;
                margin: 0 12px;
            }

            .user-name {
                font-size: 16px;
            }

            .user-stats {
                flex-direction: column;
                gap: 3px;
                font-size: 13px;
            }

            .user-score {
                font-size: 20px;
            }

            .hamburger-menu-btn {
                bottom: 20px;
                right: 20px;
                width: 45px;
                height: 45px;
            }

            .sidebar-menu {
                width: 280px;
                right: -280px;
            }
        }

        /* ===== Activity leaderboard entry ("Pełna lista aktywności") =====
           Page-scoped layout for the rows rendered by renderActivityLeaderboard().
           The two stats are stacked by default and each one is a single
           unbreakable unit, so a count can never be split from its adjective
           ("1" / "zarezerwowany" on separate lines). From 768px up there is
           room for one inline row with the bullet separator. */
        .activity-card {
            display: grid;
            grid-template-columns: auto auto minmax(0, 1fr) auto;
            grid-template-areas:
                "rank avatar name  score"
                "rank avatar stats stats";
            align-items: center;
            column-gap: 12px;
            row-gap: 4px;
            padding: 15px;
            background: white;
            border-radius: 12px;
            margin-bottom: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .activity-rank {
            grid-area: rank;
            font-size: 20px;
            font-weight: 700;
            color: #718096;
            min-width: 30px;
            text-align: center;
        }

        .activity-avatar-img {
            grid-area: avatar;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
        }

        .activity-avatar-emoji {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .activity-name {
            grid-area: name;
            min-width: 0;
            font-weight: 600;
            font-size: 16px;
            line-height: 1.3;
            color: #2d3748;
            overflow-wrap: break-word;
        }

        .activity-stats {
            grid-area: stats;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 3px;
            font-size: 13px;
            line-height: 1.3;
            /* 5.8:1 on white - AA for small text */
            color: #5a6677;
        }

        .activity-stat {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            /* the number and its adjective are one unit */
            white-space: nowrap;
        }

        /* fixed icon column so the stat labels line up under each other */
        .activity-stat i {
            flex: 0 0 14px;
            width: 14px;
            font-size: 12px;
            text-align: center;
        }

        /* screen-reader-only noun, so "1 zarezerwowany" reads as
           "1 zarezerwowany prezent" without costing layout width */
        .activity-stat-noun {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            clip-path: inset(50%);
            white-space: nowrap;
        }

        /* only meaningful when the stats share a row */
        .activity-stat-sep {
            display: none;
        }

        .activity-score {
            grid-area: score;
            text-align: right;
        }

        .activity-score-value {
            font-size: 24px;
            font-weight: 700;
            line-height: 1.1;
            color: #667eea;
        }

        .activity-score-label {
            font-size: 12px;
            line-height: 1.2;
            color: #5a6677;
        }

        @media (max-width: 480px) {
            .activity-card {
                column-gap: 10px;
            }

            .activity-rank {
                font-size: 16px;
                min-width: 22px;
            }

            .activity-avatar-img {
                width: 42px;
                height: 42px;
            }

            .activity-avatar-emoji {
                font-size: 1.25rem;
            }

            .activity-score-value {
                font-size: 20px;
            }
        }

        /* Below 360px a name and the score cannot share a row without the name
           breaking mid-word, so the score drops to its own line. */
        @media (max-width: 359px) {
            .activity-card {
                grid-template-columns: auto auto minmax(0, 1fr);
                grid-template-areas:
                    "rank avatar name"
                    "rank avatar stats"
                    "rank avatar score";
            }
        }

        @media (min-width: 768px) {
            .activity-card {
                grid-template-areas:
                    "rank avatar name  score"
                    "rank avatar stats score";
                column-gap: 15px;
            }

            .activity-stats {
                flex-direction: row;
                align-items: center;
                /* if the row ever runs out of room it breaks between the two
                   stats, never inside one */
                flex-wrap: wrap;
                gap: 8px;
            }

            .activity-stat-sep {
                display: block;
                color: #8a93a5;
            }
        }
    