.active-scroll-container {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    scrollbar-width: none;
    flex: 1;
}

.winner-section {
    padding: 0 16px;
}

.winner-banner {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFEB3B 100%);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 8px 16px rgba(255, 235, 59, 0.2);
}

.winner-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: #F57F17;
    margin-bottom: 4px;
}

.winner-info p {
    font-size: 12px;
    color: #FBC02D;
    line-height: 1.4;
}

.winner-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Tabs */
.ranking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-divider);
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* Ranking List */
.ranking-list {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.ranking-list.active {
    display: flex;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.rank-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dim);
    width: 24px;
    text-align: center;
}

.rank-item:nth-child(1) .rank-num { color: #FFD700; font-size: 20px; }
.rank-item:nth-child(2) .rank-num { color: #C0C0C0; font-size: 18px; }
.rank-item:nth-child(3) .rank-num { color: #CD7F32; font-size: 18px; }

.rank-user {
    flex: 1;
}

.rank-user .name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.rank-user .email {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.rank-score {
    font-size: 12px;
    color: var(--text-muted);
}

.rank-score span {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
}

.no-data {
    text-align: center;
    padding: 40px;
    font-size: 14px;
    color: var(--text-dim);
}

/* Dark mode adjustments */
body.dark-theme .winner-banner {
    background: linear-gradient(135deg, #333300 0%, #666600 100%);
}

body.dark-theme .winner-info h3 { color: #FFEB3B; }
body.dark-theme .winner-info p { color: #FBC02D; }

.desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-only {
        display: block;
        margin-bottom: 12px;
        font-size: 15px;
        font-weight: 800;
        color: var(--text-dim);
    }

    .active-scroll-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 40px;
    }

    .section-title-box {
        text-align: center;
        margin: 40px 0;
    }

    .ranking-tabs {
        display: none;
    }

    .ranking-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .ranking-list {
        display: flex !important; /* Force show both on desktop */
    }

    .winner-banner {
        padding: 40px;
    }

    .winner-img {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .winner-section { padding: 0 32px; }
    .ranking-list.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
