/* Leaderboard Styles */

.leaderboard-view {
    padding: 20px 4px; /* Even closer to edges on mobile */
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.leaderboard-header p {
    font-size: 15px;
    color: var(--hint);
}

/* Top 3 Podium */
.top-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
    transform-origin: top center;
}

.top-podium.shrunk {
    transform: scale(0.8) translateY(-20px);
    margin-bottom: 10px;
    opacity: 0.9;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    transition: transform 0.3s ease;
}

.podium-avatar-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.podium-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    border: 3px solid transparent;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    position: relative;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 2;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1;
    font-weight: 700;
}

/* Telegram/iOS Gradients */
.grad-blue { background: linear-gradient(135deg, #64BFF6, #0795FD); }
.grad-green { background: linear-gradient(135deg, #72D572, #42B042); }
.grad-orange { background: linear-gradient(135deg, #FFAA44, #FF8800); }
.grad-purple { background: linear-gradient(135deg, #B072F1, #8842D5); }
.grad-red { background: linear-gradient(135deg, #F17272, #D54242); }
.grad-cyan { background: linear-gradient(135deg, #72F1F1, #42D5D5); }

.podium-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 3;
}

/* Rank Specifics */
.rank-1 {
    transform: scale(1.15);
    z-index: 10;
}

.rank-1 .podium-avatar {
    width: 95px;
    height: 95px;
    border-color: #FFD700; /* Gold */
    font-size: 36px;
}
.rank-1 .podium-badge { background: linear-gradient(135deg, #FFD700, #FFA500); }

.rank-2 .podium-avatar {
    border-color: #C0C0C0; /* Silver */
}
.rank-2 .podium-badge { background: linear-gradient(135deg, #C0C0C0, #808080); }

.rank-3 .podium-avatar {
    border-color: #CD7F32; /* Bronze */
}
.rank-3 .podium-badge { background: linear-gradient(135deg, #CD7F32, #8B4513); }

.podium-name {
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.podium-stars {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Leaderboard List */
.leaderboard-list {
    width: 100%;
    background: var(--bg);
    border-radius: 12px;
    border: none;
    overflow: hidden;
    box-shadow: none; /* Removed shadow as requested */
}

.list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    transition: background 0.2s;
    position: relative;
}

.list-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 107px;
    right: 0;
    height: 0.5px; /* Thinner separator as requested */
    background: var(--border);
    opacity: 0.4;
}

.list-item:active { background: var(--bg2); }

.list-rank {
    width: 35px;
    font-weight: 700;
    font-size: 15px;
    color: var(--hint);
}

.list-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg2);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    overflow: hidden;
    position: relative;
}

.list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 2;
}

.list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.list-status {
    font-size: 12px;
    color: var(--hint);
}

.list-value {
    text-align: right;
}

.stars-badge {
    background: var(--bg2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-star-icon {
    width: 36px; /* Even larger as requested */
    height: 36px;
    vertical-align: middle;
}

.gift-badge-box {
    background: var(--accent); /* Accent background */
    color: white; /* White text */
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px var(--accent-soft);
}

.gift-icon-white {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* White icon */
}

.gift-icon-white svg {
    width: 100%;
    height: 100%;
}

.gift-text {
    color: white;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-podium {
    height: 120px;
    width: 100%;
    border-radius: 16px;
    margin-bottom: 40px;
}

.skeleton-item {
    height: 70px;
    width: 100%;
    border-bottom: 1px solid var(--border);
}

/* Smooth Scroll */
.view {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}


.nav-icon-circle {
    width: 26px;
    height: 26px;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    border: none;
}

.nav-tab.active .nav-icon-circle {
    background: none;
    border-color: transparent;
    box-shadow: none;
}

.nav-icon-circle img {
    width: 26px;
    height: 26px;
    opacity: 0.5; /* Gray like others */
    transition: all 0.3s ease;
}

.nav-tab.active .nav-icon-circle img {
    filter: none;
    opacity: 1;
    /* If it's a black SVG, we can use filter to make it accent color */
    filter: invert(31%) sepia(94%) saturate(1352%) hue-rotate(193deg) brightness(101%) contrast(101%);
}
